Hello Manuzhai,

On 15.10.07, Manuzhai wrote:
> There seems to be hardly any documentation on getting PyX to run on
> Windows. Since some other people on the mailing list have tried, it
> seems that it might not be entirely unsupported. Certainly, on my
> first attempt to generate one of the graphics I want to do, it worked
> fine on Windows as well. However, as soon as I added the text to it,
> it errored out:

> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "D:\Programs\Dev\Python\Lib\site-packages\pyx\canvas.py", line
> 309, in text
>     return self.insert(self.texrunner.text(x, y, atext, *args, **kwargs))
>   File "D:\Programs\Dev\Python\Lib\site-packages\pyx\text.py", line
> 1199, in text
>     self.execute(expr, self.defaulttexmessagesdefaultrun +
> self.texmessagesdefaultrun + texmessages)
>   File "D:\Programs\Dev\Python\Lib\site-packages\pyx\text.py", line
> 899, in execute
>     self.fontmap = dvifile.readfontmap(self.fontmaps.split())
>   File "D:\Programs\Dev\Python\Lib\site-packages\pyx\dvifile.py", line
> 386, in readfontmap
>     raise RuntimeError("cannot find font mapping file '%s'" % filename)
> RuntimeError: cannot find font mapping file 'psfonts.map'

The "psfonts.map" is a necessary ingredient of any TeX distribution I
know. It contains the information how to map the "internal" TeX fonts
to the actual files on your hard disk.

> I downloaded ProTexT (or however it's supposed to be capitalized), but
> that hasn't helped. Where am I supposed to get a psfonts.map file?

To make things short, you could remove ProTeXt and install TeXLive
(inside, there should be MikTeX for Windows). This is the standard
disrtibution of TeX.

If that does not work, there are some further testing methods to
fiddle around with later (there were some nasty MacOS threads about a
similar topic recently on this list).

> There was one other problem I ran into. One of the graphics I'm trying
> to build is rather large, but narrow, with these sizes taken from
> c.bbox():
> 
> (1.715765 t + 0.000000 u + 0.000000 v + 0.000000 w + 0.000000 x) m
> (8.852500 t + 0.000000 u + 0.000000 v + 0.000000 w + 0.000000 x) m
> 
> I wanted to have canvas that was basically the same size but with some
> margin, but I couldn't get that to work. The weird thing is that it
> works when I just use document.paperformat.A0 with fittosize, but when
> I specify another size that is closer to the dimensions I actually
> (especially with a more fitting width/height ratio), fittosize seizes
> to work and, while I get no errors, my output PDF appears empty.

The empty PDF is strange and should not occur. Are you sure that you
specify the paperformat dimensions in the correct way? You can also
explicitly state the bounding box (including manually added margins)
when writing the canvas into a file. Did you try that?

Michael.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to