Dear G=E1bor,
[I need to fix my e-mail agent -- it doesn't reply to the list=20
automatically...]
BORGULYA G=E1bor wrote:
>=20
> Thank you for the tips. I need the new line feature, so I chose the fir=
st one:
>=20
>>For the newline to work you need to put it into a `parbox'. That might
>>solve the superscript problem too...
>=20
> Unfortunately I got error messages again:
>=20
> 1. The simplest version works:
>=20
>>>>c =3D pyx.canvas.canvas()
>>>>c.text(0, 0, r"1st Dec 1997", [pyx.text.parbox(4.0)])=20
>>>>c.writeEPSfile("Figure_1")
>=20
> OK
>=20
> 2. \\ (new line) does not work:
>=20
>>>>c =3D pyx.canvas.canvas()
>>>>c.text(0, 0, r"1st Dec \\ 1997", [pyx.text.parbox(4.0)])=20
>=20
> TexResultError: unhandled TeX response (might be an error)
> The expression passed to TeX was:
> ... *! Argument of \\ has an extra }.
>=20
> 3. \textsuperscript does not work either:
>=20
>>>>c =3D pyx.canvas.canvas()
>>>>c.text(0, 0, r"1\textsuperscript{st} Dec 1997", [pyx.text.parbox(4.0=
)])=20
>=20
> TexResultError: unhandled TeX response (might be an error)
> The expression passed to TeX was:
> ... *! Undefined control sequence.
Actually I wasn't aware of the "[pyx.text.parbox()]" feature! I always=20
use inline latex like this:
c.text(0, 0, r"\parbox{4em}{test \\ second line}")
This works for me also in labels etc... There was a thread on a related=20
topic a few days ago, you might want to have a look at that in the archiv=
e.
michael
|