Protect TeX double quotes ligatures in inline literals (refs #3507)

This commit is contained in:
jfbu 2017-03-07 22:20:11 +01:00
parent 38b38d8aff
commit 71e1642749
2 changed files with 7 additions and 1 deletions

View File

@ -1243,6 +1243,10 @@
\protected\def\sphinxstyleabbreviation {\textsc}
\protected\def\sphinxstyleliteralintitle {\sphinxcode}
% LaTeX writer uses macros to hide double quotes from \sphinxcode's \@noligs
\protected\def\sphinxquotedblleft{``}
\protected\def\sphinxquotedblright{''}
% stylesheet for highlighting with pygments
\RequirePackage{sphinxhighlight}

View File

@ -2209,7 +2209,9 @@ class LaTeXTranslator(nodes.NodeVisitor):
def visit_Text(self, node):
text = self.encode(node.astext())
if not self.no_contractions and not self.in_parsed_literal:
text = educate_quotes_latex(text)
text = educate_quotes_latex(text,
dquotes=("\\sphinxquotedblleft{}",
"\\sphinxquotedblright{}"))
self.body.append(text)
def depart_Text(self, node):