Fix #2094 rubric with reference not working in Latex

This commit is contained in:
Takeshi KOMIYA 2015-12-03 14:48:00 +09:00
parent c8837338d3
commit 8648bdeec1
4 changed files with 6 additions and 0 deletions

View File

@ -5,6 +5,7 @@ Bugs fixed
----------
* #2134 Fix figure caption with reference causes latex build error
* #2094 Fix rubric with reference not working in Latex
Release 1.3.3 (released Dec 2, 2015)

View File

@ -749,8 +749,10 @@ class LaTeXTranslator(nodes.NodeVisitor):
raise nodes.SkipNode
self.body.append('\\paragraph{')
self.context.append('}\n')
self.in_title = 1
def depart_rubric(self, node):
self.in_title = 0
self.body.append(self.context.pop())
def visit_footnote(self, node):

View File

@ -17,4 +17,6 @@ The section with a reference to [AuthorYear]_
* - Content
- Content
.. rubric:: The rubric title with a reference to [AuthorYear]_
.. [AuthorYear] Author, Title, Year

View File

@ -331,3 +331,4 @@ def test_reference_in_caption(app, status, warning):
'{\\hyperref[index:authoryear]{\\emph{{[}AuthorYear{]}}}}.}' in result)
assert '\\chapter{The section with a reference to {[}AuthorYear{]}}' in result
assert '\\caption{The table title with a reference to {[}AuthorYear{]}}' in result
assert '\\paragraph{The rubric title with a reference to {[}AuthorYear{]}}' in result