diff data/plugin/parser/inline_latex.py @ 359:fbe7054d683e

inline_latex: argument passing to text_x_mathtran added
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Mon, 16 Feb 2009 22:12:18 +0100
parents 73775c708eba
children f57de7994cf6
line wrap: on
line diff
--- a/data/plugin/parser/inline_latex.py	Mon Feb 16 21:47:58 2009 +0100
+++ b/data/plugin/parser/inline_latex.py	Mon Feb 16 22:12:18 2009 +0100
@@ -25,14 +25,15 @@
         wiki.Parser.__init__(self, raw, request, **kw)
         self.formatter = request.formatter
         self.request = request
+        self.args = kw.get('format_args', '')
         self.mathtran_parser = wikiutil.importPlugin(self.request.cfg, 'parser', 'text_x_mathtran', 'Parser')
 
     def _latex_formula_repl(self, word, groups):
-        mp = self.mathtran_parser(word, self.request)
+        mp = self.mathtran_parser(word, self.request, format_args=self.args)
         if mp.init_settings:
             return mp.render(self.formatter)
 
     def _latex_formula_para_repl(self, word, groups):
-        mp = self.mathtran_parser(word, self.request)
+        mp = self.mathtran_parser(word, self.request, format_args=self.args)
         if mp.init_settings:
             return "%s%s%s" % (self.formatter.paragraph(1), mp.render(self.formatter), self.formatter.paragraph(0))