*** empty log message ***
[m17n/m17n-docs.git] / styles / htex4ht.def
1 %%
2 %% This is file `htex4ht.def',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% hyperref.dtx  (with options: `tex4ht')
8 %% 
9 %% File: hyperref.dtx Copyright 1995-2001 Sebastian Rahtz,
10 %% RCS: $Id: hyperref.dtx 6.71 2000/10/04 rahtz Exp rahtz $
11 %%
12 %% This file is part of the `Hyperref Bundle'.
13 %% -------------------------------------------
14 %%
15 %% It may be distributed under the conditions of the LaTeX Project Public
16 %% License, either version 1.2 of this license or (at your option) any
17 %% later version.  The latest version of this license is in
18 %%    http://www.latex-project.org/lppl.txt
19 %% and version 1.2 or later is part of all distributions of LaTeX
20 %% version 1999/12/01 or later.
21 %%
22 %% The list of all files belonging to the `Hyperref Bundle' is
23 %% given in the file `manifest.txt'.
24 %%
25 \ProvidesFile{htex4ht.def}
26   [2001/05/26 v6.71g
27   Hyperref driver for TeX4ht]
28 \@ifpackageloaded{tex4ht}
29   {\typeout{hyperref tex4ht: tex4ht already loaded}}%
30   {\RequirePackage[htex4ht]{tex4ht}}
31 \def\PDF@FinishDoc{}
32 \def\PDF@SetupDoc{%
33   \ifx\@baseurl\@empty\else
34     \special{t4ht=<base href="\@baseurl">}%
35   \fi
36 }
37 \def\hyper@anchor#1{%
38   \Hy@SaveLastskip
39   \begingroup
40     \let\protect=\string
41     \special{t4ht=<a name=\hyper@quote #1\hyper@quote>}%
42   \endgroup
43   \Hy@activeanchortrue
44   \Hy@colorlink{\@anchorcolor}\anchor@spot\Hy@endcolorlink
45   \special{t4ht=</a>}%
46   \Hy@activeanchorfalse
47   \Hy@RestoreLastskip
48 }
49 \def\hyper@anchorstart#1{%
50   \Hy@SaveLastskip
51   \begingroup
52     \hyper@chars\special{t4ht=<a name=\hyper@quote#1\hyper@quote>}%
53   \endgroup
54   \Hy@activeanchortrue
55 }
56 \def\hyper@anchorend{%
57   \special{t4ht=</a>}%
58   \Hy@activeanchorfalse
59   \Hy@RestoreLastskip
60 }
61 \def\@urltype{url}
62 \def\hyper@linkstart#1#2{%
63   \Hy@colorlink{\csname @#1color\endcsname}%
64   \def\Hy@tempa{#1}%
65   \ifx\Hy@tempa\@urltype
66     \special{t4ht=<a href=\hyper@quote#2\hyper@quote>}%
67   \else
68     {\hyper@chars\special{t4ht=<a href=\hyper@quote\##2\hyper@quote>}}%
69   \fi
70 }
71 \def\hyper@linkend{%
72   \special{t4ht=</a>}%
73   \Hy@endcolorlink
74 }
75 \def\hyper@linkfile#1#2#3{%
76   \hyper@linkurl{#1}{file:#2\ifx\\#3\\\else\##3\fi}%
77 }
78 \def\hyper@linkurl#1#2{%
79   \leavevmode
80   \ifHy@raiselinks
81     \setbox\@tempboxa=\color@hbox #1\color@endbox
82     \@linkdim\dp\@tempboxa
83     \lower\@linkdim\hbox{%
84       \begingroup
85         \hyper@chars\special{t4ht=<a href=\hyper@quote#2\hyper@quote>}%
86       \endgroup
87     }%
88     \Hy@colorlink{\@urlcolor}#1\Hy@endcolorlink
89     \@linkdim\ht\@tempboxa
90     \advance\@linkdim by -6.5\p@
91     \raise\@linkdim\hbox{\special{t4ht=</a>}}%
92  \else
93    \begingroup
94      \hyper@chars
95      \special{t4ht=<a href=\hyper@quote#2\hyper@quote>}%
96      \Hy@colorlink{\@urlcolor}#1\Hy@endcolorlink
97      \special{t4ht=</a>}%
98    \endgroup
99  \fi
100 }
101 \def\hyper@link#1#2#3{%
102   \hyper@linkurl{#3}{\##2}%
103 }
104 \def\hyper@image#1#2{%
105   \begingroup
106     \hyper@chars
107     \special{t4ht=<img src=\hyper@quote#1\hyper@quote>}%
108   \endgroup
109 }
110 \let\autoref\ref
111 \ifx \rEfLiNK \UnDef
112   \def\rEfLiNK #1#2{#2}%
113 \fi
114 \def\backref#1{}
115 \def\@Form[#1]{%
116   \setkeys{Form}{#1}%
117   \HCode{<form action="\Form@action" method="\Form@method">}%
118 }
119 \def\@endForm{\HCode{</form>}}
120 \def\@Gauge[#1]#2#3#4{% parameters, label, minimum, maximum
121   \typeout{Sorry, TeX4ht does not support gauges}%
122 }
123 \def\@TextField[#1]#2{% parameters, label
124   \let\Hy@reserved@a\@empty
125   \def\Fld@name{#2}%
126   \def\Fld@default{}%
127   \bgroup
128     \Field@toks={ }%
129     \setkeys{Field}{#1}%
130     \HCode{<label for="\Fld@name">#2</label>}%
131     \ifFld@password
132       \@@PasswordField
133     \else
134       \@@TextField
135     \fi
136   \egroup
137 }
138 \def\@@PasswordField{%
139   \HCode{%
140     <input type="password"
141      id="\Fld@name"
142      name="\Fld@name"
143      \ifFld@hidden type="hidden"\fi
144      value="\Fld@default"
145      \the\Field@toks
146     >%
147   }%
148 }
149 \def\@@TextField{%
150   \ifFld@multiline
151     \HCode{<textarea
152       \ifFld@readonly readonly \fi
153       id="\Fld@name"
154       name="\Fld@name"
155       \ifFld@hidden type="hidden"\fi
156       \the\Field@toks>%
157     }%
158     \Fld@default
159     \HCode{</textarea>}%
160   \else
161     \HCode{<input type="textbox"
162       \ifFld@readonly readonly \fi
163       id="\Fld@name"
164       name="\Fld@name"
165       \ifFld@hidden type="hidden"\fi
166       value="\Fld@default" \the\Field@toks>
167     }%
168   \fi
169 }
170 \def\@ChoiceMenu[#1]#2#3{% parameters, label, choices
171   \def\Fld@name{#2}%
172   \def\Fld@default{}%
173   \let\Hy@reserved@a\relax
174   \bgroup
175    \expandafter\Fld@findlength#3\\%
176    \Field@toks={ }%
177    \setkeys{Field}{#1}%
178    #2%
179    \ifFld@radio
180      \expandafter\@@Radio#3\\%
181    \else
182      \expandafter\@@Menu#3\\%
183    \fi
184   \egroup
185 }
186 \def\Fld@findlength#1\\{%
187   \Fld@menulength=0
188   \@for\@curropt:=#1\do{\Hy@StepCount\Fld@menulength}%
189 }
190 \def\@@Menu#1\\{%
191   \HCode{<select size="\the\Fld@menulength"
192     name="\Fld@name"  \the\Field@toks>}%
193   \@for\@curropt:=#1\do{%
194     \expandafter\Fld@checkequals\@curropt==\\%
195     \HCode{<option
196       \ifx\@curropt\Fld@default selected \fi
197       value="\@currValue">\@currDisplay</option>%
198     }%
199   }%
200   \HCode{</select>}%
201 }
202 \def\@@Radio#1\\{%
203   \@for\@curropt:=#1\do{%
204     \expandafter\Fld@checkequals\@curropt==\\%
205     \HCode{<input type="radio"
206       \ifx\@curropt\Fld@default checked \fi
207       name="\Fld@name"
208       value="\@currValue"
209       \the\Field@toks>%
210     }%
211     \@currDisplay
212   }%
213 }
214 \def\@PushButton[#1]#2{% parameters, label
215   \def\Fld@name{#2}%
216   \bgroup
217     \Field@toks={ }%
218     \setkeys{Field}{#1}%
219     \HCode{<input type="button"
220       name="\Fld@name"
221       value="#2"
222       \the\Field@toks>%
223     }%
224     \HCode{</button>}%
225   \egroup
226 }
227 \def\@Submit[#1]#2{%
228   \HCode{<button type="submit">#2</button>}%
229 }
230 \def\@Reset[#1]#2{%
231   \HCode{<button type="reset">#2</button>}%
232 }
233 \def\@CheckBox[#1]#2{% parameters, label
234   \let\Hy@reserved@a\@empty
235   \def\Fld@name{#2}%
236   \def\Fld@default{0}%
237   \bgroup
238     \Field@toks={ }%
239     \setkeys{Field}{#1}%
240     \HCode{<input type="checkbox"
241       \ifFld@checked checked \fi
242       \ifFld@disabled disabled \fi
243       \ifFld@readonly readonly \fi
244       name="\Fld@name"
245       \ifFld@hidden type="hidden"\fi
246       value="\Fld@default"
247       \the\Field@toks>%
248       #2%
249     }%
250   \egroup
251 }
252 \endinput
253 %%
254 %% End of file `htex4ht.def'.