Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Gert Ingold <gert.ingold@ph...>  20070414 20:05:09
Attachments:
application/pgpsignature

Hello, when using the Times font in mathmode, it seems that there is a difference between the output of PyX and that of (pdf)LaTeX. In the following two examples, PyX0.9 will produce an upright psi (at least on my machine) while (pdf)LaTeX produces a slanted psi (which is correct). The problem seems to be restricted to greek letters. What is the reason for this difference? Best regards, Gert #=3D=3D=3D=3D test.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D from pyx import * text.set(mode=3D"latex") text.preamble(r"\usepackage{mathptmx}") c =3D canvas.canvas() c.text(0,0, r"$\psi$") c.writeEPSfile("test") #=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D %=3D=3D=3D=3D test.tex =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D \documentclass{article} \usepackage{mathptmx} \begin{document} $\psi$ \end{document} %=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 GertLudwig Ingold email: Gert.Ingold@... Institut f=FCr Physik Phone: +498215983234 Universit=E4t Augsburg Fax : +498215983222 D86135 Augsburg WWW : http://www.physik.uniaugsburg.de/theo1/ingold Germany PGP : 86FF5A93, key available from homepage 
From: Michael SCHINDLER <mschindler@us...>  20070415 15:29:45

Bonjour Gert, On 14.04.07, Gert INGOLD wrote: > when using the Times font in mathmode, it seems that there is a difference > between the output of PyX and that of (pdf)LaTeX. In the following two > examples, PyX0.9 will produce an upright psi (at least on my machine) while > (pdf)LaTeX produces a slanted psi (which is correct). The problem seems to > be restricted to greek letters. What is the reason for this difference? As far as I understand the code in dvifile.py, the slanting or fonts with the mechanism provided by the font mapping file is not implemented at all. In case of the psi the font is a virtual one, which is found in my psfonts.map file as psyro StandardSymL ".167 SlantFont" <usyr.pfb You say that the problem is restricted to the gree letters. Do you have an example which works and uses the same slanting mechanism? Cordialement Michael. 
From: Gert Ingold <gert.ingold@ph...>  20070415 16:00:39
Attachments:
application/pgpsignature

Salut Michael, > You say that the problem is restricted to the gree letters. Do you > have an example which works and uses the same slanting mechanism? I thought so but it is actually not true. Replacing "\psi" by "a" does work but the reason is that in this case the italic font is used and not the slanted one (I should have noticed the difference immediately...). Asking for a slanted "a" indeed results in an upright "a". So, your analysis of the problem is correct. The way out is probably that I do the slanting myself in my PyX program... Merci bien pour la reponse, Gert =20 GertLudwig Ingold email: Gert.Ingold@... Institut f=FCr Physik Phone: +498215983234 Universit=E4t Augsburg Fax : +498215983222 D86135 Augsburg WWW : http://www.physik.uniaugsburg.de/theo1/ingold Germany PGP : 86FF5A93, key available from homepage 
From: William Henney <w.henney@as...>  20070415 17:03:02

Hi Gert On 4/15/07, Gert Ingold <gert.ingold@...> wrote: > I thought so but it is actually not true. Replacing "\psi" by "a" does wo= rk > but the reason is that in this case the italic font is used and not the > slanted one (I should have noticed the difference immediately...). Asking > for a slanted "a" indeed results in an upright "a". So, your analysis of > the problem is correct. The way out is probably that I do the slanting > myself in my PyX program... I can't help you with solving your problem with mathptmx, but a possible workaround is to use txfonts instead. Using this in your pyx example gives me correct results (the same as with latex). There are some issues with txfonts, particularly with kerning of sub/superscripts in some cases, but it is possible these might not affect you. Cheers Will =20 Dr William Henney, Centro de Radioastronom=EDa y Astrof=EDsica, Universidad Nacional Aut=F3noma de M=E9xico, Campus Morelia 
From: Gert Ingold <gert.ingold@ph...>  20070415 17:58:54
Attachments:
application/pgpsignature

Hi Will, > I can't help you with solving your problem with mathptmx, but a > possible workaround is to use txfonts instead. Using this in your pyx thanks for this useful hint. The txfonts are slightly different from Times but most people won't notice, so this is indeed an option which I will consider. Slanting the characters with PyX is not difficult but apart from single greek characters the figure contains also a "ket" which consists of a sequence of unslanted/slanted/unslanted characters. Before using mathptmx and doing the kerning by hand, I might just use txfonts. So thanks again, Gert =20 GertLudwig Ingold email: Gert.Ingold@... Institut f=FCr Physik Phone: +498215983234 Universit=E4t Augsburg Fax : +498215983222 D86135 Augsburg WWW : http://www.physik.uniaugsburg.de/theo1/ingold Germany PGP : 86FF5A93, key available from homepage 
Sign up for the SourceForge newsletter:
No, thanks