summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hyperref/hypertex.def
blob: 4695262592e690c90d42c5899ab9a6c437092b72 (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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
%%
%% This is file `hypertex.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hyperref.dtx  (with options: `hypertex')
%% 
%% Copyright
%% 1995-2001 Sebastian Rahtz, with portions written by David Carlisle and Heiko Oberdiek,
%% 2001-2015 Heiko Oberdiek.
%% 2016-2019 Oberdiek Package Support Group
%% 2019-2022 LaTeX Project
%%      https://github.com/latex3/hyperref/issues
%% 
%% This file is part of the `Hyperref Bundle'.
%% -------------------------------------------
%% 
%% This work 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.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status `maintained'.
%% 
%% The Current Maintainer of this work is the LaTeX Project.
%% 
%% The list of all files belonging to the `Hyperref Bundle' is
%% given in the file `manifest.txt'.
%% 
%% File: hyperref.dtx
\ProvidesFile{hypertex.def}
  [2022-06-13 v7.00r %
  Hyperref driver for HyperTeX specials]
\Hy@VersionCheck{hypertex.def}
\providecommand*{\XR@ext}{dvi}
\let\PDF@FinishDoc\ltx@empty
\def\PDF@SetupDoc{%
  \ifx\@baseurl\@empty
  \else
    \special{html:<base href="\@baseurl">}%
  \fi
}
\Hy@WrapperDef\hyper@anchor#1{%
  \Hy@SaveLastskip
  \Hy@VerboseAnchor{#1}%
  \begingroup
    \let\protect=\string
    \hyper@chars
    \special{html:<a name=%
        \hyper@quote\HyperDestNameFilter{#1}\hyper@quote>}%
  \endgroup
  \Hy@activeanchortrue
  \Hy@colorlink\@anchorcolor\anchor@spot\Hy@endcolorlink
  \special{html:</a>}%
  \Hy@activeanchorfalse
  \Hy@RestoreLastskip
}
\Hy@WrapperDef\hyper@anchorstart#1{%
  \Hy@SaveLastskip
  \Hy@VerboseAnchor{#1}%
  \begingroup
    \hyper@chars
    \special{html:<a name=%
        \hyper@quote\HyperDestNameFilter{#1}\hyper@quote>}%
  \endgroup
  \Hy@activeanchortrue
}
\def\hyper@anchorend{%
  \special{html:</a>}%
  \Hy@activeanchorfalse
  \Hy@RestoreLastskip
}
\def\@urltype{url}
\def\hyper@linkstart#1#2{%
  \Hy@VerboseLinkStart{#1}{#2}%
  \expandafter\Hy@colorlink\csname @#1color\endcsname
  \def\Hy@tempa{#1}%
  \ifx\Hy@tempa\@urltype
    \special{html:<a href=\hyper@quote#2\hyper@quote>}%
  \else
    \begingroup
      \hyper@chars
      \special{html:<a href=%
          \hyper@quote\#\HyperDestNameFilter{#2}\hyper@quote>}%
    \endgroup
  \fi
}
\def\hyper@linkend{%
  \special{html:</a>}%
  \Hy@endcolorlink
}
\def\hyper@linkfile#1#2#3{%
  \hyper@linkurl{#1}{\Hy@linkfileprefix#2\ifx\\#3\\\else\##3\fi}%
}
\def\hyper@linkurl#1#2{%
  \leavevmode
  \ifHy@raiselinks
    \Hy@SaveSpaceFactor
    \Hy@SaveSavedSpaceFactor
    \sbox\@tempboxa{\Hy@RestoreSpaceFactor#1}%
    \Hy@RestoreSavedSpaceFactor
    \@linkdim\dp\@tempboxa
    \lower\@linkdim\hbox{%
      \hyper@chars
      \special{html:<a href=\hyper@quote#2\hyper@quote>}%
    }%
    \Hy@colorlink\@urlcolor
      \Hy@RestoreSpaceFactor
      #1%
      \Hy@SaveSpaceFactor
    \@linkdim\ht\@tempboxa
    \advance\@linkdim by -6.5\p@
    \raise\@linkdim\hbox{\special{html:</a>}}%
    \Hy@endcolorlink
    \Hy@RestoreSpaceFactor
  \else
    \begingroup
      \hyper@chars
      \special{html:<a href=\hyper@quote#2\hyper@quote>}%
      \Hy@colorlink\@urlcolor#1\Hy@xspace@end
      \special{html:</a>}%
      \Hy@endcolorlink
    \endgroup
  \fi
}
\def\hyper@link#1#2#3{%
  \Hy@VerboseLinkStart{#1}{#2}%
  \hyper@linkurl{#3}{\#\HyperDestNameFilter{#2}}%
}
\def\hyper@image#1#2{%
  \begingroup
    \hyper@chars
    \special{html:<img src=\hyper@quote#1\hyper@quote>}%
  \endgroup
}
\def\@Form[#1]{%
  \Hy@Message{Sorry, HyperTeX does not support FORMs}%
}
\let\@endForm\ltx@empty
\def\@Gauge[#1]#2#3#4{% parameters, label, minimum, maximum
  \Hy@Message{Sorry, HyperTeX does not support FORM gauges}%
}
\def\@TextField[#1]#2{% parameters, label
  \Hy@Message{Sorry, HyperTeX does not support FORM text fields}%
}
\def\@CheckBox[#1]#2{% parameters, label
  \Hy@Message{Sorry, HyperTeX does not support FORM checkboxes}%
}
\def\@ChoiceMenu[#1]#2#3{% parameters, label, choices
  \Hy@Message{Sorry, HyperTeX does not support FORM choice menus}%
}
\def\@PushButton[#1]#2{% parameters, label
  \Hy@Message{Sorry, HyperTeX does not support FORM pushbuttons}%
}
\def\@Reset[#1]#2{%
  \Hy@Message{Sorry, HyperTeX does not support FORMs}%
}
\def\@Submit[#1]#2{%
  \Hy@Message{Sorry, HyperTeX does not support FORMs}%
}
\newlength\Hy@SectionHShift
\def\Hy@SectionAnchorHref#1{%
  \ifx\protect\@typeset@protect
    \Hy@@SectionAnchor{#1}%
  \fi
}
\DeclareRobustCommand*{\Hy@@SectionAnchor}[1]{%
  \leavevmode
  \hbox to 0pt{%
    \kern-\Hy@SectionHShift
    \Hy@raisedlink{%
      \hyper@anchorstart{#1}\hyper@anchorend
    }%
    \hss
  }%
}
\@ifundefined{hyper@nopatch@sectioning}
{
\let\H@old@ssect\@ssect
\def\@ssect#1#2#3#4#5{%
  \Hy@MakeCurrentHrefAuto{section*}%
  \setlength{\Hy@SectionHShift}{#1}%
  \begingroup
    \toks@{\H@old@ssect{#1}{#2}{#3}{#4}}%
    \toks\tw@\expandafter{%
      \expandafter\Hy@SectionAnchorHref\expandafter{\@currentHref}%
      #5%
    }%
  \edef\x{\endgroup
    \the\toks@{\the\toks\tw@}%
  }\x
}
\let\H@old@schapter\@schapter
\def\@schapter#1{%
  \begingroup
    \let\@mkboth\@gobbletwo
    \Hy@MakeCurrentHrefAuto{\Hy@chapapp*}%
    \Hy@raisedlink{%
      \hyper@anchorstart{\@currentHref}\hyper@anchorend
    }%
  \endgroup
  \H@old@schapter{#1}%
}
\ltx@IfUndefined{@chapter}{}{%
  \let\Hy@org@chapter\@chapter
  \def\@chapter{%
    \def\Hy@next{%
      \Hy@MakeCurrentHrefAuto{\Hy@chapapp*}%
      \Hy@raisedlink{%
        \hyper@anchorstart{\@currentHref}\hyper@anchorend
      }%
    }%
    \ifnum\c@secnumdepth>\m@ne
      \ltx@IfUndefined{if@mainmatter}%
      \iftrue{\csname if@mainmatter\endcsname}%
        \let\Hy@next\relax
      \fi
    \fi
    \Hy@next
    \Hy@org@chapter
  }%
}
\let\H@old@part\@part
\@ifundefined{chapter}
  {\let\Hy@secnum@part\z@}
  {\let\Hy@secnum@part\m@ne}
\def\@part{%
  \ifnum\Hy@secnum@part>\c@secnumdepth
    \phantomsection
  \fi
  \H@old@part
}
\let\H@old@spart\@spart
\def\@spart#1{%
  \Hy@MakeCurrentHrefAuto{part*}%
  \Hy@raisedlink{%
    \hyper@anchorstart{\@currentHref}\hyper@anchorend
  }%
  \H@old@spart{#1}%
}
\let\H@old@sect\@sect
\def\@sect#1#2#3#4#5#6[#7]#8{%
  \ifnum #2>\c@secnumdepth
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
  {%
    \Hy@MakeCurrentHrefAuto{section*}%
    \setlength{\Hy@SectionHShift}{#3}%
    \begingroup
      \toks@{\H@old@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]}%
      \toks\tw@\expandafter{%
        \expandafter\Hy@SectionAnchorHref\expandafter{\@currentHref}%
        #8%
      }%
    \edef\x{\endgroup
      \the\toks@{\the\toks\tw@}%
    }\x
  }{%
    \H@old@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}%
  }%
}
}{}
\endinput
%%
%% End of file `hypertex.def'.