mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Escape underscore in citation labels for latex export
This commit is contained in:
@@ -382,7 +382,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
target = self.hypertarget(bi[2] + ':' + bi[3],
|
||||
withdoc=False)
|
||||
self.body.append(u'\\bibitem[%s]{%s}{%s %s}\n' %
|
||||
(bi[0], self.idescape(bi[0]), target, bi[1]))
|
||||
(self.encode(bi[0]), self.idescape(bi[0]), target, bi[1]))
|
||||
self.body.append(u'\\end{thebibliography}\n')
|
||||
self.bibitems = []
|
||||
|
||||
|
||||
@@ -43,3 +43,4 @@ References
|
||||
==========
|
||||
|
||||
.. [Ref1] Reference target.
|
||||
.. [Ref_1] Reference target 2.
|
||||
|
||||
@@ -240,6 +240,7 @@ Misc stuff
|
||||
Stuff [#]_
|
||||
|
||||
Reference lookup: [Ref1]_ (defined in another file).
|
||||
Reference lookup underscore: [Ref_1]_
|
||||
|
||||
.. seealso:: something, something else, something more
|
||||
|
||||
|
||||
Reference in New Issue
Block a user