%% %% The LaTeX Graphics Companion, 2ed (first printing May 2007) %% %% Example 6-2-33 on page 349. %% %% Copyright (C) 2007 Michel Goossens, Frank Mittelbach, Denis Roegel, Sebastian Rahtz, Herbert Vo\ss %% %% It may be distributed and/or modified under the conditions %% of the LaTeX Project Public License, either version 1.3 %% of this license or (at your option) any later version. %% %% See http://www.latex-project.org/lppl.txt for details. %% \documentclass{ttctexa} \pagestyle{empty} \setcounter{page}{6} \setlength\textwidth{427.6677pt} \setlength\parindent{0pt} \AtBeginDocument{% \psset{unit=.7} \newcommand*\Square{\rule{0.7cm}{0.7cm}} \newcommand*\ImgI{% \begin{pspicture}[showgrid=true](4,1) \rput[lb](0,0){\Rnode{A}{\Square}}\rput[lb](3,0){\Rnode{B}{\Square}} \end{pspicture} \ncline[linecolor=red,linewidth=2pt,arrowscale=2,arrows=->]{A}{B}} \newcommand*\ImgII{% \begin{pspicture}[showgrid=true](4,4) \rput[lb](0,0){\Rnode{A}{\Square}\hspace{1.4cm}\Rnode[vref=3]{B}{\Square}} \psframe*[linecolor=black!20](3,3)(4,4) \pcline[linecolor=red,linestyle=dotted,linewidth=2pt](A)(B) \ncline[linecolor=red,linewidth=2pt,arrowscale=2,arrows=->]{A}{B} \pnode(3,0.7ex){C} \ncline[linecolor=blue,linewidth=2pt,arrowscale=2,arrows=->]{A}{C} \pcline{->}(3.5,0.5)(3.5,3.5)\uput[0](3.5,2){vref} \pcline[linecolor=white](3.5,0.5)(3.5,1) \end{pspicture}}} \StartShownPreambleCommands \usepackage{pstricks,pst-node}\SpecialCoor \StopShownPreambleCommands \begin{document} \ImgI\hspace{5mm}\ImgII\hspace{5mm}\begin{pspicture}[showgrid=true](6,4) \rput[lb](0,0){\Rnode{A}{\Square}\hspace{1.4cm}\Rnode[href=4,vref=3]{B}{\Square}} \psframe*[linecolor=black!20](3,3)(4,4)\psframe*[linecolor=black!20](5,3)(6,4) \psline[arrows=->](3.5,3.5)(5.5,3.5) \uput[-90](4.5,3.5){href} \pcline[linecolor=red,linestyle=dotted,linewidth=2pt](A)(B) \ncline[linecolor=red,linewidth=2pt,arrowscale=2,arrows=->]{A}{B} \pnode(3,0.7ex){C} \ncline[linecolor=blue,linewidth=2pt,arrowscale=2,arrows=->]{A}{C} \pcline{->}(3.5,0.5)(3.5,3.5)\uput[0](3.5,2){vref} \pcline[linecolor=white](3.5,0.5)(3.5,1) \end{pspicture} \end{document}