Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with align inside tex and markdown #4

Open
dvd101x opened this issue Sep 29, 2022 · 1 comment
Open

Issue with align inside tex and markdown #4

dvd101x opened this issue Sep 29, 2022 · 1 comment

Comments

@dvd101x
Copy link

dvd101x commented Sep 29, 2022

Hi, I found an issue that I would like to bring to your attention. First of all I'm very grateful for this product and I understand this is a very particular issue.

I was working on some katex equations of this form

$$ \begin{align} D &= \frac{1}{2}\rho _ g \pi a^2 u^2 C_ D(Re) \tag{1.5} \\ Re &= \frac{2 \rho _ g u a}{\mu _ g} \tag{1.6} \\ C_ D &= \frac{24}{Re} + \frac{6}{1 + \sqrt {Re}} + 0.4 \tag{1.7} \end{align} $$

I was using a markdown cell with this

${tex.block`
\begin{align}
D &= \frac{1}{2}\rho _ g \pi a^2 u^2 C_ D(Re) \tag{1.5} \\
Re &= \frac{2 \rho _ g u a}{\mu _ g}  \tag{1.6} \\
C_ D &= \frac{24}{Re} + \frac{6}{1 + \sqrt {Re}} + 0.4  \tag{1.7} 
\end{align}
`}

Unfortunately I found this error

ParseError: KaTeX parse error: No such environment: align at position 8: 
\begin{̲a̲l̲i̲g̲n̲}̲
D &= \frac{1}{…

I tried without the align and separating block by block and it works fine but not aligned

$$ D = \frac{1}{2}\rho _ g \pi a^2 u^2 C_ D(Re) \tag{1.5} $$

$$ Re = \frac{2 \rho _ g u a}{\mu _ g} \tag{1.6} $$

$$ C_ D = \frac{24}{Re} + \frac{6}{1 + \sqrt {Re}} + 0.4 \tag{1.7} $$

${tex.block`D = \frac{1}{2}\rho _ g \pi a^2 u^2 C_ D(Re) \tag{1.5}`}
${tex.block`Re = \frac{2 \rho _ g u a}{\mu _ g}  \tag{1.6}`}
${tex.block`C_ D = \frac{24}{Re} + \frac{6}{1 + \sqrt {Re}} + 0.4  \tag{1.7}`}

This might be the source of the issue:

  • Observable uses v0.11.1
  • Align is supported since v0.13.0
  • Tag per row of align is supported since v0.15.1

So my request is upgrading the katex library if possible.

Reference: Equations source

@dvd101x
Copy link
Author

dvd101x commented Jun 2, 2024

Hi just checked today to validate the issue is still present. Just sharing the info in case someone finds it useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant