From c6bd2f6d6959ca72845f127ef526fbbca398aed2 Mon Sep 17 00:00:00 2001 From: jfbu Date: Sun, 13 Jun 2021 18:34:06 +0200 Subject: [PATCH] Fix #9305 LaTeX: backslash in sphinxupquote error with Japanese --- CHANGES | 2 ++ sphinx/texinputs/sphinxlatexliterals.sty | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index fb19776cbf2..e75e38debcf 100644 --- a/CHANGES +++ b/CHANGES @@ -101,6 +101,8 @@ Bugs fixed * #9330: changeset domain: :rst:dir:`versionchanged` with contents being a list will cause error during pdf build * #9313: LaTeX: complex table with merged cells broken since 4.0 +* #9305: LaTeX: backslash may cause Improper discretionary list pdf build error + with Japanese engines Testing -------- diff --git a/sphinx/texinputs/sphinxlatexliterals.sty b/sphinx/texinputs/sphinxlatexliterals.sty index 4d0312fc653..d2ba89ea73f 100644 --- a/sphinx/texinputs/sphinxlatexliterals.sty +++ b/sphinx/texinputs/sphinxlatexliterals.sty @@ -765,7 +765,8 @@ % break at . , ; ? ! / \sphinxbreaksviaactive % break also at \ - \let\sphinx@textbackslash\textbackslash + \setbox8=\hbox{\textbackslash}% + \def\sphinx@textbackslash{\copy8}% \let\textbackslash\sphinxtextbackslash % by default, no continuation symbol on next line but may be added \let\sphinxafterbreak\sphinxafterbreakofinlineliteral