summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hyperref/htex4ht.def
blob: 281f6d2e8397d160550cff8370a8ff31e1b3a6fc (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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
%%
%% This is file `htex4ht.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hyperref.dtx  (with options: `tex4ht')
%% 
%% File: hyperref.dtx Copyright 1995-2001 Sebastian Rahtz,
%% with portions written by David Carlisle and Heiko Oberdiek,
%% 2001-2010 Heiko Oberdiek.
%%
%% 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 Heiko Oberdiek.
%%
%% The list of all files belonging to the `Hyperref Bundle' is
%% given in the file `manifest.txt'.
%%
\ProvidesFile{htex4ht.def}
  [2010/09/13 v6.81n
  Hyperref driver for TeX4ht]
\providecommand*{\XR@ext}{html}
\def\Hy@raisedlink{}
\@ifpackageloaded{tex4ht}{%
  \Hy@InfoNoLine{tex4ht is already loaded}%
}{%
  \RequirePackage[htex4ht]{tex4ht}%
}
\hyperlinkfileprefix{}
\def\PDF@FinishDoc{}
\def\PDF@SetupDoc{%
  \ifx\@baseurl\@empty
  \else
    \special{t4ht=<base href="\@baseurl">}%
  \fi
}
\def\hyper@anchor#1{%
  \Hy@SaveLastskip
  \Hy@VerboseAnchor{#1}%
  \begingroup
    \let\protect=\string
    \special{t4ht=<a name=%
        \hyper@quote\HyperDestNameFilter{#1}\hyper@quote>}%
  \endgroup
  \Hy@activeanchortrue
  \Hy@colorlink\@anchorcolor\anchor@spot\Hy@endcolorlink
  \special{t4ht=</a>}%
  \Hy@activeanchorfalse
  \Hy@RestoreLastskip
}
\def\hyper@anchorstart#1{%
  \Hy@SaveLastskip
  \Hy@VerboseAnchor{#1}%
  \begingroup
    \hyper@chars\special{t4ht=<a name=%
        \hyper@quote\HyperDestNameFilter{#1}\hyper@quote>}%
  \endgroup
  \Hy@activeanchortrue
}
\def\hyper@anchorend{%
  \special{t4ht=</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{t4ht=<a href=\hyper@quote#2\hyper@quote>}%
  \else
    \begingroup
      \hyper@chars
      \special{t4ht=<a href=%
          \hyper@quote\#\HyperDestNameFilter{#2}\hyper@quote>}%
    \endgroup
  \fi
}
\def\hyper@linkend{%
  \special{t4ht=</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{%
      \begingroup
        \hyper@chars
        \special{%
          t4ht=<a href=\hyper@quote#2\hyper@quote>%
        }%
      \endgroup
    }%
    \Hy@colorlink\@urlcolor
      \Hy@RestoreSpaceFactor
      #1%
      \Hy@SaveSpaceFactor
    \Hy@endcolorlink
    \@linkdim\ht\@tempboxa
    \advance\@linkdim by -6.5\p@
    \raise\@linkdim\hbox{\special{t4ht=</a>}}%
    \Hy@RestoreSpaceFactor
 \else
   \begingroup
     \hyper@chars
     \special{t4ht=<a href=\hyper@quote#2\hyper@quote>}%
     \Hy@colorlink\@urlcolor#1\Hy@endcolorlink
     \special{t4ht=</a>}%
   \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{t4ht=<img src=\hyper@quote#1\hyper@quote>}%
  \endgroup
}
\let\autoref\ref
\ifx \rEfLiNK \UnDef
  \def\rEfLiNK #1#2{#2}%
\fi
\def\backref#1{}
\AtBeginDocument{%
  \expandafter\let\expandafter\Hy@OrgMakeLabel\csname Make:Label\endcsname
  \expandafter\def\csname Make:Label\endcsname#1#2{%
    \ifhmode
      \Hy@SaveSpaceFactor
    \else
      \global\Hy@SavedSpaceFactor=1000 %
    \fi
    \Hy@OrgMakeLabel{#1}{%
      \Hy@RestoreSpaceFactor
      #2%
      \Hy@SaveSpaceFactor
    }%
    \Hy@RestoreSpaceFactor
  }%
}
\def\@Form[#1]{%
  \kvsetkeys{Form}{#1}%
  \HCode{<form action="\Form@action" method="\Form@method">}%
}
\def\@endForm{\HCode{</form>}}
\def\@Gauge[#1]#2#3#4{% parameters, label, minimum, maximum
  \Hy@Message{Sorry, TeX4ht does not support gauges}%
}
\def\@TextField[#1]#2{% parameters, label
  \let\Hy@reserved@a\@empty
  \def\Fld@name{#2}%
  \def\Fld@default{}%
  \bgroup
    \Field@toks={ }%
    \kvsetkeys{Field}{#1}%
    \HCode{<label for="\Fld@name">#2</label>}%
    \ifFld@password
      \@@PasswordField
    \else
      \@@TextField
    \fi
  \egroup
}
\def\@@PasswordField{%
  \HCode{%
    <input type="password" %
     id="\Fld@name" %
     name="\Fld@name" %
     \ifFld@hidden type="hidden" \fi
     value="\Fld@default" %
     \the\Field@toks
    >%
  }%
}
\def\@@TextField{%
  \ifFld@multiline
    \HCode{<textarea %
      \ifFld@readonly readonly \fi
      id="\Fld@name" %
      name="\Fld@name" %
      \ifFld@hidden type="hidden" \fi
      \the\Field@toks>%
    }%
    \Fld@default
    \HCode{</textarea>}%
  \else
    \HCode{<input type="textbox" %
      \ifFld@readonly readonly \fi
      id="\Fld@name" %
      name="\Fld@name" %
      \ifFld@hidden type="hidden" \fi
      value="\Fld@default" %
      \the\Field@toks>%
    }%
  \fi
}
\def\@ChoiceMenu[#1]#2#3{% parameters, label, choices
  \def\Fld@name{#2}%
  \def\Fld@default{}%
  \let\Hy@reserved@a\relax
  \begingroup
    \expandafter\Fld@findlength#3\\%
    \Field@toks={ }%
    \kvsetkeys{Field}{#1}%
    #2%
    \ifFld@radio
      \expandafter\@@Radio#3\\%
    \else
      \expandafter\@@Menu#3\\%
    \fi
  \endgroup
}
\def\Fld@findlength#1\\{%
  \Fld@menulength=0 %
  \@for\@curropt:=#1\do{\Hy@StepCount\Fld@menulength}%
}
\def\@@Menu#1\\{%
  \HCode{<select size="\the\Fld@menulength" %
    name="\Fld@name" %
    \the\Field@toks>%
  }%
  \@for\@curropt:=#1\do{%
    \expandafter\Fld@checkequals\@curropt==\\%
    \HCode{<option %
      \ifx\@curropt\Fld@default selected \fi
      value="\@currValue">\@currDisplay</option>%
    }%
  }%
  \HCode{</select>}%
}
\def\@@Radio#1\\{%
  \@for\@curropt:=#1\do{%
    \expandafter\Fld@checkequals\@curropt==\\%
    \HCode{<input type="radio" %
      \ifx\@curropt\Fld@default checked \fi
      name="\Fld@name" %
      value="\@currValue" %
      \the\Field@toks>%
    }%
    \@currDisplay
  }%
}
\def\@PushButton[#1]#2{% parameters, label
  \def\Fld@name{#2}%
  \bgroup
    \Field@toks={ }%
    \kvsetkeys{Field}{#1}%
    \HCode{<input type="button" %
      name="\Fld@name" %
      value="#2" %
      \the\Field@toks>%
    }%
    \HCode{</button>}%
  \egroup
}
\def\@Submit[#1]#2{%
  \HCode{<button type="submit">#2</button>}%
}
\def\@Reset[#1]#2{%
  \HCode{<button type="reset">#2</button>}%
}
\def\@CheckBox[#1]#2{% parameters, label
  \let\Hy@reserved@a\@empty
  \def\Fld@name{#2}%
  \def\Fld@default{0}%
  \bgroup
    \Field@toks={ }%
    \kvsetkeys{Field}{#1}%
    \HCode{<input type="checkbox" %
      \ifFld@checked checked \fi
      \ifFld@disabled disabled \fi
      \ifFld@readonly readonly \fi
      name="\Fld@name" %
      \ifFld@hidden type="hidden" \fi
      value="\Fld@default" %
      \the\Field@toks>%
      #2%
    }%
  \egroup
}
\endinput
%%
%% End of file `htex4ht.def'.