summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/eplain/base/test/hlink.tex
blob: 939a552ad3c1b7e1feb74193f2bc1721d7e1947a (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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
\input ../eplain
%\enablehyperlinks[nolinks]
%\enablehyperlinks[pdftex]
%\enablehyperlinks[dvipdfm]
\enablehyperlinks

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

\ifpdf
  \pdfpagewidth=8.5in
  \pdfpageheight=11in
\fi

\def\sectionword{Section}%
\newcount\sectioncount
\def\beginsection#1\par{%
  \par
  \advance\sectioncount by1
 {\normalbaselineskip=3pc \normalbaselines
  \noindent\definexref{sec\the\sectioncount}{\the\sectioncount}{section}%
   {\bf Section~\the\sectioncount} #1\par}
}%

\def\deriv#1/#2{{{d#1}\over d#2}}%
\def\vec#1#2{#1_1,#1_2,\ldots,#1_{#2}}%
\def\cdotfill{\cleaders\hbox to 1em{\hss$\cdot$\hss}\hfill}%

% Set defaults for hyperlink options.
\hlopts{bstyle=U}% underlined border
\hlopts{bwidth=2}%
% Make \xrdef destinations make pages fit in the screen.
\hldesttype[xrdef]{fit}% fit page
% Set hyperlink options for various kinds of hyperlinks.
\hlopts![ref]{bstyle=D,bdash=3,hlight=I}% dash border, invert box hlight
\hlopts[ref]{bcolor=1 0 0,bwidth=1}% add options to the current list
\hlopts![eq]{bcolor=0 1 0,hlight=O}% invert border hlight
\hlopts![xref]{bstyle=I,bcolor=0 0 1,hlight=P,bwidth=4}% inset border, inset hlight


Ordered list:
\numberedlist
\li[li1] Item 1
\li[li2] \xrdef{li2:pg}Item 2
  \numberedlist
    \li[li2.a] subitem 2.a
    \li[li2.b] subitem 2.b
  \endnumberedlist
\li Item 3
\endnumberedlist

Reference to \ref{li1}.  Reference to {\let\reftie.\refn[item~\refn{li2}]{li2.b}}.

\vskip\abovelistskipamount
Unordered list:
\unorderedlist
\li[uli1] Item 1
\li Item 2
  \unorderedlist
    \li[uli2.a] subitem 2.a
    \li subitem 2.b
  \endunorderedlist
\endunorderedlist

Refereneces to \ref[\sevenrm\lbrack dvipdfm will not make the \blackbox\ part of
the link\rbrack]{uli1} and~\refn{uli2.a}.


\beginsection \xrdef{sec1:pg}

Reference to \ref{sec1} and forward reference to \ref{sec2}.



\beginsection

References to \refs{sec1} and~\refn{sec2}.

\indent\ref{sec3} will start on \xref{sec3:pg}.
$$\|A\| = \sup_{x\ne0} { \|Ax\| \over \|x\| }. \eqdef{eq1}$$
Reference to \eqref{eq1}.
$$\|A\| \ge {\|Ax\| \over \|x\|}. \eqsubdef{}$$
Reference to \eqref[subequation]{}.
$$\|Ax\| \le \|A\| \cdot \|x\|. \eqsubdef{subeq1.2}$$
Reference to \eqref[subequation]{subeq1.2}.  One more reference to
\eqref[subequation]{}.

\vfil\eject



Forward reference to \eqref[equation]{subeq2.1}.
$$\openup\jot
\eqalignno{\eqdefn{eq2}% fake definition for \eqsubdef's to work
  \deriv x/t &= 3x-2y,&\eqsubdef{subeq2.1}\cr
  \deriv y/t &= 2x-y.&\eqsubdef{subeq2.2}\cr
}$$
References to equations \eqref{eq2}, \eqref{subeq2.1} and~\eqref{subeq2.2}.

$$\hldestopts[eq]{raise=4.5\normalbaselineskip}
\openup\jot
\left.\,\eqalign{
  \deriv x_1/t &= f_1(t,\vec xn),\cr
  \deriv x_2/t &= f_2(t,\vec xn),\cr
  \omit\span\omit\strut\cdotfill\cr
  \deriv x_n/t &= f_n(t,\vec xn).\cr
}\,\right\}\eqdef{eq3}$$
Another notation for the \eqref[system]{eq3}:
$$\deriv x_i/t=f_i(t,\vec xn)\quad
(i=1,2,\ldots,n).\eqdef[\hbox{$\eqrefn{eq3}^*$}]{}$$
Reference to \eqref[system]{}.

Subequations in \verbatim\displaylines|endverbatim:
$$\openup\jot
\displaylines{
  \eqsubdefn{eq3*.1}
  \hfill\deriv x_2/t=f_2(t,\vec xn),\hfill\llap{\eqsubdef{eq3*.2}}\cr
  \hfill\deriv x_3/t=f_3(t,\vec xn).\hfill\llap{\eqsubdef{eq3*.3}}\cr
}$$
References to \eqref{eq3*.1}, \eqref{eq3*.2} and~\eqref{eq3*.3}.

\hloff[eq,]
One more reference to \eqref[system]{}.
\hlon
And one more reference to \eqref[system]{}.

\beginsection \xrdef{sec3:pg}

\definecolor{mycolor}{rgb}{0,0,1}
\hlopts{colormodel=,color=mycolor}

Reference to \ref[item]{li2} on {\hloff\xref{li2:pg}}.

\indent\ref{sec1} started on {\def\xrefpageword{page~}\xref[title]{sec1:pg}}.



\bye

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