From: Thomas B. <tho...@ho...> - 2021-06-22 18:11:53
|
I've used PyX happily for years, but I've recently noticed what seems to be a bug in text placement when using LaTeX for text processing. Here's my code: import pyx pyx.text.set(engine = pyx.text.TexEngine) c = pyx.canvas.canvas() c.text(0, 0, 'A') c.text(0, 0, 'B') c.writePDFfile('out.pdf') This produces the file attached as out_tex.pdf, with the A and B superimposed as I'd expect. However, if I change the engine specified in line 2 to pyx.text.LatexEngine then 1. I see the warning *ignoring special 'header=l3backend-dvips.pro <http://l3backend-dvips.pro>'* 2. The script produces the file attached as out_latex.pdf, with the A displaced downwards (and hence almost off the page). I'm using PyX 0.15, Python 3.9.5, TeX = TeX 3.14159265 (TeX Live 2020/Debian) and LaTeX = pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020/Debian), all running under Ubuntu 21.04. I believe that this issue appeared when I upgraded to Ubuntu 21.04, which may also have involved upgrades to some of these packages. Can anyone suggest what I can do to prevent this displacement of the text when using the LaTeX engine, please? Is this displacement related to the warning? Any advice welcomed, Thomas |