From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15305 Path: main.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: %%BoundingBox: (atend) Date: Wed, 2 Jun 2004 15:46:47 +0200 Organization: Elvenkind Sender: ntg-context-admin@ntg.nl Message-ID: <20040602154647.5aaf4c69@glenlivet.elvenkind.com> References: <6.1.1.1.2.20040601203359.07de2640@server-1> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1086184278 12777 80.91.224.253 (2 Jun 2004 13:51:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 2 Jun 2004 13:51:18 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Wed Jun 02 15:51:00 2004 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BVW8x-0007Vv-00 for ; Wed, 02 Jun 2004 15:50:59 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id B757C10B67; Wed, 2 Jun 2004 15:45:57 +0200 (MEST) Original-Received: from glenfiddich.elvenkind.com (elvenknd.xs4all.nl [213.84.171.68]) by ref.ntg.nl (Postfix) with ESMTP id 1617510ACF for ; Wed, 2 Jun 2004 15:41:56 +0200 (MEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by glenfiddich.elvenkind.com (Postfix) with ESMTP id 8D17F1645D for ; Wed, 2 Jun 2004 15:46:26 +0200 (CEST) Original-Received: from glenfiddich.elvenkind.com ([127.0.0.1]) by localhost (glenfiddich.elvenkind.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16911-02 for ; Wed, 2 Jun 2004 15:46:24 +0200 (CEST) Original-Received: from glenlivet.elvenkind.com (glenlivet.elvenkind.com [10.10.0.6]) by glenfiddich.elvenkind.com (Postfix) with SMTP id BB2871645B for ; Wed, 2 Jun 2004 15:46:24 +0200 (CEST) Original-To: ntg-context@ntg.nl In-Reply-To: X-Mailer: Sylpheed version 0.9.9claws (GTK+ 1.2.10; i586-mandrake-linux-gnu) Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:15305 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15305 Hi, A one-line patch to texutil.pl is enough to handle most cases of (atend). The method is far from waterproof, but neither is a Korn Shell script, and the added complexity to texutil.pl is neglible. Greetings, Taco --- texutil.pl.org 2004-06-02 15:36:03.610266871 +0200 +++ texutil.pl 2004-06-02 15:38:17.454329753 +0200 @@ -2129,7 +2129,7 @@ if (($BBoxFound) && ((substr $SomeLine,0,1) ne "%")) { last } if ($BBoxFound<2) - { if ($SomeLine =~ /^%%BoundingBox:/io) + { if ($SomeLine =~ /^%%BoundingBox:(?!\s+\(atend\))/io) { $EpsBBox = $SomeLine ; $BBoxFound = 1 ; next } elsif ($SomeLine =~ /^%%HiResBoundingBox:/io) { $EpsBBox = $SomeLine ; $BBoxFound = 2 ; next } On Wed, 02 Jun 2004 10:13:33 -0300, George wrote: > On Tue, 1 Jun 2004, Hans Hagen wrote: > > > At 14:24 30/05/2004, you wrote: > >> Hello, > >> ConTeXt does not find the EPS-BoundingBox in EPS files generated by > >> xmgrace. > >> Such a file begins like this: > >> > >> %!PS-Adobe-3.0 EPSF-3.0 > >> %%BoundingBox: (atend) > > [...] > >> If not, I'm going to write a script, that converts the file. > > > > if you have a small demo file i can add that feature to texutil > > I'd suggest adopting some of the conventions used by the > LaTeX2e graphics bundle, in particular, to look for the > BoundingBox in filename.(e)ps.bb. > > Rather than making texutil more complex a separate tool (findbb, attached) > that reliably writes the bbox by trying several methods, even using the > ghostscript bbox device to generate one (e.g., in the case of files > created with dvips -E that get incorrect BoundingBox entries because the > dvips calculation ignores things drawn by \specials). > > Try "findbb xmgracefile.ps > xmgracefile.ps.bb" > > -- > George N. White III > Head of St. Margarets Bay, Nova Scotia, Canada -- groeten, Taco