[pstricks] Insertion of text on a jpg picture

Jean-Côme Charpentier Jean-Come.Charpentier at wanadoo.fr
Tue Feb 14 21:08:02 CET 2006


Alan Ristow wrote:
> 
> As for an example of using pstricks to place the text, unfortunately I 
> don't have one readily available -- it's something I've done only once 
> or twice, and never recently. At any rate, as I recall it involves 
> importing the EPS file into a pspicture environment, then placing text 
> using \rput.
> 
> Perhaps somebody else can provide a small example?

   Like that?

\documentclass{article}
\usepackage{graphicx}
\usepackage{pstricks}
\usepackage[a4paper]{geometry}

\begin{document}
\begin{pspicture}(-2,0)(12,10)
   \rput(0,4){\makebox[0pt][l]{\includegraphics[width=10cm]{tiger}}}
%  \psgrid[griddots=10,subgriddiv=0]
   \psset{linewidth=1pt,arrows=<-}
   \psline(1.7,4.5)(0,7)(-0.5,7) \uput[l](-0.5,7.25){Nose}
                                 \uput[l](-0.5,6.75){Muzzle?}
   \psline(4.5,6.6)(1,8)(-0.5,8) \uput[l](-0.5,8){Eye}
   \psline(0.8,4.7)(0,5)(-0.5,5) \uput[l](-0.5,5){Whiskers}
   \psline(2.2,3.7)(-0.5,3.7)    \uput[l](-0.5,3.7){Fang}
   \psline(8,8.7)(10,8.7)        \uput[r](10,8.7){Ear}
   \psline(4.5,3.5)(10,3.5)        \uput[r](10,3.5){Tongue}
\end{pspicture}
\end{document}

The \psgrid was usefull to place the captions.

   Jean-Côme Charpentier




More information about the PSTricks mailing list