Fixed #1798: Fix building LaTeX with references in titles.

This commit is contained in:
Georg Brandl 2015-07-25 19:02:09 +02:00
parent d3375761d2
commit 29dc6976b2
2 changed files with 8 additions and 8 deletions

View File

@ -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)

View File

@ -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