summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-09-22 13:05:32 +0200
committerGeorg Brandl <georg@python.org>2011-09-22 13:05:32 +0200
commit406f48d8b25a1874ad6c0f964ba6f8e19212f66d (patch)
tree12846f143c212ae94444d770062e00fe6af488e4
parent1e9c35afc37b6561561f7564da379f66bc12f4d6 (diff)
parent215894d3e846535c39fb1caa7b3622e086aee169 (diff)
downloadpygments-406f48d8b25a1874ad6c0f964ba6f8e19212f66d.tar.gz
Merged in gribozavr/pygments-main-issue-683-2 (pull request #18)
-rw-r--r--pygments/formatters/latex.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/formatters/latex.py b/pygments/formatters/latex.py
index d658e7ca..e109ebdd 100644
--- a/pygments/formatters/latex.py
+++ b/pygments/formatters/latex.py
@@ -286,7 +286,7 @@ class LatexFormatter(Formatter):
cp = self.commandprefix
styles = []
for name, definition in self.cmd2def.iteritems():
- styles.append(r'\def\%s@tok@%s{%s}' % (cp, name, definition))
+ styles.append(r'\expandafter\def\csname %s@tok@%s\endcsname{%s}' % (cp, name, definition))
return STYLE_TEMPLATE % {'cp': self.commandprefix,
'styles': '\n'.join(styles)}