Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!milton!lisbon!almond From: almond@lisbon.stat.washington.edu (Russell Almond) Newsgroups: uw.tex,comp.text.tex Subject: Re: Mac generated figures in LaTex document? Keywords: dvi2ps Message-ID: <1991Jun5.045349.6813@lisbon.stat.washington.edu> Date: 5 Jun 91 05:12:00 GMT References: <1991Jun5.014748.1877@milton.u.washington.edu> Sender: news@milton.u.washington.edu (News) Organization: U.W. Department of Statistics Lines: 80 In article <1991Jun5.014748.1877@milton.u.washington.edu> choe@milton.u.washington.edu (In Jerng Choe) writes: >Hi, >Does anybody know how to put Macintosh-generated figures (postscript files >obtainded by pressing command-F during printing) into LaTex documents? >I know there is a command named "\special", but I don't know how to convert >Macintosh postscript file properly. I am using LaTex on Unix main-frame. >I'll appreciate any comments. >Thanks in advance. > >In-Jerng Choe >e-mail address: choe@u.washington.edu > > Most sites use some version of the software dvi2ps to convert TeX (and LaTeX) output to postscript. This advise pertains to those systems which use that software. Others should check their local documentation. Looking at the documentation for dvi2ps (man dvi2ps) can be quite helpful. First, what you need to do is look at the postscript code. Look for a comment called %%Bounding Box: e.g., %%BoundingBox:24 461 424 707 The four number you see are the co-ordinates of the box containing your figure. They are in Postscript points (72 points to an inch, TeX calls them bigpoints bp). Thus the figure producing that bounding box statement is within the rectangle between (24,461) and (424,707). You will need to move the origin of your figure to the current page. To do this put the postscript command: -24 -461 translate at the top of your page. Here -24 and -461 will be replaced by whatever the first two numbers are in your bounding box. Now, back in your TeX document. You need to generate room for your picture. First calculate the size, in this case 400 bp (5.55 in) x and 246 bp (3.41 in) (y). First we need to skip down by 3.5 in to leave room for the figure. Then we need to skip over .5 inches to center the figure. Then we can issue the \special command to include the postscript document: \midinsert \vspace 3.5 in \noindent\hskip .5in\special{psfile="/fullpathname/file.ps"} \hfill\break \smallskip \centerline{\it Caption} \endinsert Would be a typical series of TeX commands for doing this job. LaTeX input will vary. The \special command takes several arguments such as hsize, vsize whidh set a clipping region, and hscale and vscale which scale the figure. Read the man pages on dvi2ps for more details. Use the full pathname when referencing figures because I'm not sure about the rules dvi2ps uses for finding the figure. In a following post, I will post some macros I have for automatically including a figure in a document. These are in TeX. I understand there also exists a set of macros for LaTeX use which rely on their being a bounding box comment in the header. If you don't have a BoundingBox comment, I understand there is a program which will generate one, call bbox or something like that. Ask your system manager. Good Luck. Russell Almond Spring Sunshine, U. Washington, Statistics, GN-22 The Tree-of-Cliques in Hyperbloom. Seattle, WA 98195 Eschew Affine Constraints! almond@stat.washington.edu, (206) 543-4302 (future ancient Japaneese Haiku)