[Formed-commits] r339 - in trunk: . formed/formed/plugins/export
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Oct 7 16:02:00 CEST 2009
Author: frank
Date: 2009-10-07 16:02:00 +0200 (Wed, 07 Oct 2009)
New Revision: 339
Modified:
trunk/ChangeLog
trunk/formed/formed/plugins/export/latex.py
Log:
formed/formed/plugins/export/latex.py:
Adjusted textprocessing to escape tex-active characters.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-10-07 10:00:49 UTC (rev 338)
+++ trunk/ChangeLog 2009-10-07 14:02:00 UTC (rev 339)
@@ -1,3 +1,8 @@
+2009-10-07 Frank Koormann <frank.koormann at intevation.de>
+
+ * formed/formed/plugins/export/latex.py:
+ Adjusted textprocessing to escape tex-active characters.
+
2009-10-07 Sascha L. Teichmann <teichmann at intevation.de>
* formed/formed/plugins/export/html.py, formed/formed/plugins/export/latex.py,
Modified: trunk/formed/formed/plugins/export/latex.py
===================================================================
--- trunk/formed/formed/plugins/export/latex.py 2009-10-07 10:00:49 UTC (rev 338)
+++ trunk/formed/formed/plugins/export/latex.py 2009-10-07 14:02:00 UTC (rev 339)
@@ -56,7 +56,7 @@
\\end{longtable}}
'''
-def texize(s): return s.replace('$','\\$').replace('_','\\_').replace('%','\\%').replace('~','\\url{~}').replace('"','\\url{"}').replace('^','\\url{^}').replace('#','\\#')
+def texize(s): return s.replace('&','\\&').replace('$','\\$').replace('_','\\_').replace('%','\\%').replace('~','\\url{~}').replace('"','\\url{"}').replace('^','\\url{^}').replace('#','\\#')
def esc(s):
@@ -64,8 +64,8 @@
return ""
def fillRow(k, field = ""):
- c = [esc(i) for i in k]
- return texize("" + " & ".join(c)) + ("\\\\ %s\n \\hline" % field )
+ c = [texize(esc(i)) for i in k]
+ return "" + " & ".join(c) + ("\\\\ %s\n \\hline" % field )
def getAnonymizeType(name):
if name:
More information about the Formed-commits
mailing list