On 08/26/2011 02:32 AM, Ole Jacob Hagen wrote:
Hi,
I'm about to implement a TeX interpreter for the graphical backend to
GNU Octave (http://www.octave.org). The rendering is in OpenGL context.
As I understand it, matplotlib doesn't use OpenGL at all?
Not at present -- though various people are working on it.
Could you tell me about the design and work flow for the Tex/Latex
interpreter and rendering system for TeX/Latex fonts?
There are two. One is a Python reimplementation of part of the TeX math
algorithms called "mathtext" (I am the original author). It uses
Truetype versions of either the Computer Modern fonts or the STIX
fonts. It is able to produce either raster images or data that is then
used by the matplotlib backends to generate PS, PDF, SVG etc.
The other approach is used when "text.usetex" is True. It calls out to
a real "tex" interpreter and then interprets the DVI it produces to
convert it into a form the matplotlib backends can use. Since I didn't
write this code, I'm not as familiar with the details.
In the case of OpenGL, since you only want images anyway, you may be
best off using a tool like dvipng along with the preview LaTeX package,
if having "real" LaTeX as a dependency is acceptable.
Mike
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users