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

math_number_all = True causes equations to have two numbers in html #5298

Closed
certik opened this issue Aug 13, 2018 · 4 comments
Closed

math_number_all = True causes equations to have two numbers in html #5298

certik opened this issue Aug 13, 2018 · 4 comments

Comments

@certik
Copy link

certik commented Aug 13, 2018

Problem

When using the following configuration in conf.py:

imgmath_image_format = 'svg'
imgmath_dvisvgm_args = ['--no-fonts', '--exact']
math_number_all = True
math_numfig = True
numfig = True
numfig_secnum_depth = 3

All equations suddenly have 2 numbers. A latex generated number (1), and an html generated number (which is correct):

screenshot_2018-08-13 3 2 complex numbers theoretical physics reference 0 5 documentation

The html generated one is correct, the latex generated number (1) should be removed.

When I use a pdf output, then all equations have just one number (the correct one).

Procedure to reproduce the problem

Put this into your conf.py and use some math:

imgmath_image_format = 'svg'
imgmath_dvisvgm_args = ['--no-fonts', '--exact']
math_number_all = True
math_numfig = True
numfig = True
numfig_secnum_depth = 3

Reproducible project / your project

Environment info

  • OS: Ubuntu 16.04
  • Python version: 3.7.0
  • Sphinx version: 1.7.6
@certik
Copy link
Author

certik commented Aug 13, 2018

It turns out, this is caused by the math_number_all = True flag. If I disable it, then it fixes the problem. But of course, not all equations are labeled anymore.

@certik certik changed the title numfig=True causes equations to have two numbers math_number_all = True causes equations to have two numbers in html Aug 13, 2018
certik added a commit to certik/theoretical-physics that referenced this issue Aug 13, 2018
@tk0miya tk0miya added this to the 1.7.7 milestone Aug 15, 2018
tk0miya added a commit to tk0miya/sphinx that referenced this issue Aug 15, 2018
tk0miya added a commit that referenced this issue Aug 16, 2018
Fix #5298: imgmath: math_number_all causes equations to have two numbers in html
@tk0miya
Copy link
Member

tk0miya commented Aug 16, 2018

Fixed by #5304.
Thank you for reporting.

@tk0miya tk0miya closed this as completed Aug 16, 2018
@certik
Copy link
Author

certik commented Aug 16, 2018

Thank you @tk0miya, much appreciate the quick fix!

@certik
Copy link
Author

certik commented Aug 16, 2018

I tested it and it works, as of the commit 11331c5.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants