diff --git a/CHANGES b/CHANGES index 9817fcb1e..b3687b707 100644 --- a/CHANGES +++ b/CHANGES @@ -37,13 +37,9 @@ Bugs fixed * #1923: Use babel features only if the babel latex element is nonempty. * #1942: Fix a KeyError in websupport. * #1903: Fix strange id generation for glossary terms. -* #1796, On py3, automated .mo building cause UnicodeDecodeError -* Fix: ``make text`` will crush if a definition list item has more than 1 classifiers as: -* #1796: On py3, automated .mo building cause UnicodeDecodeError -* ``make text`` will crush if a definition list item has more than 1 classifiers as: -* Fixed #1855: make gettext generates broken po file for definition lists with classifier. - ``term : classifier1 : classifier2``. +* Fix: ``make text`` will crash if a definition list item has more than 1 classifiers. * #1855: make gettext generates broken po file for definition lists with classifier. +* #1798: Fix building LaTeX with references in titles. Release 1.3.1 (released Mar 17, 2015) diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 5d175eae6..75751c88e 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -1706,11 +1706,15 @@ class LaTeXTranslator(nodes.NodeVisitor): classes = node.get('classes', []) if classes in [['menuselection'], ['guilabel']]: self.body.append(r'\emph{') + self.context.append('}') + elif classes and not self.in_title: + self.body.append(r'\DUspan{%s}{' % classes) + self.context.append('}') else: - self.body.append(r'\DUspan{%s}{' % ','.join(classes)) + self.context.append('') def depart_inline(self, node): - self.body.append('}') + self.body.append(self.context.pop()) def visit_generated(self, node): pass