Some PostScript examples for SpecialHost

Version 1.26

Giuseppe Ghibò ⟨ghibo@galileo.polito.it⟩

June 2, 1995

1 Some samples

Here is an example of PostScript figure inside text. The figure is ‘ ’; another figure is your ‘golfer.eps’.

\begin{figure}[h]
\centering
\epsfysize = 10cm
\fboxsep=0pt
\fbox{\epsffile{golfer.eps}}
\end{figure}

We may also specify a bounding box to isolate a part of a picture (acting as a viewport). For instance:

\begin{figure}[h]
\centering
\epsfysize = 10cm
\epsfclipon
\fboxsep=0pt
\fbox{\epsffile[250 530 350 630]{golfer.eps}}
\end{figure}

We may have rotated pictures. For instance:

\begin{figure}[h]
\centering
\unitlength=1bp
\fboxsep=0pt
\fbox{\begin{picture}(271.02,271.02)(0,0)
\put(0,0){\special{psfile=golfer.eps llx=250 lly=530 urx=350 ury=630 %
rwi=1984 hoffset=99.2 voffset=271.02 angle=240 clip}}
\end{picture}}
\end{figure}

Here is an example of four IFF picture having the same name, i.e. “europe.iff”; note that every picture may have its own dumped file.

The example above was produced with

\begin{figure}[h]
\centering
\unitlength=1mm
\fboxsep=0pt
\tabcolsep=0.25cm
\begin{tabular}{cc}
%
\fbox{\begin{picture}(70,67.13)
\put(0,0){\special{ifffile=europe.iff hsize=7cm vsize=6.713cm mode=ordered}}
\end{picture}}
%

&\fbox{\begin{picture}(70,67.13)
\put(0,0){\special{ifffile=europe.iff hsize=7cm vsize=6.713cm mode=ordered %
invert=on}}
\end{picture}}\\[.5cm]
%
\fbox{\begin{picture}(70,67.13)
\put(0,0){\special{ifffile=europe.iff hsize=7cm vsize=6.713cm mode=fs}}
\end{picture}}
%
&\fbox{\begin{picture}(70,67.13)
\put(0,0){\special{ifffile=europe.iff hsize=7cm vsize=6.713cm mode=hexagon}}
\end{picture}}
\end{tabular}
\end{figure}

Here is the PostScript picture of page 1, breaked into six small pictures.

The pictures above are obtained with:

\begin{figure}[h]
\centering
\def\sz{\epsfclipon\epsfxsize=3.5cm}
\fboxsep=0pt
\tabcolsep=0.25cm
%
\begin{tabular}{cc}
\fbox{\sz\epsffile[7 495 292 726]{golfer.eps}}
&\fbox{\sz\epsffile[292 495 577 726]{golfer.eps}}\\[0.5cm]
%
\fbox{\sz\epsffile[7 263 292 495]{golfer.eps}}
&\fbox{\sz\epsffile[292 263 577 495]{golfer.eps}}\\[0.5cm]
%
\fbox{\sz\epsffile[7 31 292 263]{golfer.eps}}
&\fbox{\sz\epsffile[292 31 577 263]{golfer.eps}}
\end{tabular}
\end{figure}

Now complete this puzzle... 7 We may have also picture with unknown size or wrong Bounding Box (a size of 8×11” will be used instead). For example:

\begin{figure}[h]
\centering
\fboxsep=0pt
\fbox{%
\setlength{\unitlength}{0.1bp}
\begin{picture}(4320,2592)(0,0)
\footnotesize
\put(937,1363){\makebox(0,0){$R_4\,{p_4t}$}}
\put(2766,390){\makebox(0,0){$R_1\,{p_1t}$}}
 .
 .
 .
\put(0,0){\special{psfile=graph.eps}}
\end{picture}}
\end{figure}

R_{4} p_{4}t  R_{1} p_{1}t R_{2} p_{2}t  R_{3} p_{3}t θ_{2}(t) R_{5} p_{5}t  t [s] 0,15 0,10 0,05 0 4 3 2 1 0 −1 −2 −3

C_{1} θ_{1} m_{1} f_{1} h_{1}  k β d  C_{2} θ_{2} m_{2}  h_{2} h f_{2}

Figure 1: A simple TEXdraw picture.

Here is a figure created with TEXdraw.

This is an example of a psfig picture. As you can see we are writing on a gray background produced by a PostScript file. The following \psfig macro was used to include the PostScript file.

\psfig{figure=graybox.eps,rheight=0cm,rwidth=0cm,%
height=3.3cm,width=\hsize,silent=}

Figure 2: A Metapost figure.

Starting since SpecialHost v1.26 it is possibile to show even PostScript pictures created with MetaPost. Note that if the MetaPost graphic contains text labels, the Bakoma Type-1 font collection is needed^{1} to show the correct fonts.

1The Bakoma Type-1 font collection is a collection of CM fonts in Type-1 form and it is available at CTAN archives.