|
From: Brett C. <br...@co...> - 2003-09-19 20:15:37
|
> >
> > Is it not possible to include them in the distro?
>
> Hmm, I don't think that makes much sense, they have to match
> your distribution. However, I forget to mention that
> you have to tell the setup.py script where it has to look for
> the header and library files. This can be done
> via a setup.cfg file (in the same directory as setup.py) which
> contains
>
> [build_ext]
> include_dirs=path-to-your-MikTeX-include-files
> library_dirs=path-to-your-MikTeX-library-filesa
>
I got the whole Miktex distro -- I'll have a look at getting it going later.
It doesn't look like the includes & libs are the same as you have specified.
>
> > >
> > > > 4. temporary .dvi files are left around the place.
> > >
> > > Is this always the case, or only if PyX exits with an exception?
> > >
> >
> > No, they get left around even if everything works.
>
> Hmm. What files precisely?
Let me get back to you on this.
>
> > I use the mathpazo package (palatino with math) all the time.
> > I tried it in the hello.py example after the from pyx import *
> >
> >
> > X:\pyx\examples>python hello.py
> > Traceback (most recent call last):
> > File "hello.py", line 2, in ?
> > text.preamble(r"\usepackage{mathpazo}")
> > File "c:\python23\Lib\site-packages\pyx\text.py", line 2230, in
preamble
> > self.execute(expr, *args)
> > File "c:\python23\Lib\site-packages\pyx\text.py", line 2068, in
execute
> > raise TexResultError("unhandled TeX response (might be an error)",
self)
> > pyx.text.TexResultError: unhandled TeX response (might be an error)
> > The expression passed to TeX was:
> > \usepackage{mathpazo}%
> > \PyXInput{5}%
> > After parsing the return message from TeX, the following was left:
> > *! Undefined control sequence.
> > <*> \usepackage
> > {mathpazo}%
>
> Ah, you are in TeX mode, where \usepackage does not exist. Please
> tell PyX to switch to LaTeX by including
>
> text.set(mode="latex")
>
Getting better, but still no luck. sorry, I just don't know the font stuff
in latex well enough to guess what is going on.
X:\pyx\examples>cat hello.py
from pyx import *
text.set(mode="latex")
text.preamble(r"\usepackage{times}")
c = canvas.canvas()
c.text(0, 0, "Hello, world!")
c.stroke(path.line(0, 0, 2, 0))
c.writetofile("hello")
X:\pyx\examples>python hello.py
Traceback (most recent call last):
File "hello.py", line 7, in ?
c.writetofile("hello")
File "c:\python23\Lib\site-packages\pyx\canvas.py", line 936, in
writetofile
for pritem in self.prolog():
File "c:\python23\Lib\site-packages\pyx\canvas.py", line 661, in prolog
result.extend(cmd.prolog())
File "c:\python23\lib\site-packages\pyx\text.py", line 1784, in prolog
return result + self.texrunner.prolog(self.dvinumber, self.page)
File "c:\python23\lib\site-packages\pyx\text.py", line 2090, in prolog
self.getdvi()
File "c:\python23\lib\site-packages\pyx\text.py", line 2084, in getdvi
self.dvifiles.append(DVIFile(dvifilename, debug=self.dvidebug))
File "c:\python23\lib\site-packages\pyx\text.py", line 689, in __init__
self.readfile()
File "c:\python23\lib\site-packages\pyx\text.py", line 1091, in readfile
state = self._read_page()
File "c:\python23\lib\site-packages\pyx\text.py", line 1049, in _read_page
file.read(file.readuchar()+file.readuchar()))
File "c:\python23\lib\site-packages\pyx\text.py", line 777, in definefont
self.fonts[num] = Font(fontname, c, q, d, self.tfmconv, self.debug > 1)
File "c:\python23\lib\site-packages\pyx\text.py", line 520, in __init__
raise RuntimeError("no information for font '%s' found in font mapping
file,
aborting" % name)
RuntimeError: no information for font 'ptmr7t' found in font mapping file,
abort
ing
If I look at the keys in 'fontmap' with 'pt', I only see these:
ptmb8r
ptmb8y
ptmbi8r
ptmbi8y
ptmbo8r
ptmbo8y
ptmr8r
ptmr8rn
ptmr8y
ptmri8r
ptmri8y
ptmro8r
ptmro8y
ptmrr8re
Cheers,
Brett
|