From b99c2f8a9d74419049cd6134465de7f570f0945f Mon Sep 17 00:00:00 2001 From: jfbu Date: Sat, 15 Dec 2018 14:58:26 +0100 Subject: [PATCH] LaTeX: prevent LuaLaTeX from applying TeX ligatures (>>, <<,...) Closes: #5179 --- CHANGES | 2 ++ sphinx/writers/latex.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 6434cc3a7..2f6ff83a9 100644 --- a/CHANGES +++ b/CHANGES @@ -108,6 +108,8 @@ Bugs fixed * #5248: LaTeX: Greek letters in section titles disappear from PDF bookmarks * #5772: LaTeX: should the Bjarne style of fncychap be used for English also if passed as language option? +* #5179: LaTex: (lualatex only) escaping of ``>`` by ``\textgreater{}`` is not + enough, ``\textgreater{}\textgreater{}`` applies TeX-ligature Testing -------- diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 7eb0317d9..c656fe6a3 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -207,7 +207,8 @@ ADDITIONAL_SETTINGS = { 'latex_engine': 'lualatex', 'polyglossia': '\\usepackage{polyglossia}', 'babel': '', - 'fontenc': '\\usepackage{fontspec}', + 'fontenc': ('\\usepackage{fontspec}\n' + '\\defaultfontfeatures[\rmfamily,\sffamily]{}'), 'fontpkg': LUALATEX_DEFAULT_FONTPKG, 'textgreek': '', 'utf8extra': ('\\catcode`^^^^00a0\\active\\protected\\def^^^^00a0'