Paul Libbrecht wrote:
Alan, Ricardo,
what's on
i2geo.net will be published soon. It's just a macro and a
javascript embedding and uses the MathTran server.
The syntax? real LaTeX, which is indeed running at
mathtran.org. No own
macros though.
That also means it's full LaTeX contrary to most latex-imitators (but
which, often, can do mathml for example).
We should be announcing this in a few days... probably starting as a
jira issue that contains the jar.
It may take a fair more time to get high-quality printouts though...
i.e. either that someone works on the print-channel-through tex (which
is fragile because tex is a very old system) or that we work out on the
dvi inclusion in the print channel.
Hi,
We're currently using FOP to generate PDFs. FOP cannot use DVIs (at
least not currently, with the available external resource plugins). It
does support some EPS.
However, using the TeX system brings some problems:
- there is a dependency on an external tool, as we cannot bundle a TeX
system.
- TeX is pretty slow. If it is used only for generating the PDF export
of a wiki document with few equations, then that is not a major issue,
since exporting PDF is not something frequently done. But imagine using
it for displaying a document with several equations (>20), and how long
it would take to make 20 shell commands to start TeX, generate the eps
files, load those files from the disk, and send them to the client. No
way this would work without a proper cache.
Another way to generate nice graphics from LaTeX equations is by
combining these tools: one that converts LaTeX to MathML, and one that
converts MathML to something else.
The first tool is needed as LaTeX is not quite an open standard. There
is only one fully supported compiler, and it has limitations. On the
other hand, MathML is interesting even as a final equation format, as
some browsers have support for it, although with some problems. But
there are many tools that work with MathML, viewers, editors, converters...
Two candidates I found during a small Google session:
http://math.etsu.edu/LaTeXMathML/LaTeXMathML.js -> LaTeX => MathML
converter in JavaScript. The code should be converted to Java, so that
the whole process can be done in the native language for XWiki.
http://jeuclid.sourceforge.net/ -> MathML multipurpose tool. among
others, it has a MathML => PNG converter, and a FOP plugin to directly
support MathML in the XML source, which are preserved in the generated
PDF. This means that we don't need to separately convert equations into
something else and then include some images in the PDF, but we can use
one XML file that contains all the XHTML source and the MathML equations.
These tools can be combined into a Radeox filter + macro. The filter
allows a fast syntax, like $$\sum(i)$$, while the macro allows some
customization, like
{latex:align=right|zoom=2|background=yellow}\sum(i){latex}
Another TeX=>MML converter I found is BlahTeXML, but it is written in C.
And the code is not so comprehensible, so porting it to java will be
harder. However, by comparing the size of blah and the js converter
above, I'd say that probably blah does a better job at the conversion.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/