diff options
author | Georg Brandl <georg@python.org> | 2011-09-22 13:05:32 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-09-22 13:05:32 +0200 |
commit | 406f48d8b25a1874ad6c0f964ba6f8e19212f66d (patch) | |
tree | 12846f143c212ae94444d770062e00fe6af488e4 | |
parent | 1e9c35afc37b6561561f7564da379f66bc12f4d6 (diff) | |
parent | 215894d3e846535c39fb1caa7b3622e086aee169 (diff) | |
download | pygments-406f48d8b25a1874ad6c0f964ba6f8e19212f66d.tar.gz |
Merged in gribozavr/pygments-main-issue-683-2 (pull request #18)
-rw-r--r-- | pygments/formatters/latex.py | 2 |
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)} |