myst-templates / springer

A template for easily creating pretty, nicely formatted Springer Journal articles using Myst Markdown
1 stars 1 forks source link

Myst Markdown does not properly support multiline equations including labeling #4

Open dressedfez opened 10 months ago

dressedfez commented 10 months ago

NOTE: this is not an issue of the template itself, but is supposed to track on issue of Myst.

In general multiline equations are supported in Myst markdown, however, the labeling of equations only works in a limited fashion. To get the under examples/sn-article the sn-article.md fully working, we would need this. In the case presented there only the second equation of an aligned equations should show equation numbering and have an associated label, e.g. we have a construction like this in Myst markdown:

:::{math}
A &= 1 \nonumber \\
:label: bla
B &= 2 
:::

Mistakes here:

  1. In the HTML output an associated an equation number is shown, but not in the correct place, i.e. on the line where no suppressing using \nonumber is done. See this sandbox.
  2. Labeling of the correct line is not supported yet according to: https://mystmd.org/guide/math#dollar-math and see this sandbox.
  3. the PDF output shows no line number at all, because the above translates currently to the following latex expression:
    \begin{equation}
    \begin{aligned}
    D_\mu &=  \partial_\mu - ig \frac{\lambda^a}{2} A^a_\mu \nonumber \\
    F^a_{\mu\nu} &= \partial_\mu A^a_\nu - \partial_\nu A^a_\mu + g f^{abc} A^b_\mu A^a_\nu
    \end{aligned}
    \end{equation}

    NoTe: I have removed the label here at the moment by hand since only label of the whole equation is possible under Myst (see 2. above). However, correctly this should be translated to:

    \begin{align}
    D_\mu &=  \partial_\mu - ig \frac{\lambda^a}{2} A^a_\mu \nonumber \\
    F^a_{\mu\nu} &= \partial_\mu A^a_\nu - \partial_\nu A^a_\mu + g f^{abc} A^b_\mu A^a_\nu
    \end{align}