*** empty log message ***
[m17n/m17n-docs.git] / styles / pdfmark.def
1 %%
2 %% This is file `pdfmark.def',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% hyperref.dtx  (with options: `pdfmark,pdfmarkbase,pdfform,outlines')
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{pdfmark.def}
26   [2001/05/26 v6.71g
27   Hyperref definitions for pdfmark specials]
28 \def\Hy@PutCatalog#1{%
29   \pdfmark{pdfmark=/PUT,Raw={\string{Catalog\string} << #1 >>}}%
30 }
31 \ifHy@pagelabels
32   \def\HyPL@StorePageLabel#1{%
33     \if@filesw
34       \begingroup
35         \edef\Hy@tempa{\the\Hy@abspage\space<< #1 >> }%
36         \immediate\write\@mainaux{%
37           \string\HyPL@Entry{\Hy@tempa}%
38         }%
39       \endgroup
40     \fi
41   }
42   \AfterBeginDocument{%
43     \if@filesw
44       \immediate\write\@mainaux{%
45         \string\providecommand\string*\string\HyPL@Entry[1]{}%
46       }%
47     \fi
48     \ifx\HyPL@Labels\@empty
49       \Hy@WarningNoLine{Rerun to get /PageLabels entry}%
50     \else
51       \HyPL@SetPageLabels
52     \fi
53     \let\HyPL@Entry\@gobble
54   }%
55   \def\HyPL@Entry#1{%
56     \expandafter\gdef\expandafter\HyPL@Labels\expandafter{%
57       \HyPL@Labels
58       #1%
59     }%
60   }
61 \fi
62 \def\hyper@anchor#1{%
63   \Hy@SaveLastskip
64   \begingroup
65     \pdfmark[\anchor@spot]{%
66       pdfmark=/DEST,%
67       linktype=anchor,%
68       View=/\@pdfview \@pdfviewparams,%
69       DestAnchor={#1}%
70     }%
71   \endgroup
72   \Hy@RestoreLastskip
73 }
74 \@ifundefined{hyper@anchorstart}{}{\endinput}
75 \def\hyper@anchorstart#1{%
76   \Hy@SaveLastskip
77   \literalps@out{H.S}%
78   \xdef\hyper@currentanchor{#1}%
79   \Hy@activeanchortrue
80 }
81 \def\hyper@anchorend{%
82   \literalps@out{\strip@pt@and@otherjunk\baselineskip\space H.A}%
83   \pdfmark{%
84     pdfmark=/DEST,%
85     linktype=anchor,%
86     View=/\@pdfview \@pdfviewparams,%
87     DestAnchor=\hyper@currentanchor,%
88     Raw=H.B%
89   }%
90   \Hy@activeanchorfalse
91   \Hy@RestoreLastskip
92 }
93 \def\hyper@linkstart#1#2{%
94   \ifHy@breaklinks
95   \else
96     \leavevmode\hbox\bgroup
97   \fi
98   \Hy@colorlink{\csname @#1color\endcsname}%
99   \literalps@out{H.S}%
100   \xdef\hyper@currentanchor{#2}%
101   \gdef\hyper@currentlinktype{#1}%
102 }
103 \def\hyper@linkend{%
104   \literalps@out{\strip@pt@and@otherjunk\baselineskip\space H.L}%
105   \edef\Hy@temp{\csname @\hyper@currentlinktype bordercolor\endcsname}%
106   \pdfmark{%
107     pdfmark=/ANN,%
108     linktype=link,%
109     Subtype=/Link,%
110     Dest=\hyper@currentanchor,%
111     AcroHighlight=\@pdfhighlight,%
112     Border=\@pdfborder,%
113     Color=\Hy@temp,%
114     Raw=H.B%
115   }%
116   \Hy@endcolorlink
117   \ifHy@breaklinks
118   \else
119     \egroup
120   \fi
121 }
122 \def\hyper@pagetransition{%
123   \ifx\@pdfpagetransition\relax
124   \else
125     \ifx\@pdfpagetransition\@empty
126       % 1. Does an old entry have to be deleted?
127       % 2. If 1=yes, how to delete?
128     \else
129       \pdfmark{%
130         pdfmark=/PUT,%
131         Raw={%
132           {ThisPage} <<
133             /Trans << /S /\@pdfpagetransition\space >>
134           >>%
135         }%
136       }%
137     \fi
138   \fi
139 }
140 \def\hyper@pageduration{%
141   \ifx\@pdfpageduration\relax
142   \else
143     \ifx\@pdfpageduration\@empty
144       % 1. Does an old entry have to be deleted?
145       % 2. If 1=yes, how to delete?
146     \else
147       \pdfmark{%
148         pdfmark=/PUT,%
149         Raw={%
150           {ThisPage} <</Dur \@pdfpageduration>>%
151         }%
152       }%
153     \fi
154   \fi
155 }
156 \def\hyper@pagehidden{%
157   \ifHy@useHidKey
158     \pdfmark{%
159       pdfmark=/PUT,%
160       Raw={%
161         {ThisPage} <</Hid \ifHy@pdfpagehidden true\else false\fi>>%
162       }%
163     }%
164   \fi
165 }
166 \def\hyper@image#1#2{%
167   \hyper@linkurl{#2}{#1}}
168 \def\Hy@undefinedname{UNDEFINED}
169 \def\hyper@link#1#2#3{%
170   \edef\Hy@temp{\csname @#1bordercolor\endcsname}%
171   \begingroup
172     \protected@edef\Hy@testname{#2}%
173     \ifx\Hy@testname\@empty
174       \let\Hy@testname\Hy@undefinedname
175     \fi
176     \pdfmark[{#3}]{%
177       Color=\Hy@temp,%
178       linktype=#1,%
179       AcroHighlight=\@pdfhighlight,%
180       Border=\@pdfborder,%
181       pdfmark=/ANN,%
182       Subtype=/Link,%
183       Dest=\Hy@testname
184     }%
185   \endgroup
186 }
187 \newtoks\pdf@docset
188 \def\PDF@FinishDoc{%
189   \pdfmark{%
190     pdfmark=/DOCINFO,%
191     Title=\@pdftitle,%
192     Subject=\@pdfsubject,%
193     Creator=\@pdfcreator,%
194     Author=\@pdfauthor,%
195     Producer=\@pdfproducer,%
196     Keywords=\@pdfkeywords
197   }%
198   \Hy@DisableOption{pdfauthor}%
199   \Hy@DisableOption{pdftitle}%
200   \Hy@DisableOption{pdfsubject}%
201   \Hy@DisableOption{pdfcreator}%
202   \Hy@DisableOption{pdfproducer}%
203   \Hy@DisableOption{pdfkeywords}%
204 }
205 \def\PDF@SetupDoc{%
206   \ifx\@baseurl\@empty\def\@dobaseurl{}\else
207     \def\@dobaseurl{}%
208   \fi
209   \pdfmark{%
210     pdfmark=/DOCVIEW,%
211     Page=\@pdfstartpage,%
212     View=\@pdfstartview,%
213     URI={<< /Base (\@baseurl) >>},%
214     PageMode=\@pdfpagemode
215   }%
216   \ifx\@pdfpagescrop\@empty
217   \else
218     \pdfmark{pdfmark=/PAGES,CropBox=\@pdfpagescrop}%
219   \fi
220   \pdfmark{%
221     pdfmark=/PUT,%
222     Raw={%
223       \string{Catalog\string} <<
224         /ViewerPreferences <<
225           \ifHy@toolbar\else /HideToolbar true \fi
226           \ifHy@menubar\else /HideMenubar true \fi
227           \ifHy@windowui\else /HideWindowUI true \fi
228           \ifHy@fitwindow /FitWindow true \fi
229           \ifHy@centerwindow /CenterWindow true \fi
230         >>
231         \ifx\pdf@pagelayout\@empty
232         \else
233           /PageLayout /\pdf@pagelayout\space
234         \fi
235       >>%
236     }%
237   }%
238 }
239 \def\pdfmark{\@ifnextchar[{\pdfmark@}{\pdfmark@[]}}
240 \def\pdfmark@[#1]#2{%
241     \edef\@processme{\noexpand\pdf@toks={\the\pdf@defaulttoks}}%
242     \@processme
243     \let\pdf@type\relax
244     \setkeys{PDF}{#2}%
245     \ifx\pdf@type\relax
246        \Hy@WarningNoLine{no pdfmark type specified in #2!!}%
247        \ifx\\#1\\\relax\else\pdf@rect{#1}\fi
248     \else
249        \ifx\\#1\\\relax
250   \literalps@out{[\the\pdf@toks\space\pdf@type\space pdfmark}%
251        \else
252          \Hy@colorlink{\@ifundefined{@\pdf@linktype color}%
253                       {\@linkcolor}%
254                       {\csname @\pdf@linktype color\endcsname}}%
255          \pdf@rect{#1}%
256   \literalps@out{[\the\pdf@toks\space\pdf@type\space pdfmark}%
257          \Hy@endcolorlink
258        \fi
259     \fi
260 }
261 \newsavebox{\pdf@box}
262 \def\pdf@rect#1{%
263   \leavevmode
264   \sbox\pdf@box{#1}%
265   \dimen@\ht\pdf@box
266   \leavevmode
267   \ifdim\dp\pdf@box=\z@
268     \literalps@out{H.S}%
269   \else
270     \lower\dp\pdf@box\hbox{\literalps@out{H.S}}%
271   \fi
272   \ifHy@breaklinks\unhbox\else\box\fi\pdf@box
273   \ifdim\dimen@=\z@
274     \literalps@out{H.R}%
275   \else
276     \raise\dimen@\hbox{\literalps@out{H.R}}%
277   \fi
278   \pdf@addtoksx{H.B}%
279 }
280 \newtoks\pdf@toks
281 \newtoks\pdf@defaulttoks
282 \pdf@defaulttoks={}%
283 \def\pdf@addtoks#1#2{%
284   \edef\@processme{\pdf@toks{\the\pdf@toks\space /#2 #1}}%
285   \@processme
286 }
287 \def\pdf@addtoksx#1{%
288   \edef\@processme{\pdf@toks{\the\pdf@toks\space #1}}%
289   \@processme
290 }
291 \def\PDFdefaults#1{%
292   \pdf@defaulttoks={#1}%
293 }
294 \define@key{PDF}{pdfmark}{\def\pdf@type{#1}}
295 \define@key{PDF}{linktype}{\def\pdf@linktype{#1}}
296 \def\pdf@linktype{link}
297 \define@key{PDF}{Raw}{\pdf@addtoksx{#1}}
298 \define@key{PDF}{Action}{\pdf@addtoks{#1}{Action}}
299 \define@key{PDF}{Border}{\pdf@addtoks{[#1]}{Border}}
300 \define@key{PDF}{Color}{\pdf@addtoks{[#1]}{Color}}
301 \define@key{PDF}{Contents}{\pdf@addtoks{(#1)}{Contents}}
302 \define@key{PDF}{Count}{\pdf@addtoks{#1}{Count}}
303 \define@key{PDF}{CropBox}{\pdf@addtoks{[#1]}{CropBox}}
304 \define@key{PDF}{DOSFile}{\pdf@addtoks{(#1)}{DOSFile}}
305 \define@key{PDF}{DataSource}{\pdf@addtoks{(#1)}{DataSource}}
306 \define@key{PDF}{Dest}{%
307   \begingroup
308     \edef\x{#1}%
309   \expandafter\endgroup
310   \ifx\x\@empty\else\pdf@addtoks{(#1) cvn}{Dest}\fi
311 }
312 \define@key{PDF}{DestAnchor}{%
313   \begingroup
314     \edef\x{#1}%
315   \expandafter\endgroup
316   \ifx\x\@empty\else\pdf@addtoks{(#1) cvn}{Dest}\fi
317 }
318 \define@key{PDF}{Dir}{\pdf@addtoks{(#1)}{Dir}}
319 \define@key{PDF}{File}{\pdf@addtoks{(#1)}{File}}
320 \define@key{PDF}{Flags}{\pdf@addtoks{#1}{Flags}}
321 \define@key{PDF}{AcroHighlight}{\pdf@addtoks{#1}{H}}
322 \define@key{PDF}{ID}{\pdf@addtoks{[#1]}{ID}}
323 \define@key{PDF}{MacFile}{\pdf@addtoks{(#1)}{MacFile}}
324 \define@key{PDF}{ModDate}{\pdf@addtoks{(#1)}{ModDate}}
325 \define@key{PDF}{Op}{\pdf@addtoks{(#1)}{Op}}
326 \define@key{PDF}{Open}{\pdf@addtoks{#1}{Open}}
327 \define@key{PDF}{Page}{\pdf@addtoks{#1}{Page}}
328 \define@key{PDF}{PageMode}{\pdf@addtoks{#1}{PageMode}}
329 \define@key{PDF}{Params}{\pdf@addtoks{(#1)}{Params}}
330 \define@key{PDF}{Rect}{\pdf@addtoks{[#1]}{Rect}}
331 \define@key{PDF}{SrcPg}{\pdf@addtoks{#1}{SrcPg}}
332 \define@key{PDF}{Subtype}{\pdf@addtoks{#1}{Subtype}}
333 \define@key{PDF}{Title}{\pdf@addtoks{(#1)}{Title}}
334 \define@key{PDF}{Unix}{\pdf@addtoks{(#1)}{Unix}}
335 \define@key{PDF}{UnixFile}{\pdf@addtoks{(#1)}{UnixFile}}
336 \define@key{PDF}{View}{\pdf@addtoks{[#1]}{View}}
337 \define@key{PDF}{WinFile}{\pdf@addtoks{(#1)}{WinFile}}
338 \define@key{PDF}{Author}{\pdf@addtoks{(#1)}{Author}}
339 \define@key{PDF}{CreationDate}{\pdf@addtoks{(#1)}{CreationDate}}
340 \define@key{PDF}{Creator}{\pdf@addtoks{(#1)}{Creator}}
341 \define@key{PDF}{Producer}{\pdf@addtoks{(#1)}{Producer}}
342 \define@key{PDF}{Subject}{\pdf@addtoks{(#1)}{Subject}}
343 \define@key{PDF}{Keywords}{\pdf@addtoks{(#1)}{Keywords}}
344 \define@key{PDF}{ModDate}{\pdf@addtoks{(#1)}{ModDate}}
345 \define@key{PDF}{Base}{\pdf@addtoks{(#1)}{Base}}
346 \define@key{PDF}{URI}{\pdf@addtoks{#1}{URI}}
347 \def\Acrobatmenu#1#2{%
348   \pdfmark[{#2}]{%
349     linktype=menu,%
350     pdfmark=/ANN,%
351     AcroHighlight=\@pdfhighlight,%
352     Border=\@pdfborder,%
353     Action=<< /Subtype /Named /N /#1 >>,%
354     Subtype=/Link%
355   }%
356 }
357 \def\PDFNextPage{\@ifnextchar[{\PDFNextPage@}{\PDFNextPage@[]}}
358 \def\PDFNextPage@[#1]#2{%
359   \pdfmark[{#2}]{#1,Border=\@pdfborder,Color=.2 .1 .5,
360   pdfmark=/ANN,Subtype=/Link,Page=/Next}}
361 \def\PDFPreviousPage{%
362   \@ifnextchar[{\PDFPreviousPage@}{\PDFPreviousPage@[]}%
363 }
364 \def\PDFPreviousPage@[#1]#2{%
365   \pdfmark[{#2}]{#1,Border=\@pdfborder,Color=.4 .4 .1,
366   pdfmark=/ANN,Subtype=/Link,Page=/Prev}}
367 \def\PDFOpen#1{%
368   \pdfmark{#1,pdfmark=/DOCVIEW}%
369 }
370 \def\PDFPage{\@ifnextchar[{\PDFPage@}{\PDFPage@[]}}
371 \def\PDFPage@[#1]#2#3{%
372   \let\pageref\simple@pageref
373   \pdfmark[{#3}]{%
374     #1,%
375     Page=#2,%
376     AcroHighlight=\@pdfhighlight,%
377     Border=\@pdfborder,%
378     Color=\@pagebordercolor,%
379     pdfmark=/ANN,%
380     Subtype=/Link%
381   }%
382 }
383 \def\simple@pageref#1{%
384   \expandafter\ifx\csname r@#1\endcsname\relax
385    0%
386   \else
387     \expandafter\expandafter\expandafter
388           \@secondoffive\csname r@#1\endcsname
389   \fi}
390 \def\hyper@linkurl#1#2{%
391   \begingroup
392     \hyper@chars
393     \leavevmode
394     \pdfmark[{#1}]{%
395       pdfmark=/ANN,%
396       linktype=url,%
397       AcroHighlight=\@pdfhighlight,%
398       Border=\@pdfborder,%
399       Color=\@urlbordercolor,%
400       Action={<< /Subtype /URI /URI (#2) >>},%
401       Subtype=/Link%
402     }%
403   \endgroup
404 }
405 \def\hyper@linkfile#1#2#3{%
406   \begingroup
407     \leavevmode
408     \pdfmark[{#1}]{%
409       pdfmark=/ANN,%
410       Subtype=/Link,
411       AcroHighlight=\@pdfhighlight,%
412       Border=\@pdfborder,%
413       linktype=file,%
414       Color=\@filebordercolor,%
415       Action=<<
416         /S /GoToR
417         \ifHy@newwindow /NewWindow true \fi
418         /F (#2)
419         /D \ifx\\#3\\[0 \@pdfstartview]\else(#3)\fi
420       >>%
421     }%
422   \endgroup
423 }
424 \def\@hyper@launch run:#1\\#2#3{%
425   \begingroup
426     \leavevmode
427     \pdfmark[{#2}]{%
428       pdfmark=/ANN,%
429       Subtype=/Link,%
430       AcroHighlight=\@pdfhighlight,%
431       Border=\@pdfborder,%
432       linktype=file,%
433       Color=\@filebordercolor,%
434       Action=<<
435         /S /Launch
436         \ifHy@newwindow /NewWindow true \fi
437         /F (#1)
438         \ifx\\#3\\\else /Win << /P (#3) /F (#1) >> \fi
439       >>%
440     }%
441   \endgroup
442 }
443 \long\def\@Form[#1]{%
444 \AtBeginDvi{%
445   \headerps@out{%
446 [ /_objdef {pdfDocEncoding}
447   /type /dict
448 /OBJ pdfmark
449 [ {pdfDocEncoding}
450  << /Type /Encoding
451     /Differences [ 24 /breve /caron /circumflex /dotaccent
452 /hungarumlaut /ogonek /ring /tilde 39 /quotesingle 96 /grave 128
453 /bullet /dagger /daggerdbl /ellipsis /emdash /endash /florin /fraction
454 /guilsinglleft /guilsinglright /minus /perthousand /quotedblbase
455 /quotedblleft /quotedblright /quoteleft /quoteright /quotesinglbase
456 /trademark /fi /fl /Lslash /OE /Scaron /Ydieresis /Zcaron /dotlessi
457 /lslash /oe /scaron /zcaron 164 /currency 166 /brokenbar 168 /dieresis
458 /copyright /ordfeminine 172 /logicalnot /.notdef /registered /macron
459 /degree /plusminus /twosuperior /threesuperior /acute /mu 183
460 /periodcentered /cedilla /onesuperior /ordmasculine 188 /onequarter
461 /onehalf /threequarters 192 /Agrave /Aacute /Acircumflex /Atilde
462 /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex
463 /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde
464 /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash
465 /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls
466 /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla
467 /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex
468 /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde
469 /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis
470 /yacute /thorn /ydieresis ]
471 >>
472 /PUT pdfmark
473 [ /_objdef {ZaDb}
474   /type /dict
475 /OBJ pdfmark
476 [ {ZaDb}
477   <<
478    /Type /Font
479    /Subtype /Type1
480    /Name /ZaDb
481    /BaseFont /ZapfDingbats
482   >>
483 /PUT pdfmark
484 [ /_objdef {Helv}
485   /type /dict
486 /OBJ pdfmark
487 [ {Helv}
488   <<
489   /Type /Font
490   /Subtype /Type1
491   /Name /Helv
492   /BaseFont /Helvetica
493   /Encoding {pdfDocEncoding}
494   >>
495 /PUT pdfmark
496 [ /_objdef {aform}
497   /type /dict
498 /OBJ pdfmark
499 [ /_objdef {afields}
500   /type /array
501 /OBJ pdfmark
502 [/BBox [0 0 100 100] /_objdef {Check} /BP pdfmark
503 1 0 0 setrgbcolor /ZapfDingbats 80 selectfont 20 20 moveto (4) show
504 [/EP pdfmark
505 [/BBox [0 0 100 100] /_objdef {Cross} /BP pdfmark
506 1 0 0 setrgbcolor /ZapfDingbats 80 selectfont 20 20 moveto (8) show
507 [/EP pdfmark
508 [/BBox [0 0 250 100] /_objdef {Submit} /BP pdfmark 0.6 setgray 0 0 250
509 100 rectfill 1 setgray 2 2 moveto 2 98 lineto 248 98 lineto 246 96
510 lineto 4 96 lineto 4 4 lineto fill 0.34 setgray 248 98 moveto 248 2
511 lineto 2 2 lineto 4 4 lineto 246 4 lineto 246 96 lineto fill
512 /Helvetica 76 selectfont 0 setgray 8 22.5 moveto (Submit) show
513 [/EP pdfmark
514 [/BBox [0 0 250 100] /_objdef {SubmitP} /BP pdfmark 0.6 setgray 0 0
515 250 100 rectfill 0.34 setgray 2 2 moveto 2 98 lineto 248 98 lineto 246
516 96 lineto 4 96 lineto 4 4 lineto fill 1 setgray 248 98 moveto 248 2
517 lineto 2 2 lineto 4 4 lineto 246 4 lineto 246 96 lineto fill
518 /Helvetica 76 selectfont 0 setgray 10 20.5 moveto (Submit) show
519 [/EP pdfmark
520 [ {aform}
521   <<
522     /Fields {afields}
523     /DR << /Font << /ZaDb {ZaDb} /Helv {Helv} >> >>
524     /DA (/Helv 10 Tf 0 g )
525     /CO {corder}
526     /NeedAppearances true
527   >>
528 /PUT pdfmark
529 [ \string{Catalog\string}
530   <<
531     /AcroForm {aform}
532   >>
533 /PUT pdfmark
534 [ /_objdef {corder} /type /array /OBJ pdfmark   % dps
535 }}%
536  \setkeys{Form}{#1}%
537 }
538 \def\@endForm{}
539 \def\@Gauge[#1]#2#3#4{% parameters, label, minimum, maximum
540   \typeout{Sorry, pdfmark drivers do not support FORM gauges}%
541 }
542 \def\@TextField[#1]#2{% parameters, label
543   \def\Fld@name{#2}%
544   \def\Fld@default{}%
545   \let\Fld@value\@empty
546   \def\Fld@width{\DefaultWidthofText}%
547   \def\Fld@height{\DefaultHeightofText}%
548   \bgroup
549     \Field@toks={ }%
550     \setkeys{Field}{#1}%
551     \ifFld@hidden\def\Fld@width{1sp}\fi
552     \ifx\Fld@value\@empty\def\Fld@value{\Fld@default}\fi
553     \ifFld@multiline
554       \def\Fld@height{4\DefaultHeightofText}%
555     \fi
556     \LayoutTextField{#2}{%
557       \pdfmark[\MakeTextField{\Fld@width}{\Fld@height}]{%
558         pdfmark=/ANN,Raw={\PDFForm@Text}%
559       }%
560     }%
561   \egroup
562 }
563 \def\@ChoiceMenu[#1]#2#3{% parameters, label, choices
564   \def\Fld@name{#2}%
565   \def\Fld@default{}%
566   \def\Fld@width{\DefaultWidthofChoiceMenu}%
567   \def\Fld@height{\DefaultHeightofChoiceMenu}%
568   \bgroup
569     \Fld@menulength=0
570     \@tempdima\z@
571     \@for\@curropt:=#3\do{%
572       \expandafter\Fld@checkequals\@curropt==\\%
573       \Hy@StepCount\Fld@menulength
574       \settowidth{\@tempdimb}{\@currDisplay}%
575       \ifdim\@tempdimb>\@tempdima\@tempdima\@tempdimb\fi
576     }%
577     \advance\@tempdima by 15\p@
578     \Field@toks={ }%
579     \setkeys{Field}{#1}%
580     \ifFld@hidden\def\Fld@width{1sp}\fi
581     \LayoutChoiceField{#2}{%
582       \ifFld@radio
583         \@@Radio{#3}%
584       \else
585         {%
586           \ifdim\Fld@width<\@tempdima
587             \ifdim\@tempdima<1cm\@tempdima1cm\fi
588             \edef\Fld@width{\the\@tempdima}%
589           \fi
590           \def\Fld@flags{}%
591           \ifFld@combo\def\Fld@flags{/Ff 917504}\fi
592           \ifFld@popdown\def\Fld@flags{/Ff 131072}\fi
593           \ifx\Fld@flags\@empty
594             \@tempdima=\the\Fld@menulength\Fld@charsize
595             \advance\@tempdima by \Fld@borderwidth bp
596             \advance\@tempdima by \Fld@borderwidth bp
597             \edef\Fld@height{\the\@tempdima}%
598           \fi
599           \@@Listbox{#3}%
600         }%
601       \fi
602     }%
603   \egroup
604 }
605 \def\@@Radio#1{%
606   \Fld@listcount=0
607   \@for\@curropt:=#1\do{%
608     \expandafter\Fld@checkequals\@curropt==\\%
609     \Hy@StepCount\Fld@listcount
610     \@currDisplay\space
611     \pdfmark[\MakeRadioField{\Fld@width}{\Fld@height}]{%
612       pdfmark=/ANN,%
613       Raw={\PDFForm@Radio /AP <</N <</\@currValue\space {Check}>> >>}%
614     } % deliberate space between radio buttons
615   }%
616 }
617 \newcount\Fld@listcount
618 \def\@@Listbox#1{%
619   \Choice@toks={ }%
620   \Fld@listcount=0
621   \@for\@curropt:=#1\do{%
622     \expandafter\Fld@checkequals\@curropt==\\%
623     \Hy@StepCount\Fld@listcount
624     \edef\@processme{%
625        \Choice@toks{\the\Choice@toks [(\@currValue) (\@currDisplay)]}%
626     }\@processme
627   }%
628   \pdfmark[\MakeChoiceField{\Fld@width}{\Fld@height}]{%
629     pdfmark=/ANN,Raw={\PDFForm@List}%
630   }%
631 }
632 \def\@PushButton[#1]#2{% parameters, label
633   \def\Fld@name{#2}%
634   \bgroup
635     \Field@toks={ }%
636     \setkeys{Field}{#1}%
637     \ifFld@hidden\def\Fld@width{1sp}\fi
638     \LayoutPushButtonField{%
639       \pdfmark[\MakeButtonField{#2}]{%
640         pdfmark=/ANN,Raw={\PDFForm@Push}%
641       }%
642     }%
643   \egroup
644 }
645 \def\@Submit[#1]#2{%
646   \Field@toks={ }%
647   \def\Fld@width{\DefaultWidthofSubmit}%
648   \def\Fld@height{\DefaultHeightofSubmit}%
649   \bgroup
650     \def\Fld@name{Submit}%
651     \setkeys{Field}{#1}%
652     \ifFld@hidden\def\Fld@width{1sp}\fi
653     \pdfmark[\MakeButtonField{#2}]{%
654       pdfmark=/ANN,%
655       Raw={\PDFForm@Submit /AP << /N {Submit} /D {SubmitP} >>}%
656     }%
657   \egroup
658 }
659 \def\@Reset[#1]#2{%
660   \Field@toks={ }%
661   \def\Fld@width{\DefaultWidthofReset}%
662   \def\Fld@height{\DefaultHeightofReset}%
663   \bgroup
664     \def\Fld@name{Reset}%
665     \setkeys{Field}{#1}%
666     \ifFld@hidden\def\Fld@width{1sp}\fi
667     \pdfmark[\MakeButtonField{#2}]{%
668       pdfmark=/ANN,Raw={\PDFForm@Reset}%
669     }%
670   \egroup
671 }
672 \def\@CheckBox[#1]#2{% parameters, label
673   \def\Fld@name{#2}%
674   \def\Fld@default{0}%
675   \bgroup
676     \def\Fld@width{\DefaultWidthofCheckBox}%
677     \def\Fld@height{\DefaultHeightofCheckBox}%
678     \Field@toks={ }%
679     \setkeys{Field}{#1}%
680     \ifFld@hidden\def\Fld@width{1sp}\fi
681     \LayoutCheckField{#2}{%
682       \pdfmark[\MakeCheckField{\Fld@width}{\Fld@height}]{%
683         pdfmark=/ANN,Raw={\PDFForm@Check}%
684       }%
685     }%
686   \egroup
687 }
688 \def\PDFForm@Check{%
689   /Subtype /Widget
690   \ifFld@hidden /F 6 \else /F 4 \fi
691   /T (\Fld@name)
692   /Q \Fld@align\space
693   /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >>
694   /MK <<
695     /BC [\Fld@bordercolor]
696     \ifx\Fld@bcolor\@empty
697     \else
698       /BG [\Fld@bcolor]
699     \fi
700     /CA (\Fld@cbsymbol)
701   >>
702   /DA (/ZaDb \strip@pt\Fld@charsize\space Tf \Fld@color\space rg)
703   /FT /Btn
704   /H /P
705   \ifFld@checked /V /Yes \else /V /Off \fi
706 }
707 \def\PDFForm@Push{%
708   /Subtype /Widget
709   \ifFld@hidden /F 6 \else /F 4 \fi
710   /T (\Fld@name)
711   /FT /Btn
712   /Ff 65540
713   /H /P
714   /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >>
715   /MK <<
716     /BC [\Fld@bordercolor]
717   >>
718   /A << /S /JavaScript /JS (\Fld@onclick;) >>
719 }
720 \def\PDFForm@List{%
721   /Subtype /Widget
722   \ifFld@hidden /F 6 \else /F 4 \fi
723   /T (\Fld@name)
724   /FT /Ch
725   /Q \Fld@align\space
726   /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >>
727   /MK <<
728     /BC [\Fld@bordercolor]
729     \ifx\Fld@bcolor\@empty
730     \else
731       /BG [\Fld@bcolor]
732     \fi
733   >>
734   /DA (/Helv \strip@pt\Fld@charsize\space Tf \Fld@color\space rg )
735   /Opt [\the\Choice@toks]
736   /DV (\Fld@default)
737   \Fld@flags
738 }
739 \def\PDFForm@Radio{%
740   /Subtype /Widget
741   \ifFld@hidden /F 6 \else /F 4 \fi
742   /T (\Fld@name)
743   /FT /Btn
744   /Ff 49152
745   /H /P
746   /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >>
747   /MK <<
748     /BC [\Fld@bordercolor]
749     \ifx\Fld@bcolor\@empty
750     \else
751       /BG [\Fld@bcolor]
752     \fi
753     /CA (H)
754   >>
755   /DA (/ZaDb \strip@pt\Fld@charsize\space Tf \Fld@color\space rg)
756   \ifx\@currValue\Fld@default
757     /V /\Fld@default\space
758   \else
759     /V /Off
760   \fi
761 }
762 \def\PDFForm@Text{%
763   /Subtype /Widget
764   \ifFld@hidden /F 6 \else /F 4 \fi
765   /T (\Fld@name)
766   /Q \Fld@align\space
767   /FT /Tx
768   /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >>
769   /MK <<
770     /BC [\Fld@bordercolor]
771     \ifx\Fld@bcolor\@empty
772     \else
773       /BG [\Fld@bcolor]
774     \fi
775   >>
776   /DA (/Helv \strip@pt\Fld@charsize\space Tf \Fld@color\space rg )
777   /DV (\Fld@default)
778   /AA <<
779     \ifx\Fld@keystroke@code\@empty
780     \else
781       /K << /S /JavaScript /JS (\Fld@keystroke@code) >>
782     \fi
783     \ifx\Fld@format@code\@empty
784     \else
785       /F << /S /JavaScript /JS (\Fld@format@code) >>
786     \fi
787     \ifx\Fld@validate@code\@empty
788     \else
789       /V << /S /JavaScript /JS (\Fld@validate@code) >>
790     \fi
791     \ifx\Fld@calculate@code\@empty
792     \else
793       /C << /S /JavaScript /JS (\Fld@calculate@code) >>
794     \fi
795   >>
796   /V (\Fld@value)
797   \ifFld@multiline
798     \ifFld@readonly /Ff 4097 \else /Ff 4096 \fi
799   \else
800     \ifFld@password
801       \ifFld@readonly /Ff 8193 \else /Ff 8192 \fi
802     \fi
803   \fi
804   \ifnum\Fld@maxlen>0/MaxLen \Fld@maxlen \fi
805 }
806 \def\PDFForm@Submit{%
807   /Subtype /Widget
808   \ifFld@hidden /F 6 \else /F 4 \fi
809   /T (\Fld@name)
810   /FT /Btn
811   /Ff 65540
812   /H /P
813   /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >>
814   /MK <<
815     /BC [\Fld@bordercolor]
816   >>
817   /A <<
818     /S /SubmitForm
819     /F <<
820       /FS /URL
821       /F (\Form@action)
822     >>
823     \ifForm@html /Flags 4 \fi
824   >>
825 }
826 \def\PDFForm@Reset{%
827   /Subtype /Widget
828   \ifFld@hidden /F 6 \else /F 4 \fi
829   /T (\Fld@name)
830   /FT /Btn
831   /H /P
832   /DA (/Helv \strip@pt\Fld@charsize\space Tf 0 0 1 rg)
833   /Ff 65540
834   /MK <<
835     /BC [\Fld@bordercolor]
836   >>
837   /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >>
838   /A << /S /ResetForm >>
839 }
840 \newwrite\@outlinefile
841 \def\Hy@writebookmark#1#2#3#4#5{% section number, text, label, level, file
842  \ifx\WriteBookmarks\relax%
843  \else
844   \ifnum#4>\c@tocdepth
845   \else
846    \@@writetorep{#1}{#2}{#3}{#4}{#5}%
847   \fi
848  \fi}
849 \def\Hy@currentbookmarklevel{0}
850 \def\Hy@numberline#1{#1 }
851 \def\@@writetorep#1#2#3#4#5{%
852   \begingroup
853     \def\Hy@tempa{#5}%
854     \ifx\Hy@tempa\Hy@bookmarkstype
855       \edef\Hy@level{#4}%
856       \ifx\Hy@levelcheck Y%
857         \@tempcnta\Hy@level\relax
858         \advance\@tempcnta by -1
859         \ifnum\Hy@currentbookmarklevel<\@tempcnta
860           \advance\@tempcnta by -\Hy@currentbookmarklevel\relax
861           \advance\@tempcnta by 1
862           \Hy@Warning{%
863             Difference (\the\@tempcnta) between bookmark levels is %
864             greater \MessageBreak than one, level fixed%
865           }%
866           \@tempcnta\Hy@currentbookmarklevel
867           \advance\@tempcnta by 1
868           \edef\Hy@level{\the\@tempcnta}%
869         \fi
870       \else
871         \global\let\Hy@levelcheck Y%
872       \fi
873       \global\let\Hy@currentbookmarklevel\Hy@level
874       \@tempcnta\Hy@level\relax
875       \expandafter\xdef\csname Parent\Hy@level\endcsname{#3}%
876       \advance\@tempcnta by -1
877       \edef\Hy@tempa{#3}%
878       \edef\Hy@tempb{\csname Parent\the\@tempcnta\endcsname}%
879       \ifx\Hy@tempa\Hy@tempb
880         \Hy@Warning{%
881           The anchor of a bookmark and its parent's must not%
882           \MessageBreak be the same. Added a new anchor%
883         }%
884         \phantomsection
885       \fi
886       \ifHy@bookmarksnumbered
887         \let\numberline\Hy@numberline
888       \else
889         \let\numberline\@gobble
890       \fi
891       \pdfstringdef\Hy@tempa{#2}%
892       \protected@write\@outlinefile{}{%
893         \protect\BOOKMARK
894           [\Hy@level][\@bookmarkopenstatus{\Hy@level}]{#3}%
895           {\Hy@tempa}{\Hy@tempb}%
896       }%
897     \fi
898   \endgroup
899 }
900 \newcommand{\currentpdfbookmark}{%
901   \pdfbookmark[\Hy@currentbookmarklevel]%
902 }
903 \newcommand{\subpdfbookmark}{%
904   \@tempcnta\Hy@currentbookmarklevel
905   \Hy@StepCount\@tempcnta
906   \expandafter\pdfbookmark\expandafter[\the\@tempcnta]%
907 }
908 \newcommand{\belowpdfbookmark}[2]{%
909   \@tempcnta\Hy@currentbookmarklevel
910   \Hy@StepCount\@tempcnta
911   \expandafter\pdfbookmark\expandafter[\the\@tempcnta]{#1}{#2}%
912   \advance\@tempcnta by -1
913   \xdef\Hy@currentbookmarklevel{\the\@tempcnta}%
914 }
915 \renewcommand\pdfbookmark[3][0]{%
916   \Hy@writebookmark{}{#2}{#3.#1}{#1}{toc}%
917   \hyper@anchorstart{#3.#1}\hyper@anchorend
918 }
919 \def\BOOKMARK{\@ifnextchar[{\@BOOKMARK}{\@@BOOKMARK[1][-]}}
920 \def\@BOOKMARK[#1]{\@ifnextchar[{\@@BOOKMARK[#1]}{\@@BOOKMARK[#1][-]}}
921 \def\ReadBookmarks{%
922   \begingroup
923     \escapechar=`\\%
924     \let\escapechar\@gobble %
925     \def\@@BOOKMARK [##1][##2]##3##4##5{\calc@bm@number{##5}}%
926     \InputIfFileExists{\jobname.out}{}{}%
927     \ifx\WriteBookmarks\relax
928       \global\let\WriteBookmarks\relax
929     \fi
930     \def\@@BOOKMARK[##1][##2]##3##4##5{%
931       \def\Hy@temp{##4}%
932       \pdfmark{%
933         pdfmark=/OUT,%
934         Count=##2\check@bm@number{##3},%
935         Dest={##3},%
936         Title=\expandafter\strip@prefix\meaning\Hy@temp
937       }%
938    }%
939    {%
940     \def\WriteBookmarks{0}%
941     \InputIfFileExists{\jobname.out}{}{}%
942    }%
943    %{\escapechar\m@ne\InputIfFileExists{\jobname.out}{}{}}%
944    \ifx\WriteBookmarks\relax\else
945      \if@filesw\immediate\openout\@outlinefile=\jobname.out
946       \ifHy@typexml
947        \immediate\write\@outlinefile{<relaxxml>\relax}%
948       \fi
949      \fi
950    \fi
951    \endgroup
952 }
953 \def\check@bm@number#1{%
954   \expandafter\ifx\csname B_#1\endcsname\relax
955     0%
956   \else
957     \csname B_#1\endcsname
958   \fi
959 }
960 \def\calc@bm@number#1{%
961   \@tempcnta=\check@bm@number{#1}\relax
962   \advance\@tempcnta by1
963   \expandafter\xdef\csname B_#1\endcsname{\the\@tempcnta}%
964 }
965 \ifHy@implicit
966 \else
967   \def\@begindvi{%
968     \unvbox\@begindvibox
969     \HyPL@EveryPage
970     \global\let\@begindvi\HyPL@EveryPage
971   }%
972   \expandafter\endinput
973 \fi
974 \let\H@old@ssect\@ssect
975 \def\@ssect#1#2#3#4#5{%
976   \H@old@ssect{#1}{#2}{#3}{#4}{#5}%
977   \phantomsection
978 }
979 \let\H@old@schapter\@schapter
980 \def\@schapter#1{%
981   \H@old@schapter{#1}%
982   \begingroup
983     \let\@mkboth\@gobbletwo
984     \Hy@GlobalStepCount\Hy@linkcounter
985     \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
986     \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
987   \endgroup
988 }
989 \@ifundefined{@chapter}{}{%
990   \let\Hy@org@chapter\@chapter
991   \def\@chapter{%
992     \def\Hy@next{%
993       \Hy@GlobalStepCount\Hy@linkcounter
994       \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
995       \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
996     }%
997     \ifnum\c@secnumdepth>\m@ne
998       \@ifundefined{if@mainmatter}%
999       \iftrue{\csname if@mainmatter\endcsname}
1000         \let\Hy@next\relax
1001       \fi
1002     \fi
1003     \Hy@next
1004     \Hy@org@chapter
1005   }%
1006 }
1007 \let\H@old@spart\@spart
1008 \def\@spart#1{%
1009   \H@old@spart{#1}%
1010   \Hy@GlobalStepCount\Hy@linkcounter
1011   \xdef\@currentHref{part*.\the\Hy@linkcounter}%
1012   \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
1013 }
1014 \let\H@old@sect\@sect
1015 \def\@sect#1#2#3#4#5#6[#7]#8{%
1016   \ifnum #2>\c@secnumdepth
1017     \Hy@GlobalStepCount\Hy@linkcounter
1018     \xdef\@currentHref{section*.\the\Hy@linkcounter}%
1019   \fi
1020   \H@old@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}%
1021   \ifnum #2>\c@secnumdepth
1022     \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
1023   \fi
1024 }
1025 \expandafter\def\csname Parent-4\endcsname{}
1026 \expandafter\def\csname Parent-3\endcsname{}
1027 \expandafter\def\csname Parent-2\endcsname{}
1028 \expandafter\def\csname Parent-1\endcsname{}
1029 \expandafter\def\csname Parent0\endcsname{}
1030 \expandafter\def\csname Parent1\endcsname{}
1031 \expandafter\def\csname Parent2\endcsname{}
1032 \expandafter\def\csname Parent3\endcsname{}
1033 \expandafter\def\csname Parent4\endcsname{}
1034 \def\Hy@tempa{%
1035   \def\@addchap[##1]##2{%
1036     \typeout{##2}%
1037     \if@twoside
1038       \@mkboth{##1}{}%
1039     \else
1040       \@mkboth{}{##1}%
1041     \fi
1042     \addtocontents{lof}{\protect\addvspace{10\p@}}%
1043     \addtocontents{lot}{\protect\addvspace{10\p@}}%
1044     \Hy@GlobalStepCount\Hy@linkcounter
1045     \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
1046     \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
1047     \if@twocolumn
1048        \@topnewpage[\@makeschapterhead{##2}]%
1049     \else
1050        \@makeschapterhead{##2}%
1051        \@afterheading
1052     \fi
1053     \addcontentsline{toc}{chapter}{##1}%
1054   }%
1055 }
1056 \@ifclassloaded{scrbook}{%
1057   \@ifclasslater{scrbook}{2001/01/01}{%
1058     \let\Hy@tempa\@empty
1059   }{}%
1060 }{%
1061   \@ifclassloaded{scrreprt}{%
1062     \@ifclasslater{scrreprt}{2001/01/01}{%
1063       \let\Hy@tempa\@empty
1064     }{}%
1065   }{%
1066     \let\Hy@tempa\@empty
1067   }%
1068 }%
1069 \Hy@tempa
1070 \begingroup
1071   \catcode`P=12
1072   \catcode`T=12
1073   \lowercase{\endgroup
1074   \gdef\rem@ptetc#1.#2PT#3!{#1\ifnum#2>\z@.#2\fi}%
1075 }
1076 \def\strip@pt@and@otherjunk#1{\expandafter\rem@ptetc\the#1!}
1077 \endinput
1078 %%
1079 %% End of file `pdfmark.def'.