|
From: Darren D. <dd...@co...> - 2005-05-24 21:22:36
|
On Tuesday 17 May 2005 6:44 pm, John Hunter wrote: > The LaTeX backend generates a *.eps file and a *.tex file. You can > then latex and dvips the tex file to get a true ps, or just embed the > generated latex commands directly into your document. This uses latex > for all text elements, giving a unified font look and feel. > > Here is an example > > > python examples/tex_demo.py -dLaTeX > > latex tex_demo.tex > > dvips -o tex_demo.ps tex_demo.dvi > > ggv tex_demo.ps > > There are a few problems > > * the page width and figure placement in the latex document are off > center Maybe not. If you use a latex centering environment, I think the figure is= =20 centered. Even in a centering environment, it may still appear to be off=20 center, since the axes+labels may not have been centered in the figure wind= ow=20 in the first place. =20 > * the text color is not being respected =46ixed in cvs. > * to get the width and height of the string, I tex the individual > strings separately, run dvips on them, and get the bounding box > from the generated file. This all happens with caching in > matplotlib.texmanager. Right now the fontsize is being ignored in > this process so the layout will be off for nonstandard font sizes > -- anything other than the default design size of latex which > defaults to 10pt I think. This really is fixed now, for both horizontal and vertical alignment. > * the text doesn't scale right if you provide a size arg to > includegraphics, eg [width=3D4.in] This is expected behavior for PSfrag. You should instead wrap \includegraph= ics=20 in either a \resizebox or a \scalebox to rescale the text with the figure.= =20 It looks like tex_demo.py, without caching, takes about 30% longer with LaT= eX=20 than it does for Tex (3 seconds vs 2.3 seconds on my computer). So CVS is=20 back to using TeX. We may want to include a link (or a copy) of this pdf on= =20 the MPL website: http://www.csit.fsu.edu/~mimi/tex/tex-refcard.pdf, the=20 source declares it to be freely distributed. Darren |