-
-
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: fix mark-up when \DUrole is used with multiple classes #12745
Conversation
For the record: I plunged into ancient Docutils history, and found out that the related changes happened in their projet at r5742 (Dec 1, 2008) with a syntax change such as -\docutilsrolevery{\docutilsrolespecial{interpreted text}}
+\DUspan{very,special}{interpreted text} and then r5862 (Jan 30, 2009) which removed - self.body.append(r'\DUspan{%s}{' %','.join(classes))
+ for cls in classes:
+ self.body.append(r'\DUrole{%s}{' % cls)
+ self.context.append('}' * (len(classes))) with an example syntax change such as - \DUspan{argA,argB,argC}{<content>}
+ \DUrole{argi}{\DUrole{argii}{\DUrole{arg-3}{<content>}}} This all happened between their Release 0.5 (2008-06-25) and their Release 0.6 (2009-10-11).1 Sphinx seems to have inherited the short-lived (never released) Footnotes
|
Fix sphinx-doc#12744 Conflicts: tests/test_builders/test_build_latex.py tests/test_directives/test_directive_code.py
I have rebased manually. Once tests complete and I have checked again the diff I will squash merge. |
Fix #12744
Relates
\DUrole
) #3207. It could have been opportunity then to use nested mark-up in output. I did not check probably using comma separated classes was there since origin. It may have evolved in Docutils after Sphinx had inherited it.This may be in all rigor breaking but I doubt very much people have customized LaTeX via
\DUrole
for simultaneous classes (the PR changes nothing when there is only one class) and anyhow it was never documented as possible so far.EDIT: when I say "breaking" I only mean by that that if someone for example has defined via
\@namedef
a LaTeX command\DUrolestd,std-ref
(where both comma and hyphen are part of the name) then this styling command will not be executed anymore as now only\DUrolestd
and\DUrolestd-ref
will be (if and only if they exist). The PDF build will not be broken in any way. And anyhow I would be very surprised someone has actually done that!.I rebased on tip of master now that master passes tests.