-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
LaTeX: Add math_numsep
support to latex builder
#12652
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked separate chunks now I need to revisit the whole LaTeX file to make sure this does not break some at-this-time not seen constraints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nits.
With
latex_theme = 'howto'
# latex_toplevel_sectioning = 'part'
numfig = True
math_numfig = True
numfig_secnum_depth = 1
math_numsep = "-"
there is a problem in the output with prefixed dots. This problem goes away if the suggested change above is merged. But even with the suggested change, then if we uncomment the latex_toplevel_sectioning
line a new problem arises that the separator is used but there is nothing before it.
(I had a bit forgotten the numfig
and numfig_secnum_depth
things which are bit complex in sphinx.writers.latex
.)
I see how to address the issue I raised via somewhat scary hack to get rid of an extra prefixed dot. (We would then use it also for chapter) Maybe you will come out with simpler way to address raised difficulty which would be better for long term maintenance.
I have pushed some own code which fixes the issues I had. Ideally some test should be modified so what we can check that for example using edit: both done in later commit. |
Ready to go. I don't think it is worthwile to add a (but maybe some CHANGES update when it gets merged after 8.0.0) Edit: On further thoughts I will add a latex doc as it seems necessary to explain what to do if string for html is not suitable for latex. |
@thfanning I have merged master, removed the disabling in preamble, and prepared CHANGES.rst for 8.1.0 release. Are you ok with current state of this PR? We could add a |
math_numsep
support to latex builder.math_numsep
support to latex builder.
math_numsep
support to latex builder.math_numsep
support to latex builder
Thanks for contribution! |
Subject:
math_numsep
support in LaTeX builderFeature or Bugfix
Purpose
math_numsep
support to latex builder.Detail
math_numsep
defines the text separator to use between section numbers and equation numbers.\renewcommand{\theequation}{\thesection-\arabic{equation}}
, but this is not viable due to the complexity in Sphinx's numbering.Relates