Sphinx: :label: in :math: directive puts label in front of the equation rather than after it

Created on 19 Nov 2015  Â·  8Comments  Â·  Source: sphinx-doc/sphinx

On documentation page http://sphinx-doc.org/ext/math.html the example in the :eq: section looks like this:

.. math:: e^{ipi} + 1 = 0
:label: euler

Euler's identity, equation :eq:euler, was elected one of the most

beautiful mathematical formulas.

However when I run this in Sphinx 1.3.1 on a Mac, it puts the label "(1)" at the beginning of the equation rather than at the end of the line (using mathpng). If I use mathjax, the label appears on top of the equation.

Thanks.

extensions

Most helpful comment

Perhaps, are you using sphinx_rtd_theme?
If true, it is a bug of the theme. I filed this problem at their github issues.
https://github.com/snide/sphinx_rtd_theme/issues/301

All 8 comments

In my environment (Mac, Sphinx-1.3.3, MacTeX 2015, Google Chrome), the label is always put on end of the line.

Case of mathjax:
mathjax

Case of pngmth:
pngmath

Could you tell me about the issue in detail?

Hi,
My latex specs are:
pdfTeX 3.14159265-2.6-1.40.15 (TeX Live 2014/MacPorts 2014_8)
kpathsea version 6.2.0
...
Compiled with libpng 1.6.17; using libpng 1.6.17
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.32.0

This is likely the difference between our setups. I pulled this version off of MacPorts as part of the texlive-latex, texlive-latex-recommended, and texlive-latex-extra packages.

I can send you images if you'd like, but basically the "(1)" that appears at the ends of the lines in your images appears right before the "e^ix" when running mathpng. It appears right above the equation when using mathjax. The equation itself looks correct.

Are there any other specs I can send you to help you diagnose the problem?

Thanks for looking into this.
B

I encountered exactly the same issue.

@YingzhouLi could you show me the screenshot of your case?

Dear Takeshi,

I am not sure if you can receive the screenshot from the attachment or not. Please let me know if you cannot see it.
[cid:9702336E-2D18-4C3E-BBA8-551FF2580A43]

Best,
Yingzhou

On Jul 18, 2016, at 6:23 PM, Takeshi KOMIYA <[email protected]notifications@github.com> wrote:

@YingzhouLihttps://github.com/YingzhouLi could you show me the screenshot of your case?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/sphinx-doc/sphinx/issues/2122#issuecomment-233505658, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD6DT01kkZsDThrfpmF5qG_XuPUeO3QIks5qXCctgaJpZM4Gl9Zm.

@YingzhouLi Hmm, I can't see your images. Could you attach them from issue form instead of email?

screen shot 2016-07-21 at 9 09 31 pm
FYI

Perhaps, are you using sphinx_rtd_theme?
If true, it is a bug of the theme. I filed this problem at their github issues.
https://github.com/snide/sphinx_rtd_theme/issues/301

Was this page helpful?
0 / 5 - 0 ratings