Contents
inline_latex
Description
The inline_latex parser allows you to have a markup extension for latex formulas inside the MoinMoin wiki parser
Download & Release Notes
Download |
Release Version |
Moin Version |
Release Notes |
|
1.7.2/1.8/1.9 |
|
this plugin is based on the mathran parser
Installation
For general installation instructions, see ParserMarket/InstallingParsers. This parser requires no special dependencies, such as outside Python libraries.
Usage
To use this parser, simply put #format inline_latex on top of your page
Example
#format inline_latex scale_factor=3, mathtran_server=http://www.mathtran.org/cgi-bin/toy/ $ \alpha $ is '''alpha'''
Copyright
Please give credits to mathtran
License
This parser is released under the terms of the GNU GPL.
Discussion
On MoinMoin 1.8.3 and using firefox 3, having the format line "#format inline_latex" defined in a document crashes the GUI Editor. (When saving some modifications or after clicking the Preview button, an exception PluginMissingError while searching for a valid converter module). The exception will happen after saving or previewing some text or tables pasted from MS Word to the GUI editor.
Problem with the \over binary operator: MoinMoin 1.8.3 - both lines display correctly in mathtran but not Latex. I will block quote both lines here to avoid braces problems, and only show the first line in the example.
$ y^2 \over 2 $ $ {{y^{2} } } \over 2 $
$ y^2 \over 2 $
$ y^2 \over 2 $
-- BoydBlackwell 2009-06-12 06:56:35
A problem
I have encountered a problem/difficulty with inline_latex. My code is:
#format inline_latex scale_factor=3, mathtran_server=http://www.mathtran.org/cgi-bin/toy/ The solution(s) to $ Ax^2+Bx+C=0; $ can be expressed: $ x =\frac {-B \pm \sqrt { B^2- 4 A C}}{2 A} $
which goes wrong as seen at [http://hpmail.dk/wiki/moin.cgi/InlineLatex]
If I instead use Mathtran-parser with the code:
The solution(s) to {{{#!text_x_mathtran scale_factor=3, mathtran_server=http://www.mathtran.org/cgi-bin/toy/ Ax^2+Bx+C=0; }}} can be expressed: {{{#!text_x_mathtran scale_factor=3, mathtran_server=http://www.mathtran.org/cgi-bin/toy/ x =\frac {-B \pm \sqrt { B^2- 4 A C}}{2 A} }}}
I get the expected result as seen at [http://hpmail.dk/wiki/moin.cgi/Mathtran]
I found the problem: inline_latex sends the complete latex string including $ at the beginning and the end of it to mathtran. Doing
word = word[1:len(word)-1]
at the beginning of _latex_formula_repl solves the problem.