From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/754 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Twotanks.mp Date: Sun, 29 Aug 1999 13:45:03 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <37C91D3F.A457804@wxs.nl> References: <3.0.5.32.19990824183940.00b36390@mail.northcoast.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035391596 26777 80.91.224.250 (23 Oct 2002 16:46:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 16:46:36 +0000 (UTC) Original-To: David Arnold Xref: main.gmane.org gmane.comp.tex.context:754 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:754 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 -----------------------------------------------------------------