Postscript within TeX/LaTeX (dvi2ps help)

mcvax!gec-epl.co.uk!Dunstan_Vavasour at uunet.uu.net mcvax!gec-epl.co.uk!Dunstan_Vavasour at uunet.uu.net
Tue Apr 25 16:48:41 AEST 1989


I looked into this in some detail a while back when trying to include f2ps
output in a LaTeX document. The fundamental point is that the TeX \special
function doesn't leave any room at all. It just reads in the Postscript
file and splats it exactly where the \special command is.

Now, I don't have any knowledge of Postscript at all, but as far as I
understand it, TeX treats the point where the \special command is written
as the origin of the Postscript file (the term use is "the user's (0,0)
point"). This means the point where a paragraph of text would start is
(typically) the bottom left corner of the Postscript image. 

   The sort of construct you want is
--- begin LaTeX code--------

\begin{figure}[tb]

\vspace*{5.7in}
\special{psfile=fig1.ps}

\caption{Schematic of the static model}
\end{figure}

Start of next paragraph....
--- end LaTeX code--------

The blank lines are important - if you don't put them in things come out
in funny places (a TeXpert will be able to explain why).

I've never tried the hscale, vscale options to \special, but I have never
got the offset options to work, so the scaling ones should be treated with
some scepticism.

If you wish to preview the results of this jiggery pokery before printing
it, I suggest you use the RalPage Postscript previewer, which is freely
available (though not in the Public Domain).


Dunstan Vavasour                                                           
Systems Design Division                                                    
GEC Electrical Projects
Boughton Road
Rugby, Warwickshire, CV21 1BU                                              
Tel: (+44) 788 542144 Ext: 3535                                            
Fax: (+44) 788 60767                                                       
Email: dv at gec-epl.co.uk                                                    
       dv%uk.co.gec-epl at uk.ac.ukc (JANET)                                  
       ...mcvax!ukc!uk.co.gec-epl!dv                                       

[[ This really belongs in "TeXHax" and "comp.text".  --wnl ]]



More information about the Comp.sys.sun mailing list