Skip to content

Issue with align inside tex and markdown #4

@dvd101x

Description

@dvd101x

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions