From: Guenter J. <ne...@gm...> - 2008-11-13 09:48:43
|
Hello, I also have the same problem: using other fonts than CM in "latex" mode on Windows. I have to admit I don't understand the background of changing fonts in TeX/LaTeX, luckily, the packages are doing all the work for me. Have got MikTeX 2.7 here, Basic installation with no path change. Python is 2.5.2, using IDLE for all script runs Let's consider switching to Times: On LaTeX, \usepackage{times} compiles like a hitch. The following minimal PyX example does *not* work: from pyx import * text.set(mode="latex") text.preamble(r"\usepackage{times}") c = canvas.canvas() c.text(0, 0, r"\LaTeX{} doesn't need to look like \LaTeX{} all the time.") c.writeEPSfile("font") c.writePDFfile("font") having the following error (I save you from reading the whole message, just first and last three lines) Traceback (most recent call last): File "D:\Daten\zipp\PyX\PyX-0.10\examples\text\font.py", line 8, in <module> c.writeEPSfile("font") ... File "C:\Python25\lib\site-packages\pyx\dvifile.py", line 753, in putchar raise RuntimeError("cannot find font encoding file %s" % fontmapinfo.encodingfile) RuntimeError: cannot find font encoding file 8r.enc However, when searching the 8r.enc and copying to the local working directory, it works. With other packages ({mathptmx}, [charter]{mathdesign}, {mathpazo}, ...) I get the following error (for example using r"\usepackage{mathptmx}" as preamble, errordebug = 2): Traceback (most recent call last): File "D:\files\latex\font\font.py", line 7, in <module> c.text(0, 0, r"\LaTeX{} doesn't need to look like \LaTeX{} all the time.") ... The expression passed to TeX was: \ProcessPyXBox{\LaTeX{} doesn't need to look like \LaTeX{} all the time.% }{1}% \PyXInput{6}% The return message from TeX was: * *("C:\Program Files\MiKTeX 2.7\tex\latex\psnfss\ot1ztmcm.fd") ("C:\Program Files\MiKTeX 2.7\tex\latex\psnfss\omlztmcm.fd") ("C:\Program Files\MiKTeX 2.7\tex\latex\psnfss\omsztmcm.fd") ("C:\Program Files\MiKTeX 2.7\tex\latex\psnfss\omxztmcm.fd") PyXBox:page=1,lt=0.0pt,rt=199.3498pt,ht=6.81989pt,dp=2.24998pt: [80.121.88.1] *PyXInputMarker:executeid=6: After parsing this message, the following was left: * *("C:\Program Files\MiKTeX 2.7\tex\latex\psnfss\ot1ztmcm.fd") ("C:\Program Files\MiKTeX 2.7\tex\latex\psnfss\omlztmcm.fd") ("C:\Program Files\MiKTeX 2.7\tex\latex\psnfss\omsztmcm.fd") ("C:\Program Files\MiKTeX 2.7\tex\latex\psnfss\omxztmcm.fd") * For completeness, i include the output of contrib\callingtex.py. >>> Platform is win32 Python installation prefix is C:\Python25 Python executable is C:\Python25\pythonw.exe PyX comes from C:\Python25\lib\site-packages\pyx\__init__.pyc PyX version 0.10 PyX pykpathsea python module used " echo $0 \"$*\"" --> $0 \"$*\" " echo $SHELL" --> $SHELL " echo $BASH_SUBSHELL" --> $BASH_SUBSHELL " echo $-" --> $- " echo $ENV" --> $ENV " echo $BASH_ENV" --> $BASH_ENV " echo $TEXMFCNF" --> $TEXMFCNF " echo $_" --> $_ " echo $PATH" --> $PATH " which kpsewhich" --> C:\Program Files\MiKTeX 2.7\miktex\bin\kpsewhich.EXE " which tex" --> C:\Program Files\MiKTeX 2.7\miktex\bin\tex.EXE " which latex" --> C:\Program Files\MiKTeX 2.7\miktex\bin\latex.EXE "file `which kpsewhich`" --> " file `which tex`" --> " file `which latex`" --> "psfonts.map" found at "D:/Documents and Settings/All Users/Application Data/MiKTeX/2.7/dvips/config/psfonts.map" as format "map" "psfonts.map" found at "D:/Documents and Settings/All Users/Application Data/MiKTeX/2.7/dvips/config/psfonts.map" as format "PostScript header" "psfonts.map" found at "D:/Documents and Settings/All Users/Application Data/MiKTeX/2.7/dvips/config/psfonts.map" as format "dvips config" "psfonts.cmz" found at "C:/Program Files/MiKTeX 2.7/fonts/map/dvips/cm/psfonts.cmz" as format "map" >>> Maybe someone is able to get an idea what is running wrong... With best regards, Guenter -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer |