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

Error with \begin{equation} xxx \end{equation} #132

Open
phoenixsfly opened this issue Oct 11, 2024 · 2 comments
Open

Error with \begin{equation} xxx \end{equation} #132

phoenixsfly opened this issue Oct 11, 2024 · 2 comments

Comments

@phoenixsfly
Copy link

.. math::

    \begin{equation}
    a=b
    \end{equation}

Katex render result:
{26A736F7-2E60-4A92-A45D-711FFE991ECD}

mathjax render result:
{09BBC7BA-AEB3-40D0-A658-3D0EDC60700C}

mathjax set with mathjax3_config = {'tex': {'tags': 'ams'}}
{EAB3CE16-085D-4F99-B521-AB34E3518EC7}

It seems that formulas and numbers were overlapped in Katex

@hagenw
Copy link
Owner

hagenw commented Oct 11, 2024

Thanks for reporting, I will have a look into it.

Could you test, if it works when using labels, e.g.

.. math::
    :label: my-equation

    a = b

as shown at https://sphinxcontrib-katex.readthedocs.io/en/v0.9.10/examples.html#equation-numbers.

@phoenixsfly
Copy link
Author

I added the following cases.
The results show that the second use case(:label: my-equation ) rendering is correct, but as long as \begin{xxx} \end{xxx} is used, the problem of formula and number overlap will occur.

.. math::

    \begin{equation}
    a=c
    \end{equation}


.. math::
    :label: my-equation

    a=b

.. math::

    \begin{align}
        a &= b \\
        b &= c
    \end{align}

{C799D59F-2B8B-4998-8E82-E6696DC7C6AC}

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

No branches or pull requests

2 participants