summaryrefslogtreecommitdiff
path: root/sphinx/writers/latex.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-09-22 18:44:33 +0200
committerGeorg Brandl <georg@python.org>2011-09-22 18:44:33 +0200
commit7c6e3855058f3ff3e95aefa0a3f13205b73f9d18 (patch)
treedf4de7aa28fa0fefd83776f070def9e48d441b9f /sphinx/writers/latex.py
parent0e0965209d6aed963db511218bb04be6e6fe45bb (diff)
downloadsphinx-git-7c6e3855058f3ff3e95aefa0a3f13205b73f9d18.tar.gz
Fix #613: Allow Unicode characters in production list token names.
Diffstat (limited to 'sphinx/writers/latex.py')
-rw-r--r--sphinx/writers/latex.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py
index ef8943aee..1418dc276 100644
--- a/sphinx/writers/latex.py
+++ b/sphinx/writers/latex.py
@@ -272,7 +272,8 @@ class LaTeXTranslator(nodes.NodeVisitor):
return '\\autopageref*{%s}' % self.idescape(id)
def idescape(self, id):
- return str(unicode(id).translate(tex_replace_map))
+ return unicode(id).translate(tex_replace_map).\
+ encode('ascii', 'backslashreplace').replace('\\', '_')
def generate_indices(self):
def generate(content, collapsed):