diff --git a/CHANGES b/CHANGES index 7e343b8825..4ce090ac06 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ Release 0.5.2 (in development) ============================== +* Prevent double hyphens becoming en-dashes in literal code in + the LaTeX output. + * Open literalinclude files in universal newline mode to allow arbitrary newline conventions. diff --git a/sphinx/latexwriter.py b/sphinx/latexwriter.py index bfc9165acd..2f871a5cd4 100644 --- a/sphinx/latexwriter.py +++ b/sphinx/latexwriter.py @@ -978,7 +978,9 @@ class LaTeXTranslator(nodes.NodeVisitor): raise nodes.SkipNode def visit_literal(self, node): + self.no_contractions += 1 content = self.encode(node.astext().strip()) + self.no_contractions -= 1 if self.in_title: self.body.append(r'\texttt{%s}' % content) elif node.has_key('role') and node['role'] == 'samp':