summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/eplain/base/test/dvipdfm.tex
blob: 0760afbe50b616d821fdb0db54829d0c84dc453b (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
\input ../eplain
%\enablehyperlinks[nolinks]
%\enablehyperlinks[dvipdfm]
\enablehyperlinks

\beginpackages
\usepackage[dvipsnames]{color}
\endpackages

% Execute #1 then print it verbatim and indented.
\def\c{\cf\indent\relax}
% Same as \c, but do not indent and at the end say \hlend.
\def\f{\cf\noindent\hlend}
%
\def\cf#1#2#3{%
  \def\temp{#3}%
  \edef\cftemp{\sanitize\temp}%
  #1#3\expandafter\verbatim\cftemp\endverbatim#2\par
}
%
\newcount\destcount
% Execute `#1{d\the\destcount}' then print it (`#1', `{d', and `}' are printed
% verbatim; `\the\destcount' is expanded).
\def\d{\dl\relax}
% Same as \d, but at the end also say \hlend.
\def\l{\dl\hlend}
%
\def\dl#1#2{%
  \global\advance\destcount by1
  \toks0={#2}%
  \edef\temp{\the\toks0{d\the\destcount}}%
  \edef\dltemp{\sanitize\temp}%
  \noindent#2{d\the\destcount}\expandafter\verbatim\dltemp\endverbatim#1\par
}



\leftline{\bf Destinations}
\medskip

{\tt\global\parindent=4em}

\d{\hldest{}{}}
\c{\hldestopts{zoom=2345}}
\d{\hldest{}{}}
\medskip
\c{\hldesttype{fitr}}
\c{\hldestopts{left=36,bottom=420,right=360,top=720}}
\d{\hldest{}{}}
\c{\def\mydesttype{xyz}}
\c{\def\myopts{left=72,top=648}}
\d{\hldest{\mydesttype}{\myopts}}
\medskip
\c{\let\myopts\empty}
\c{\hldestopts{raise=2\normalbaselineskip}}
\d{\hldest{xyz}{\myopts,zoom=2500}}
\c{\hldestopts{left=,bottom=,right=,top=}}
\d{\hldest{xyz}{raise=\ht\strutbox,zoom=3000}}
\medskip
\makeatletter
\c{\def\mydest{\special{pdf: dest (\@hllabel) [@thispage /FitBH @ypos]}}}
\d{\hldest{raw}{cmd=mydest}}
\resetatcatcode
\medskip
\d{\hldest{fit}{}}
\d{\hldest{fith}{}}
\d{\hldest{fitv}{}}
\d{\hldest{fitb}{}}
\d{\hldest{fitbh}{}}
\d{\hldest{fitbv}{}}
\vfil\eject



\leftline{\bf Links}
\medskip

{\tt\global\parindent=4.5em}

\destcount=0 % Reset destination count.
\l{\hlstart{name}{}}
\c{\hlopts{bstyle=U}}
\l{\hlstart{name}{}}
\l{\hlstart{}{bstyle=D,bdash=2 4,bcolor=1 0 0,hlight=I}}
\l{\hlstart{}{bstyle=B,bwidth=3}}
\c{\hlopts{bcolor=0 0 1}}
\l{\hlstart{}{bstyle=I,bwidth=4}}
\l{\hlstart{}{bstyle=U,bwidth=1}}
\c{\hlopts{bstyle=S}}
\l{\hlstart{}{hlight=I,bcolor=1 .2 .2,bwidth=2}}
\l{\hlstart{}{hlight=N,bstyle=D,bwidth=3}}
\l{\hlstart{}{hlight=O}}
\l{\hlstart{}{hlight=P,bcolor=.3 .6 .7}}
\l{\hlstart{}{bstyle=D,bdash=2 4 6}}
\l{\hlstart{}{bwidth=0}}
\l{\hlstart{}{bstyle=D,bdash=2 4 6 8}}
\f{\hlstart{page}{pagefit=/FitH 600}{1}}
\f{\hlstart{filename}{file=hlink.pdf,newwin=1}{eq1}}
\f{\hlstart{filepage}{file=hlink.pdf,pagefit=/FitR 50 100 300 500}{1}}
\f{\hlstart{filepage}{file=hlink.pdf,pagefit=/FitB}{2}}
\f{\hlstart{url}{}{http://tug.org/eplain/}}
\c{\def\c{\special{pdf:beginann<</Type/Annot/Subtype/Link/Dest[0/FitH @ypos]>>}}}
\f{\hlstart{raw}{cmd=c}{}}



\bye

% Local variables:
% compile-command: "(cd .. && make eplain.tex) && tex --interact=nonstopmode dvipdfm.tex && dvipdfm -p letter dvipdfm.dvi"
% End: