sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.58k stars 2.12k forks source link

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

Open cbworden opened 8 years ago

cbworden commented 8 years ago

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

.. math:: e^{i\pi} + 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.

tk0miya commented 8 years ago

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?

cbworden commented 8 years ago

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

YingzhouLi commented 8 years ago

I encountered exactly the same issue.

tk0miya commented 8 years ago

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

YingzhouLi commented 8 years ago

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 notifications@github.com<mailto: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.

tk0miya commented 8 years ago

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

YingzhouLi commented 8 years ago
screen shot 2016-07-21 at 9 09 31 pm

FYI

tk0miya commented 8 years ago

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