From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Twotanks.mp
Date: Sun, 29 Aug 1999 13:45:03 +0200 [thread overview]
Message-ID: <37C91D3F.A457804@wxs.nl> (raw)
In-Reply-To: <3.0.5.32.19990824183940.00b36390@mail.northcoast.com>
David Arnold wrote:
[thread: making eps out of mp by first making an pdf of it and then an
eps of the pdf]
> First, it would be more useful to me if it automatically calculated with
> width and the height from the bounding box information (or the HiRes
> bounding box information). Or perhaps, it would more useful in general, if
> you provided a switch. On means automatically calculate bounding box, off
> means place the width and height manually.
>
> Actually, in my case, some sort of batch utility that would change a whole
> lot of files to pdf to eps would be a huge blessing. Then I wouldn't have
> to do them one by one. (Hee--hee. If wishes were horses, then beggars would
> fly:-)
As long as I keep some features secret, I can fulfil wishes more
easilly. Part of what you want is already avaliable.
> Secondly, I had a weird experience with my attempt to create an eps file. I
> have a file, twomasses.1, and I set up like this, in a file called
> mptopdf.tex:
Yes, this is a bug in version 3. Your figure is pretty small: its height
is 45pt. Version 4 and GS display ok.
Now to a solution:
It is possible to ask for the figuredimensions, so we can wrap the
command seauence I sent you before into a macro (\unprotect ... macro
... \protect -> in cont-new.tex):
\def\pagefigure[#1]%
{\bgroup
\page
\getfiguredimensions
[#1]
\definieerpapierformaat
[\s!dummy][\c!breedte=\figurewidth,\c!hoogte=\figureheight]
\stelpapierformaatin
[\s!dummy][\s!dummy]
\setupcolors
[\c!status=\v!start]
\stellayoutin
[\c!kopwit=\!!zeropoint, \c!rugwit=\!!zeropoint,
\c!hoofd=\!!zeropoint, \c!voet=\!!zeropoint,
\c!hoogte=\v!midden, \c!breedte=\v!midden]
\externalfigure[#1]
\page
\egroup}
Now you can say:
\starttext \pagefigure[twomasses.1] \stoptext
and get one figure.
Now, probably few users will know that there is a command:
\showexternalfigures % [alternative=a] [alternative=b]
that typesets a directory of figures. It uses an auxiliary file produced
by texutil:
texutil --fig *.1
will build your list. Given the previous macro, we can now define:
(also add to cont-new)
\def\showexternalfigurec%
{\bgroup
\def\presetfigure[##1][##2]{\pagefigure[##1]}
\pushendofline
\readjobfile{\@@exfile}{}{}
\popendofline
\egroup}
and say
\starttext \showexternalfigures[alternative=c] \stoptext
That way you have all your mp graphics in one pdf file, nicely cropped
at natural size.
There is a program pdftops (in the web2c/xpdf distribution) that can
extract the graphics as ps; unfortunately it forgets the crop box. I
already mailed the author about this.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------
parent reply other threads:[~1999-08-29 11:45 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <3.0.5.32.19990824183940.00b36390@mail.northcoast.com>]
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=37C91D3F.A457804@wxs.nl \
--to=pragma@wxs.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).