[LaTeX] Legitimate math input such as \mathbf{\Lambda}
is ok with pdflatex and uplatex, not with xelatex or lualatex
#12714
Labels
\mathbf{\Lambda}
is ok with pdflatex and uplatex, not with xelatex or lualatex
#12714
Describe the bug
PDF is wrong if sources contain usage of
\mathbf
with the uppercase Greek control sequences in math mode, andlatex_engine
is set to'xelatex'
or'lualatex'
. It is ok with default ('pdflatex'
) or Japanese documents.Rendering is ok with HTML+MathJaX or also with HTML+math-as-images (
html_math_renderer='imgmath'
).How to Reproduce
and
latex_engine='xelatex'
.Expected output is
Environment Information
Sphinx extensions
No response
Additional context
As explained in sympy/sympy#26877 (comment) the cause of the problem is our
\usepackage{fontspec}
. Arguably it should be\usepackage[no-math]{fontspec}
. Theno-math
preventsfontspec
from redefining\mathrm
,\mathbf
etc... to use the body text fonts. Only the legacy Old TeX font config can allow the latter commands to work on\Lambda
et al (they do nothing on lowercase Greek letters, it is only the matter of the eleven uppercase Greek letters defined by TeX with associated control sequences).The text was updated successfully, but these errors were encountered: