Hi,
On 02.12.06, Evgeniy Sharapov wrote:
> I have windows xp and python-2.5
> I do want to use PyX, but when I am doing any operation concerning text it
> fails as next ( though, for instance, arrow.py works just fine)
> TeX distribution is miktex 2.5
> Proably it's something with settings, but I can't figure out what is wrong.
> I have several psfonts.map files in
> "C:\Documents and Settings\All Users\Application Data\MiKTeX\2.5\"
First of all, the warnings from the psfonts.map are nasty, but they
shouldn't be of any problem. (We can come back to this point later.)
The real problem is that PyX can't properly communicate with LaTeX:
> ----
> Traceback (most recent call last):
> File "<pyshell#28>", line 1, in <module>
> text.preamble(r"\usepackage{times}")
> File "C:\Python25\lib\site-packages\pyx\text.py", line 1163, in preamble
> self.execute(expr, texmessages)
> File "C:\Python25\lib\site-packages\pyx\text.py", line 985, in execute
> self.defaulttexmessagesdocclass + self.texmessagesdocclass)
> File "C:\Python25\lib\site-packages\pyx\text.py", line 1034, in execute
> raise TexResultError("unhandled TeX response (might be an error)", self)
> TexResultError: unhandled TeX response (might be an error)
> The expression passed to TeX was:
> \documentclass{article}%
> \PyXInput{3}%
> After parsing the return message from TeX, the following was left:
> *
> *("C:\Program Files\miktex\tex\latex\base\article.cls"
> Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
> ("C:\Program Files\miktex\tex\latex\base\size10.clo"))
>
> (cut after 5 lines, increase errordebug for more output)
So far it doesn't even look too bad: I guess the only problem is, that
PyX does not understand the files in quotes, which might be a result
of the spaces in the directory name "Program Files".
For the moment I would suggest to disable some of the very strict
checks PyX does when analysing LaTeX's output. Take the following
minimal example:
from pyx import *
#text.set(mode="latex")
#text.set(mode="latex", texmessagesdocclass=[text.texmessage.ignore])
c = canvas.canvas()
c.text(0, 0, "Hello, world!")
c.writeEPSfile("hello")
Now try the following:
a) Does it work in the form stated above? (I would guess so.)
b) Does it work when you uncomment the first text.set line?
(I would guess that it failes for that case.)
c) Does it work when you uncomment the second text.set line?
(It might already work again for that case. However I think we
need some other text.texmessage.ignore things to make it working
for all cases (loading of fd-files and other similar things ... in
the end the proper solution would be to improve the
text.texmessage.load texmessage parser to properly handle spaces in
file names.)
So far it would be great to try out my suggestions and tell me whether
things are like what I guess. So far it's just a guess. Once we know
we catched the problem we can start thinking about a proper solution.
Best,
André
--
by _ _ _ Dr. André Wobst
/ \ \ / ) [EMAIL PROTECTED], http://www.wobsta.de/
/ _ \ \/\/ / PyX - High quality PostScript and PDF figures
(_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user