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
sphinxupquote and textbackslash: Improper discretionary list. #9305
Comments
I can reproduce it with Sphinx 4.0.2. |
Thanks for report. I reduced it to a pure LaTeX minimal example. \documentclass{book}
%\usepackage[T1]{fontenc}
\usepackage{hyperref}
\begin{document}
\textbackslash\ DOES WORK
\let\savedtextbackslash\textbackslash
\savedtextbackslash\ DOES WORK
\discretionary{}{}{\savedtextbackslash} DOES WORK
\def\textbackslash{\discretionary{}{}{\savedtextbackslash}}%
BUT REDEFINED \textbackslash\ BREAKS IF T1 FONT ENCODING iS NOT LOADED
\end{document} Japanese Sphinx seems affected from a situation similar to the abvoe if not loading T1 font encoding. In fact the The infinite loop raises immediately I need to go into the guts of LaTeX so-called new font selection system which I have always considered ill-documented. The source code comments are antequated and one must fetch some information in the "LaTeX Companion" which is not free. EDITED: the above explanation about infinite loop appears now to me to be wrong. a.t.t.o.w I don't know the complete explanation. |
My explanation "infinite loop" was not correct, but there was some recursion. Rather than trying to fight with LaTeX macros, I have opted to save the backslash as a box. If you can, can you confirm #9305 fixes it for you? |
Fix #9305 LaTeX: backslash in sphinxupquote error with Japanese
Hi! Merci Jean-François ! What you did here looks like magic to me! At first glance, it fixes the issue (I just tried patching the Thanks! |
Merci pour la confirmation Julien ! Good that the xetex run worked too. I hope the patch will work on the full project with uplatex and hope some other problem does not pop up :) I was a bit confused in my comments. The |
Full build went "better", it does no longer hit the same error, so this error is fixed now, thanks a lot! |
Describe the bug
Related to: python/python-docs-ja#22
While trying to reproduce python/python-docs-ja#22 I was able to produce:
It is manually produced from
c-api.tex
from a cpython documentation japanese build, by manually bisecting the file to find a minimal reproducer.To Reproduce
/usr/bin/platex -kanji=utf8 -recorder foo.tex
Environment info
Additional context
I don't understand the error message, I don't know how to tell if it's a Sphinx issue (that should not have generated this) or a platex issue (that should understand this), sry.
The text was updated successfully, but these errors were encountered: