Hello Andre,

let me sum up what I've found out.

1) 8r.enc
http://sourceforge.net/mailarchive/message.php?msg_id=4683D2E6.60201%40berlin.de
describes the problem very well.

Simply replacing the original line in __init__.py with
    def find_file(filename, kpse_file_format):
#        command = 'kpsewhich --format="%s" %s' % (kpse_file_format, 
filename)
        command = 'kpsewhich "%s" %s' % (kpse_file_format, filename)
does not work.

The following does work:
    def find_file(filename, kpse_file_format):
        if ' ' in kpse_file_format:
            command = 'kpsewhich "%s" %s' % (kpse_file_format, filename)
        else:
            command = 'kpsewhich --format=%s %s' % (kpse_file_format, 
filename)
        if not find_file_cache.has_key(command):
            find_file_cache[command] = os.popen(command, 
"r").readline().strip()
        return find_file_cache[command]
...

I've not found out if this has other side effects. The nag for --format 
being deprecated shows up when using kpsewhich from the command line. MiKTeX 
is 2.7, the latest staple revision with all updates.

2)
have tested the monkey patch. The outcome is:

>>>
Traceback (most recent call last):
  File "C:\Dokumente und Einstellungen\nep.TXENON0\Eigene 
Dateien\aee\font\font2.py", line 5, in <module>
    text._texmessageloaddef.pattern = re.compile(r"\([\"]?(? 
P<filename>(?:(?<!\")[^()\s\n]+(?!\"))|[^()\"\n]+)(\.fd|\.def)[\"]?(? 
P<additional>[^()]*)\)")
  File "C:\Python25\lib\re.py", line 188, in compile
    return _compile(pattern, flags)
  File "C:\Python25\lib\re.py", line 241, in _compile
    raise error, v # invalid expression
error: unexpected end of pattern
>>>

I deleted the EOLs (linebreak in email) in ...(? P<filename... and ...(? 
P<additional..., I hope this was okay. If it is possible to post attachments 
to the list, I could add the source documents.

A way to supress the unhandled LaTeX output and getting output is placing 
the following preamble
text.set(mode="latex", errordebug=2,
        texmessagesdefaultrun=[text.texmessage.ignore]
         )

However, with the above the problems are still not solved yet. I'm using 
pdflatex for all my documents (no, I never-never want go back to DVI): Using 
the following short LaTeX-file
\documentclass[10pt]{scrartcl}
\usepackage{times}
\usepackage{graphicx}
\begin{document}
\LaTeX{} doesn't need to look like \LaTeX{} all the time.\\
\includegraphics{font}% this is the file prduced by font.py
\end{document}
gives me two different Times fonts. pdflatex embeds NimbusRomNo9L-Regu 
(Eingebettete Untergruppe), while PyX is using Times-Roman, Originalschrift: 
TimesNewRomanPSMT, obviously not embedding it.
When using mathpazo in pdflatex gives URWPalladiaL-Roma, while PyX uses 
Palatino-Roma. This is substituted by Acrobat 7 with Adobe-Sans MM

Using the above with DVI output, the fonts show up (kerning is slightly 
different between latex and PyX-output). But this is no option for me, 
because my workflow is having graphics in PDF/JPG (and I think it would be 
stupid to convert back to EPS and forth to PDF by dvips).

Stupid question: Could it help if using pdflatex instead of latex by PyX 
(something like text.set(mode="pdflatex")?

I hope the above is not too confusing, with best regards,
Guenter 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to