Uploaded image for project: 'MathJax Macro'
  1. MathJax Macro
  2. MATHJAX-19

Cannot reference several equations anymore

Details

    • Bug
    • Resolution: Solved By
    • Blocker
    • None
    • 1.1
    • Unknown
    • N/A
    • N/A

    Description

      To reproduce:

      {{mathjax}}
      \begin{equation}
      \vec{F} = -F \hat{j} \label{eq:eq1}
      \end{equation}
      \begin{equation}
      \vec{F_{ac}} = F_{ac} \frac{\vec{r_{ca}}}{|\vec{r_{ca}}|} \label{eq:eq2}
      \end{equation}
      \begin{equation}
      \vec{F_{ac}} = F_{ac} \frac{-L\sin \theta \hat{i} + (L\cos \theta+h) \hat{j}}{\sqrt{(L\sin \theta)^2 + (L\cos \theta + h)^2}} \label{eq:eq3}
      \end{equation}
      {{/mathjax}}
      
      Let's try to reference equation 1, here is the reference to equation {{mathjax}}\ref{eq:eq1}{{/mathjax}}
      
      Let's try to reference equation 2, here is the reference to equation {{mathjax}}\ref{eq:eq2}{{/mathjax}}
      
      Let's try to reference equation 3, here is the reference to equation {{mathjax}}\ref{eq:eq3}{{/mathjax}}
      

      This generates:

      Editing Macros.MathJaxMacro and commenting out the following line makes it work:

            // Reset the tex labels, since re-typesetting might create duplicate labels.
            MathJax.texReset();
      

      Attachments

        Issue Links

          Activity

            [MATHJAX-19] Cannot reference several equations anymore
            oana.florean@xwiki.com Vitel Lavinia added a comment -

            Note that right now this bug was fixed by MATHJAX-20 , but that was mostly a workaround for https://github.com/mathjax/MathJax/issues/2999. After this workaround is removed and the `elements` configuration is added back, a `MathJax.typesetClear();` will be needed besides the `MathJax.texReset();` in order to not reproduce the referencing issue

            oana.florean@xwiki.com Vitel Lavinia added a comment - Note that right now this bug was fixed by MATHJAX-20 , but that was mostly a workaround for https://github.com/mathjax/MathJax/issues/2999. After this workaround is removed and the `elements` configuration is added back, a `MathJax.typesetClear();` will be needed besides the `MathJax.texReset();` in order to not reproduce the referencing issue
            vmassol Vincent Massol added a comment -

            Regression introduced in MATHJAX-14

            vmassol Vincent Massol added a comment - Regression introduced in MATHJAX-14

            People

              oana.florean@xwiki.com Vitel Lavinia
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: