[reportlab-users] Sample code for a math. formula flowable (using remote TeX)

Dinu Gherman gherman at darwin.in-berlin.de
Mon Jul 23 03:37:11 EDT 2007


Hi everybody!

Two weeks ago at EuroPython 2007 I met Jonathan Fine from Open Uni-
versity (UK) who gave a presentation about a web service named Math-
Tran [1] to generate mathematical formulas for HTML pages using TeX.
We talked about the usefulness of this also in the context of Report-
Lab and he asked me how simple that would really be with ReportLab
code.

As a proof of concept I then wrote a little test script (see attached
file plus PDF output). It's a simple ReportLab flowable subclass that
calls MathTran and renders as a bitmap formula image (using PIL in or-
der to handle the returned PNG).

It can be quite useful when you need such formulas in your documents,
especially if you don't have a local TeX installation to produce them
yourself. Of course, it would be even more useful if these formulas
could be used inside a paragraph line as in LaTeX, but as it seems
this would need some genius work on the Paragraph flowable.

If you have any further questions about MathTran, please contact Jo-
nathan Fine directly via email [2] (see also CC line), since he is
not subscribed to this list.

Regards,

Dinu

[1] http://www.mathtran.org
[2] http://www.mathtran.org/contact.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_mathtran.py
Type: application/applefile
Size: 76 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20070723/771b9d91/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_mathtran.py
Type: application/text
Size: 3200 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20070723/771b9d91/attachment-0001.bin>
-------------- next part --------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_mathtran.pdf
Type: application/pdf
Size: 7335 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20070723/771b9d91/attachment.pdf>
-------------- next part --------------



More information about the reportlab-users mailing list