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

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

Open
dressedfez opened this issue Sep 13, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@dressedfez
Copy link
Collaborator

dressedfez commented Sep 13, 2023

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}
@dressedfez dressedfez added the enhancement New feature or request label Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant