From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/35612 Path: news.gmane.org!not-for-mail From: Arthur Reutenauer Newsgroups: gmane.comp.tex.context Subject: Re: makempy (pstoedit <-> gs) hangs Date: Mon, 30 Jul 2007 01:37:25 +0200 Message-ID: <20070729233725.GA11143@phare.normalesup.org> References: <46ABA8AC.19739.64E93B6@wwl.musensturm.de> <22af238a0707290552m4878635ase391bbd9bb7038cd@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="2oS5YaxWCcQjTEyO" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1185752279 30073 80.91.229.12 (29 Jul 2007 23:37:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 29 Jul 2007 23:37:59 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jul 30 01:37:48 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1IFIKZ-0004o1-02 for gctc-ntg-context-518@m.gmane.org; Mon, 30 Jul 2007 01:37:47 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 20AEF1FE99; Mon, 30 Jul 2007 01:37:44 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02960-01; Mon, 30 Jul 2007 01:37:35 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 140A31FE87; Mon, 30 Jul 2007 01:37:35 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1E5B81FE87 for ; Mon, 30 Jul 2007 01:37:33 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02727-01 for ; Mon, 30 Jul 2007 01:37:26 +0200 (CEST) Original-Received: from nef2.ens.fr (nef2.ens.fr [129.199.96.40]) by ronja.ntg.nl (Postfix) with ESMTP id AC68B1FE83 for ; Mon, 30 Jul 2007 01:37:26 +0200 (CEST) Original-Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id l6TNbPx8086547 for ; Mon, 30 Jul 2007 01:37:26 +0200 (CEST) X-Envelope-To: Original-Received: by phare.normalesup.org (Postfix, from userid 1008) id C85A138072; Mon, 30 Jul 2007 01:37:25 +0200 (CEST) Content-Disposition: inline In-Reply-To: <22af238a0707290552m4878635ase391bbd9bb7038cd@mail.gmail.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.1.4 (nef2.ens.fr [129.199.96.32]); Mon, 30 Jul 2007 01:37:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:35612 Archived-At: --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I think I've identified the problem: in the PostScript prologue file fo= r pstoedit you find the following bit of code (slightly simplified): /getorigfont { dup /OrigFont known { /OrigFont get getorigfont } if } def I guess anyone, even not familiar with PostScript, can spot the error h= ere: getorigfont is called recursively ad infinitum! I have no idea why this i= s so, but this mistake is easy to correct, by simply commenting out the innermo= st =E2=80=9Cgetorigfont=E2=80=9D; and it indeed fixes the problem with Wolfg= ang's code. Why the error wouldn't happen with older versions of gs isn't clear to = me and I haven't tested it (for debugging I used pstoedit 3.44 and gs 8.56 throughout); on the other hand, it's quite clear why the bug wouldn't sho= w up on code that uses only outlines and no font, like in the last example of http://wiki.contextgarden.net/User-Defined_Enumerations as George pointed= out: the spurious piece of code is only used for font redefinitions and is the= refore not called in the case of the fuzzy itemize style, because the symbols ar= e not taken from a font. For people wanting to compile an amended version of pstoedit, the attac= hed patch should do the trick, although hand-editing the relevant file (src/pstoedit.ph) should be just as easy (this is really a 2-byte patch =E2= =80=94 and you can even turn it into a 2-bit patch ;-). > Since pstoedit > mucks with ghostscript's SYSTEMDICT it isn't surprising that problems > arise for newer gs versions. That's what I thought too (even if the bug had nothing to do with that apparently). I wonder if all that is really needed and if it wouldn't be simpler and less error-prone to use a custom dictionary where all the overriding functions are defined. Instead the author of pstoedit does qui= te scary things with systemdict ... > Maybe it is time for ghostscript to get > an mpost driver. Sure, wouldn't harm either. Arthur --2oS5YaxWCcQjTEyO Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="pstoedit.patch" diff -cNrp pstoedit-3.44/src/pstoedit.ph pstoedit-3.44-patched/src/pstoedit.ph *** pstoedit-3.44/src/pstoedit.ph Mon Jul 30 00:35:24 2007 --- pstoedit-3.44-patched/src/pstoedit.ph Mon Jul 30 00:34:29 2007 *************** const char * const PS_prologue[] = *** 1920,1926 **** " { 210 pscover ", " dup /OrigFont known ", " { 211 pscover ", ! " /OrigFont get getorigfont ", " } ", " if ", " } ", --- 1920,1926 ---- " { 210 pscover ", " dup /OrigFont known ", " { 211 pscover ", ! " /OrigFont get % getorigfont ", " } ", " if ", " } ", --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --2oS5YaxWCcQjTEyO--