This plugin translates embedded LaTeXlike equations into inline MathML. It requires a MathML enabled browser, such as Mozilla.
See TWiki:Codev.MathMarkup for some Javascriptonly clientside alternatives.
The syntax rules for embedding equations are identical to those of the TWiki:Plugins.MathModePlugin and are based on LaTeX's own markup for equations. The equations themselves are expressed in a language very, very similar to LaTeX called itex2MML. (Apparently the major differences are in the way equation arrays are handled.)
To put an equation inline with your text, enclose it with percent signs and the dollar sign,
%$ put your math here $%for example:
%$ \frac{\partial u}{\partial x} = U(x) $%where the opening and closing delimiter must be on the same line.
For equations set on their own line, use the
%\[ put your math here \]%notation, for example:
%\[ \frac{\partial u}{\partial x} = U(x) \]%and the font will be slightly larger.
For equations written over several lines in the original TWiki document you use the %MATHMODE{ "a=b" }%
delimiter. The value in quotes is type set, whether or not it is on a single line. However, unlike the other delimiters, this is also typeset in <pre> environments.
%$ \sum_{n=1}^\infty \frac{1}{n} $% is divergent, but %$ \lim_{n \to \infty}\sum_{i=1}^n \frac{1}{i}  \ln n $% exists.
This is an %$\frac{\partial u}{\partial x} = U(x)$% inline equation.
This equation %\[\frac{\partial u}{\partial x} = \pi \int_a^b F(x) dx\]% should be typset on its own line.
This equation %MATHMODE{" \frac{\partial u}{\partial x} = \omega \int_a^b F(x) dx "}% is broken over several lines of source text.
Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%
, i.e. %LATEXTOMATHMLPLUGIN_SHORTDESCRIPTION%
data/debug.txt
)
Note: You do not need to install anything on the browser to use this plugin (although your browser must be capable of displaying MathML). The following instructions are for the administrator who installs the plugin on the TWiki server.
DISABLEDPLUGINS
line of your Main.TWikiPreferences page. For example:
twiki.pattern.tmpl
template in the TWiki installation, in the ./templates
directory, or in the subdirectory of any Web that will use this plugin. The line <!DOCTYPE html PUBLIC "//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1transitional.dtd">
<!DOCTYPE html PUBLIC "//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
<literal> "http://www.w3.org/Math/DTD/mathml2/xhtmlmath11f.dtd" [
<!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
]></literal>
LaTeXToMathMLPlugin.zip
in your twiki installation directory. Content: File:  Description: 

data/TWiki/LaTeXToMathMLPlugin.txt  Plugin topic 
pub/TWiki/LaTeXToMathMLPlugin/xhtmlmath11f.dtd  XML DTD for XHTML 1.1 and MathML 
lib/TWiki/Plugins/LaTeXToMathMLPlugin.pm  Plugin Perl module 
configure
in your TWiki installation, and enable the plugin in the {Plugins} section.
itex2MML
on the default path, edit the line of LaTeXToMathMLPlugin.pm
that reads: my $itex2MML = 'itex2MML';to contain the whole path to the executable. For example:
my $itex2MML = '/usr/local/bin/itex2MML';
pub/
directories. application/xhtml+xml
for the MathML portion to be rendered correctly. This can pose some challenges for existing TWiki installations with less than tidy XHTML. xfs
, the X11 font server that uses Xft. For Mozilla versions before 1.4 (assuming this gets fixed in 1.4) you have to set the environment variable setenv GDK_USE_XFT 0to enable the correct rendering of the TeX Computer Modern fonts. You may also need to install those fonts, as noted on the MathML project fonts page.
Plugin Author:  TWiki:Main.SimonClift 
Copyright:  © 2003 TWiki:Main.SimonClift © 20082011 TWiki:TWiki.TWikiContributor 
License:  GPL (GNU General Public License) 
Plugin Version:  20110317 
Change History:  
20110315:  TWikibug:Item6638: Doc fixes; code fixes & cleanup (page content was shown twice); changing TWIKIWEB to SYSTEMWEB  TWiki:Main.PeterThoeny 
20030415:  Initial version 
CPAN Dependencies:  none 
Other Dependencies:  itex2MML 
Perl Version:  5.005 
Plugin Home:  http://TWiki.org/cgibin/view/Plugins/LaTeXToMathMLPlugin 
Feedback:  http://TWiki.org/cgibin/view/Plugins/LaTeXToMathMLPluginDev 
Related Topics: TWikiPreferences, TWikiPlugins, TWiki:Plugins/MathModePlugin
PackageForm  

TopicClassification  PluginPackage 
TestedOnTWiki  6.0, 5.1, 5.0, 4.3, 4.2, 4.1, 4.0.0, 01 Feb 2003 
TestedOnOS  OsLinux 
ShouldRunOnOS  AnyUnix 
InstalledOnTWikiOrg  No 
DemoUrl 

DevelopedInSVN  Yes 
ModificationPolicy  PleaseFeelFreeToModify 
RelatedTopics 

I  Attachment  History  Action  Size  Date  Who  Comment 

md5  LaTeXToMathMLPlugin.md5  r3 r2 r1  manage  0.2 K  20110318  06:13  PeterThoeny  
tgz  LaTeXToMathMLPlugin.tgz  r3 r2 r1  manage  73.6 K  20110318  06:13  PeterThoeny  
zip  LaTeXToMathMLPlugin.zip  r4 r3 r2 r1  manage  76.1 K  20110318  06:13  PeterThoeny  
EXT  LaTeXToMathMLPlugin_installer  r2 r1  manage  3.5 K  20110318  06:13  PeterThoeny 