summaryrefslogtreecommitdiff
path: root/graphics/pictex/pointers.tex
blob: 5c2204478a7472091b3cde8517426bbe1004b84b (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
%
%	Pointing at things
%
%	Each macro points in a different direction. The arrow is at the
%	logical corner, e.g. if I \pointUpRight, the arrow is in the upper
%	right corner.
%
%	\pointRight{..text..} 
%	\pointLeft{..text..} 
%	\pointDown{..text..} 
%	\pointUp{..text..} 
%
%	\pointUpRight{..text..}
%	\pointUpLeft{..text..}
%	\pointDownRight{..text..}
%	\pointDownLeft{..text..}
%
%	No global boxes are used. Each macro is grouped and uses box0.
%
%	Dirk Grunwald Apr 20 1988
%
\def\pointRight#1{{#1$\rightarrow$}}
\def\pointLeft#1{{$\leftarrow$#1}}
%
\def\pointUpRight#1{%
\begingroup\offinterlineskip%
\setbox0=\hbox{#1}%
\vbox{\hbox{\hskip\wd0$\nearrow$}\copy0}\endgroup}
%
\def\pointUpLeft#1{%
\begingroup\offinterlineskip%
\setbox0=\hbox{$\nwarrow$}%
\vbox{\copy0\hbox{\hskip\wd0{}#1}}\endgroup}
%
\def\pointDownRight#1{%
\begingroup\offinterlineskip%
\setbox0=\hbox{#1}%
\vbox{\copy0\hbox{\hskip\wd0$\searrow$}}\endgroup}
%
\def\pointDownLeft#1{%
\begingroup\offinterlineskip%
\setbox0=\hbox{$\swarrow$}%
\vbox{\hbox{\hskip\wd0{}#1}\copy0}\endgroup}
%
\def\pointDown#1{%
\begingroup\offinterlineskip%
\setbox0=\hbox{#1}%
\vbox{\copy0\hbox to \wd0{\hfill$\downarrow$\hfill}}\endgroup}
%
\def\pointUp#1{%
\begingroup\offinterlineskip%
\setbox0=\hbox{#1}%
\vbox{\hbox to \wd0{\hfill$\uparrow$\hfill}\copy0}\endgroup}