From: Taco Hoekwater <taco@elvenkind.com>
Subject: Re: %%BoundingBox: (atend)
Date: Wed, 2 Jun 2004 15:46:47 +0200 [thread overview]
Message-ID: <20040602154647.5aaf4c69@glenlivet.elvenkind.com> (raw)
In-Reply-To: <Pine.SGI.4.60.0406020743050.107538@montigo.bio.dfo.ca>
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 <aa056@chebucto.ns.ca>
> Head of St. Margarets Bay, Nova Scotia, Canada
--
groeten,
Taco
next prev parent reply other threads:[~2004-06-02 13:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-30 12:24 Peter Münster
2004-06-01 18:35 ` Hans Hagen
2004-06-02 13:13 ` George N. White III
2004-06-02 13:46 ` Taco Hoekwater [this message]
2004-06-02 18:13 ` Peter Münster
2004-06-03 7:50 ` Taco Hoekwater
2004-06-03 16:52 ` Peter Münster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040602154647.5aaf4c69@glenlivet.elvenkind.com \
--to=taco@elvenkind.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).