summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/6-2-33.ltx
blob: 83702dec67dca45949ec0913aabf603334ea4f03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
%% 
%%  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}