Hi,

thanks for looking into the details. I've applied your patch  
(changeset 3004).

Best,


André


Am 24.11.2008 um 00:30 schrieb Matthew West:

> As pointed out by Axel Freyn on 2008-06-20 in [1] the current  
> version of PyX can't parse lines in psfonts.map where a "<" token is  
> followed by a space. With PyX 0.10 (also current SVN PyX) on Fedora  
> 9 the warning is:
>
> /usr/lib64/python2.5/site-packages/pyx/dvifile.py:396: UserWarning:  
> Ignoring line 2209 in mapping file '/usr/share/texmf/fonts/map/dvips/ 
> updmap/psfonts.map': Unknown token '<'
> warnings.warn("Ignoring line %i in mapping file '%s': %s" % (lineno,  
> mappath, e))
>
> This is due to the following line in psfonts.map:
>
> maghribi1 maghribi "OmegaArabicEncoding ReEncodeFont" <aromega.enc <  
> maghribi1.pfb
>
> The space between "<" and "maghribi1.pfb" is the problem. I checked  
> in current TeXLive SVN (see [2]) and this is still a problem in the  
> latest TeXLive sources. The best specification I could find for  
> psfonts.map is [3]. There it is clearly stated that "If a ‘<’ is a  
> word by itself then the next word is taken as the name of the header  
> file", so the offending line in psfonts.map is apparently legal.
>
> I've included a patch below against PyX SVN trunk to handle this  
> case correctly (also attached to avoid line-break issues).
>
> [1] 
> http://sourceforge.net/mailarchive/message.php?msg_name=1bf21f8f0806200157u65763396l7cc7495d8356bb78%40mail.gmail.com
> [2] 
> http://www.tug.org/svn/texlive/trunk/Master/texmf/fonts/map/dvips/updmap/psfonts.map?view=log
> [3] http://www.tug.org/texinfohtml/dvips.html#psfonts_002emap
>
> --- pyx/dvi/mapfile.py.orig   2008-11-22 23:04:47.000000000 -0600
> +++ pyx/dvi/mapfile.py        2008-11-22 23:07:38.000000000 -0600
> @@ -42,9 +42,15 @@
>           else:
>               raise RuntimeError("Cannot tokenize string '%s'" % s)
>
> +        next_token_is_encfile = False
>       for token in tokens:
> -            if token.startswith("<"):
> -                if token.startswith("<<"):
> +            if next_token_is_encfile:
> +                self.encodingfilename = token
> +                next_token_is_encfile = False
> +            elif token.startswith("<"):
> +                if token == "<":
> +                    next_token_is_encfile = True
> +                elif token.startswith("<<"):
>                   # XXX: support non-partial download here
>                   self.fontfilename = token[2:]
>               elif token.startswith("<["):
>
> <psfonts_map_with_space.patch>
>
> -------------------------------------------------------------------------
> 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-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pyx-devel

-- 
by  _ _      _    Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim
    / \ \    / )   [EMAIL PROTECTED], http://www.wobsta.de/
   / _ \ \/\/ /    PyX - High quality PostScript and PDF figures
  (_/ \_)_/\_/     with Python & TeX: visit http://pyx.sourceforge.net/


-------------------------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-devel

Reply via email to