Debian Codegraph @

texmf-dist/tex/latex/hyperref/hdvipdfm.def

raw
1 %%
2 %% This is file `hdvipdfm.def',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% hyperref.dtx (with options: `dvipdfm,pdfform,outlines')
8 %%
9 %% Copyright
10 %% 1995-2001 Sebastian Rahtz, with portions written by David Carlisle and Heiko Oberdiek
11 %% 2001-2015 Heiko Oberdiek
12 %% 2016-2019 Oberdiek Package Support Group
13 %% 2019-2026 LaTeX Project
14 %% https://github.com/latex3/hyperref/issues
15 %%
16 %% This file is part of the `Hyperref Bundle'.
17 %% -------------------------------------------
18 %%
19 %% This work may be distributed and/or modified under the
20 %% conditions of the LaTeX Project Public License, either version 1.3
21 %% of this license or (at your option) any later version.
22 %% The latest version of this license is in
23 %% http://www.latex-project.org/lppl.txt
24 %% and version 1.3 or later is part of all distributions of LaTeX
25 %% version 2005/12/01 or later.
26 %%
27 %% This work has the LPPL maintenance status `maintained'.
28 %%
29 %% The Current Maintainer of this work is the LaTeX Project.
30 %%
31 %% The list of all files belonging to the `Hyperref Bundle' is
32 %% given in the file `manifest.txt'.
33 %%
34 %% File: hyperref.dtx
35 \ProvidesFile{hdvipdfm.def}
36 [2026-04-24 v7.01q %
37 Hyperref driver for dvipdfm]
38 \Hy@VersionCheck{hdvipdfm.def}
39 \special{pdf:majorversion \Hy@pdf@majorversion}
40 \special{pdf:minorversion \Hy@pdf@minorversion}
41 \def\Hy@PutCatalog#1{\@pdfm@mark{docview <<#1>>}}
42 \ifHy@pdfpagelabels
43 \def\HyPL@StorePageLabel#1{%
44 \if@filesw
45 \begingroup
46 \edef\Hy@tempa{\the\Hy@abspage<<#1>>}%
47 \immediate\write\@mainaux{%
48 \string\HyPL@Entry{\Hy@tempa}%
49 }%
50 \endgroup
51 \fi
52 }%
53 \Hy@AtBeginDocument{%
54 \if@filesw
55 \immediate\write\@mainaux{%
56 \string\providecommand\string*\string\HyPL@Entry[1]{}%
57 }%
58 \fi
59 \ifx\HyPL@Labels\@empty
60 \Hy@WarningNoLine{Rerun to get /PageLabels entry}%
61 \else
62 \HyPL@SetPageLabels
63 \fi
64 \let\HyPL@Entry\@gobble
65 }%
66 \def\HyPL@Entry#1{%
67 \expandafter\gdef\expandafter\HyPL@Labels\expandafter{%
68 \HyPL@Labels
69 #1%
70 }%
71 }%
72 \fi
73 \begingroup\expandafter\expandafter\expandafter\endgroup
74 \expandafter\ifx\csname pdf@escapestring\endcsname\relax
75 \begingroup
76 \catcode`\|=0 %
77 \@makeother\\%
78 |@firstofone{|endgroup
79 |def|Hy@pstringdef#1#2{%
80 |begingroup
81 |edef~{|string~}%
82 |xdef|Hy@gtemp{#2}%
83 |endgroup
84 |let#1|Hy@gtemp
85 |@onelevel@sanitize#1%
86 |edef#1{|expandafter|Hy@ExchangeBackslash#1\|@nil}%
87 |edef#1{|expandafter|Hy@ExchangeLeftParenthesis#1(|@nil}%
88 |edef#1{|expandafter|Hy@ExchangeRightParenthesis#1)|@nil}%
89 }%
90 |def|Hy@ExchangeBackslash#1\#2|@nil{%
91 #1%
92 |ifx|\#2|\%%
93 |else
94 \\%
95 |Hy@ReturnAfterFi{%
96 |Hy@ExchangeBackslash#2|@nil
97 }%
98 |fi
99 }%
100 }%
101 \def\Hy@ExchangeLeftParenthesis#1(#2\@nil{%
102 #1%
103 \ifx\\#2\\%
104 \else
105 \@backslashchar(%
106 \Hy@ReturnAfterFi{%
107 \Hy@ExchangeLeftParenthesis#2\@nil
108 }%
109 \fi
110 }%
111 \def\Hy@ExchangeRightParenthesis#1)#2\@nil{%
112 #1%
113 \ifx\\#2\\%
114 \else
115 \@backslashchar)%
116 \Hy@ReturnAfterFi{%
117 \Hy@ExchangeRightParenthesis#2\@nil
118 }%
119 \fi
120 }%
121 \else
122 \def\Hy@pstringdef#1#2{%
123 \begingroup
124 \edef~{\string~}%
125 \xdef\Hy@gtemp{\pdf@escapestring{#2}}%
126 \endgroup
127 \let#1\Hy@gtemp
128 }%
129 \fi
130 \special{dvipdfmx:config C 0x0010}
131 \providecommand*{\XR@ext}{pdf}
132 \Hy@setbreaklinks{true}
133 \def\HyPat@ObjRef{%
134 @[^ ]+%
135 }
136 \newsavebox{\pdfm@box}
137 \def\@pdfm@mark#1{\special{pdf:#1}}
138 \Hy@WrapperDef\@pdfm@dest#1{%
139 \Hy@SaveLastskip
140 \Hy@VerboseAnchor{#1}%
141 \begingroup
142 \Hy@pstringdef\Hy@pstringDest{\HyperDestNameFilter{#1}}%
143 \def\x{XYZ}%
144 \ifx\x\@pdfview
145 \def\x{XYZ @xpos @ypos null}%
146 \else
147 \def\x{FitH}%
148 \ifx\x\@pdfview
149 \def\x{FitH @ypos}%
150 \else
151 \def\x{FitBH}%
152 \ifx\x\@pdfview
153 \def\x{FitBH @ypos}%
154 \else
155 \def\x{FitV}%
156 \ifx\x\@pdfview
157 \def\x{FitV @xpos}%
158 \else
159 \def\x{FitBV}%
160 \ifx\x\@pdfview
161 \def\x{FitBV @xpos}%
162 \else
163 \def\x{Fit}%
164 \ifx\x\@pdfview
165 \let\x\@pdfview
166 \else
167 \def\x{FitB}%
168 \ifx\x\@pdfview
169 \let\x\@pdfview
170 \else
171 \def\x{FitR}%
172 \ifx\x\@pdfview
173 \Hy@Warning{`pdfview=FitR' is not supported}%
174 \def\x{XYZ @xpos @ypos null}%
175 \else
176 \@onelevel@sanitize\@pdfview
177 \Hy@Warning{%
178 Unknown value `\@pdfview' for pdfview%
179 }%
180 \def\x{XYZ @xpos @ypos null}%
181 \fi
182 \fi
183 \fi
184 \fi
185 \fi
186 \fi
187 \fi
188 \fi
189 \@pdfm@mark{dest (\Hy@pstringDest) [@thispage /\x]}%
190 \endgroup
191 \Hy@RestoreLastskip
192 }
193 \providecommand*\@pdfview{XYZ}
194 \providecommand*\@pdfborder{0 0 1}
195 \providecommand*\@pdfborderstyle{}
196 \def\hyper@anchor#1{%
197 \@pdfm@dest{#1}%
198 }
199 \def\hyper@anchorstart#1{%
200 \Hy@activeanchortrue
201 \@pdfm@dest{#1}%
202 }
203 \def\hyper@anchorend{%
204 \Hy@activeanchorfalse
205 }
206 \newcounter{Hy@AnnotLevel}
207 \ifHy@ocgcolorlinks
208 \def\OBJ@OCG@view{@OCG@view}%
209 \@pdfm@mark{%
210 obj \OBJ@OCG@view <<%
211 /Type/OCG%
212 /Name(View)%
213 /Usage<<%
214 /Print<<%
215 /PrintState/OFF%
216 >>%
217 /View<<%
218 /ViewState/ON%
219 >>%
220 >>%
221 >>%
222 }%
223 \@pdfm@mark{close \OBJ@OCG@view}%
224 \def\OBJ@OCG@print{@OCG@print}%
225 \@pdfm@mark{%
226 obj \OBJ@OCG@print <<%
227 /Type/OCG%
228 /Name(Print)%
229 /Usage<<%
230 /Print<<%
231 /PrintState/ON%
232 >>%
233 /View<<%
234 /ViewState/OFF%
235 >>%
236 >>%
237 >>%
238 }%
239 \@pdfm@mark{close \OBJ@OCG@print}%
240 \def\OBJ@OCGs{@OCGs}%
241 \@pdfm@mark{%
242 obj \OBJ@OCGs [%
243 \OBJ@OCG@view\space\OBJ@OCG@print
244 ]%
245 }%
246 \@pdfm@mark{close \OBJ@OCGs}%
247 \@pdfm@mark{%
248 put @catalog <<%
249 /OCProperties<<%
250 /OCGs \OBJ@OCGs
251 /D<<%
252 /OFF[\OBJ@OCG@print]%
253 /AS[%
254 <<%
255 /Event/View%
256 /OCGs \OBJ@OCGs
257 /Category[/View]%
258 >>%
259 <<%
260 /Event/Print%
261 /OCGs \OBJ@OCGs
262 /Category[/Print]%
263 >>%
264 <<%
265 /Event/Export%
266 /OCGs \OBJ@OCGs
267 /Category[/Print]%
268 >>%
269 ]%
270 >>%
271 >>%
272 >>%
273 }%
274 \AddToHook{shipout/before}{%
275 \setbox\ShipoutBox=\hbox{%
276 \copy\ShipoutBox
277 \@pdfm@mark{%
278 put @resources <<%
279 /Properties<<%
280 /OCView \OBJ@OCG@view
281 /OCPrint \OBJ@OCG@print
282 >>%
283 >>%
284 }%
285 }%
286 }%
287 \Hy@AtBeginDocument{%
288 \def\Hy@colorlink#1{%
289 \begingroup
290 \ifHy@ocgcolorlinks
291 \def\Hy@ocgcolor{#1}%
292 \setbox0=\hbox\bgroup\color@begingroup
293 \else
294 \HyColor@UseColor#1%
295 \fi
296 }%
297 \def\Hy@endcolorlink{%
298 \ifHy@ocgcolorlinks
299 \color@endgroup\egroup
300 \mbox{%
301 \@pdfm@mark{content /OC/OCPrint BDC}%
302 \rlap{\copy0}%
303 \@pdfm@mark{content EMC/OC/OCView BDC}%
304 \begingroup
305 \expandafter\HyColor@UseColor\Hy@ocgcolor
306 \box0 %
307 \endgroup
308 \@pdfm@mark{content EMC}%
309 }%
310 \fi
311 \endgroup
312 }%
313 }%
314 \else
315 \Hy@DisableOption{ocgcolorlinks}%
316 \fi
317 \def\Hy@BeginAnnot#1{%
318 \global\advance\c@Hy@AnnotLevel\@ne
319 \ifnum\c@Hy@AnnotLevel=\@ne
320 #1%
321 \fi
322 }
323 \def\Hy@EndAnnot{%
324 \ifnum\value{Hy@AnnotLevel}=\@ne
325 \Hy@endcolorlink
326 \@pdfm@mark{eann}%
327 \fi
328 \global\advance\c@Hy@AnnotLevel\m@ne
329 }
330 \def\Hy@undefinedname{UNDEFINED}
331 \def\hyper@linkstart#1#2{%
332 \Hy@VerboseLinkStart{#1}{#2}%
333 \leavevmode
334 \Hy@BeginAnnot{%
335 \protected@edef\Hy@testname{#2}%
336 \ifx\Hy@testname\@empty
337 \Hy@Warning{%
338 Empty destination name,\MessageBreak
339 using `\Hy@undefinedname'%
340 }%
341 \let\Hy@testname\Hy@undefinedname
342 \else
343 \Hy@pstringdef\Hy@testname{%
344 \expandafter\HyperDestNameFilter\expandafter{%
345 \Hy@testname
346 }%
347 }%
348 \fi
349 \@pdfm@mark{%
350 bann<<%
351 /Type/Annot%
352 /Subtype/Link%
353 \ifHy@pdfa /F 4\fi
354 \Hy@setpdfborder
355 \Hy@setpdfhighlight
356 \expandafter\ifx\csname @#1bordercolor\endcsname\relax
357 \else
358 /C[\csname @#1bordercolor\endcsname]%
359 \fi
360 /A<<%
361 /S/GoTo%
362 /D(\Hy@testname)%
363 \Hy@href@nextactionraw
364 >>%
365 >>%
366 }%
367 \expandafter\Hy@colorlink\csname @#1color\endcsname
368 }%
369 }
370 \def\hyper@linkend{\Hy@EndAnnot}%
371 \def\hyper@link#1#2#3{%
372 \hyper@linkstart{#1}{#2}#3\Hy@xspace@end\hyper@linkend
373 }
374 \def\hyper@linkfile#1#2#3{%
375 \leavevmode
376 \begingroup
377 \Hy@BeginAnnot{%
378 \def\Hy@pstringF{#2}%
379 \Hy@CleanupFile\Hy@pstringF
380 \Hy@pstringdef\Hy@pstringF\Hy@pstringF
381 \Hy@pstringdef\Hy@pstringD{#3}%
382 \Hy@MakeRemoteAction
383 \@pdfm@mark{%
384 bann<<%
385 /Type/Annot%
386 /Subtype/Link%
387 \ifHy@pdfa /F 4\fi
388 \Hy@setpdfborder
389 \Hy@setpdfhighlight
390 \ifx\@filebordercolor\relax
391 \else
392 /C[\@filebordercolor]%
393 \fi
394 /A<<%
395 /S/GoToR%
396 /F(\Hy@pstringF)%
397 /D%
398 \ifx\\#3\\%
399 [\Hy@href@page\@pdfremotestartview]%
400 \else
401 (\Hy@pstringD)%
402 \fi
403 \Hy@SetNewWindow
404 \Hy@href@nextactionraw
405 >>%
406 >>%
407 }%
408 \Hy@colorlink\@filecolor
409 }%
410 #1\Hy@xspace@end
411 \Hy@EndAnnot
412 \endgroup
413 }
414 \def\@hyper@launch run:#1\\#2#3{% filename, anchor text linkname
415 \leavevmode
416 \Hy@BeginAnnot{%
417 \Hy@pstringdef\Hy@pstringF{#1}%
418 \Hy@pstringdef\Hy@pstringP{#3}%
419 \@pdfm@mark{%
420 bann<<%
421 /Type/Annot%
422 /Subtype/Link%
423 \ifHy@pdfa /F 4\fi
424 \Hy@setpdfborder
425 \Hy@setpdfhighlight
426 \ifx\@runbordercolor\relax
427 \else
428 /C[\@runbordercolor]%
429 \fi
430 /A<<%
431 /F(\Hy@pstringF)%
432 /S/Launch%
433 \Hy@SetNewWindow
434 \ifx\\#3\\%
435 \else
436 /Win<</P(\Hy@pstringP)/F(\Hy@pstringF)>>%
437 \fi
438 \Hy@href@nextactionraw
439 >>%
440 >>%
441 }%
442 \Hy@colorlink\@runcolor
443 }%
444 #2\Hy@xspace@end
445 \Hy@EndAnnot
446 }
447 \def\hyper@linkurl#1#2{%
448 \leavevmode
449 \Hy@BeginAnnot{%
450 \Hy@pstringdef\Hy@pstringURI{#2}%
451 \@pdfm@mark{%
452 bann<<%
453 /Type/Annot%
454 /Subtype/Link%
455 \ifHy@pdfa /F 4\fi
456 \Hy@setpdfborder
457 \Hy@setpdfhighlight
458 \ifx\@urlbordercolor\relax
459 \else
460 /C[\@urlbordercolor]%
461 \fi
462 /A<<%
463 /S/URI%
464 /URI(\Hy@pstringURI)%
465 \ifHy@href@ismap
466 /IsMap true%
467 \fi
468 \Hy@href@nextactionraw
469 >>%
470 >>%
471 }%
472 \Hy@colorlink\@urlcolor
473 }%
474 #1\Hy@xspace@end
475 \Hy@EndAnnot
476 }
477 \def\Acrobatmenu#1#2{%
478 \Hy@Acrobatmenu{#1}{#2}{%
479 \Hy@BeginAnnot{%
480 \EdefEscapeName\Hy@temp@menu{#1}%
481 \@pdfm@mark{%
482 bann<<%
483 /Type/Annot%
484 /Subtype/Link%
485 \ifHy@pdfa /F 4\fi
486 \Hy@setpdfborder
487 \Hy@setpdfhighlight
488 \ifx\@menubordercolor\relax
489 \else
490 /C[\@menubordercolor]%
491 \fi
492 /A<<%
493 /S/Named%
494 /N/\Hy@temp@menu
495 \Hy@href@nextactionraw
496 >>%
497 >>%
498 }%
499 \Hy@colorlink\@menucolor
500 }%
501 #2\Hy@xspace@end
502 \Hy@EndAnnot
503 }%
504 }
505
506 \def\PDF@FinishDoc{%
507 \Hy@UseMaketitleInfos
508 \HyInfo@GenerateAddons
509 \@pdfm@mark{%
510 docinfo<<%
511 /Title(\@pdftitle)%
512 /Subject(\@pdfsubject)%
513 /Creator(\@pdfcreator)%
514 \ifx\@pdfcreationdate\@empty
515 \else
516 /CreationDate(\@pdfcreationdate)%
517 \fi
518 \ifx\@pdfmoddate\@empty
519 \else
520 /ModDate(\@pdfmoddate)%
521 \fi
522 /Author(\@pdfauthor)%
523 \ifx\@pdfproducer\relax
524 \else
525 /Producer(\@pdfproducer)%
526 \fi
527 /Keywords(\@pdfkeywords)%
528 \ifx\@pdftrapped\@empty
529 \else
530 /Trapped/\@pdftrapped
531 \fi
532 \HyInfo@Addons
533 >>%
534 }%
535 \Hy@DisableOption{pdfauthor}%
536 \Hy@DisableOption{pdftitle}%
537 \Hy@DisableOption{pdfsubject}%
538 \Hy@DisableOption{pdfcreator}%
539 \Hy@DisableOption{addtopdfcreator}%
540 \Hy@DisableOption{pdfcreationdate}%
541 \Hy@DisableOption{pdfcreationdate}%
542 \Hy@DisableOption{pdfmoddate}%
543 \Hy@DisableOption{pdfproducer}%
544 \Hy@DisableOption{pdfkeywords}%
545 \Hy@DisableOption{pdftrapped}%
546 \Hy@DisableOption{pdfinfo}%
547 }
548 \def\PDF@SetupDoc{%
549 \edef\Hy@temp{%
550 \ifHy@pdftoolbar\else /HideToolbar true\fi
551 \ifHy@pdfmenubar\else /HideMenubar true\fi
552 \ifHy@pdfwindowui\else /HideWindowUI true\fi
553 \ifHy@pdffitwindow /FitWindow true\fi
554 \ifHy@pdfcenterwindow /CenterWindow true\fi
555 \ifHy@pdfdisplaydoctitle /DisplayDocTitle true\fi
556 \Hy@UseNameKey{NonFullScreenPageMode}\@pdfnonfullscreenpagemode
557 \Hy@UseNameKey{Direction}\@pdfdirection
558 \Hy@UseNameKey{ViewArea}\@pdfviewarea
559 \Hy@UseNameKey{ViewClip}\@pdfviewclip
560 \Hy@UseNameKey{PrintArea}\@pdfprintarea
561 \Hy@UseNameKey{PrintClip}\@pdfprintclip
562 \Hy@UseNameKey{PrintScaling}\@pdfprintscaling
563 \Hy@UseNameKey{Duplex}\@pdfduplex
564 \ifx\@pdfpicktraybypdfsize\@empty
565 \else
566 /PickTrayByPDFSize \@pdfpicktraybypdfsize
567 \fi
568 \ifx\@pdfprintpagerange\@empty
569 \else
570 /PrintPageRange[\@pdfprintpagerange]%
571 \fi
572 \ifx\@pdfnumcopies\@empty
573 \else
574 /NumCopies \@pdfnumcopies
575 \fi
576 }%
577 \Hy@pstringdef\Hy@pstringB{\@baseurl}%
578 \@pdfm@mark{%
579 docview<<%
580 \ifx\@pdfstartpage\@empty
581 \else
582 \ifx\@pdfstartview\@empty
583 \else
584 /OpenAction[@page\@pdfstartpage\@pdfstartview]%
585 \fi
586 \fi
587 \ifx\@baseurl\@empty
588 \else
589 /URI<</Base(\Hy@pstringB)>>%
590 \fi
591 /PageMode/\@pdfpagemode
592 \ifx\Hy@temp\@empty
593 \else
594 /ViewerPreferences<<\Hy@temp>>%
595 \fi
596 \Hy@UseNameKey{PageLayout}\@pdfpagelayout
597 \ifx\@pdflang\relax
598 \else
599 /Lang(\@pdflang)%
600 \fi
601 >>%
602 }%
603 \ifx\@pdfpagescrop\@empty
604 \else
605 \@pdfm@mark{put @pages <</CropBox[\@pdfpagescrop]>>}%
606 \fi
607 }
608 \def\hyper@pagetransition{%
609 \ifx\@pdfpagetransition\relax
610 \else
611 \ifx\@pdfpagetransition\@empty
612 \else
613 \special{pdf:put @thispage %
614 <</Trans<</S/\@pdfpagetransition>>>>%
615 }%
616 \fi
617 \fi
618 }
619 \def\hyper@pageduration{%
620 \ifx\@pdfpageduration\relax
621 \else
622 \ifx\@pdfpageduration\@empty
623 \else
624 \special{pdf:put @thispage %
625 <</Dur \@pdfpageduration>>%
626 }%
627 \fi
628 \fi
629 }
630 \g@addto@macro\Hy@EveryPageBoxHook{%
631 \hyper@pagetransition
632 \hyper@pageduration
633 }
634 \AddToHook{shipout/firstpage}{%
635 \ifHy@setpagesize
636 \begingroup
637 \ifnum\mag=\@m
638 \ifdim\stockwidth>\z@
639 \ifdim\stockheight>\z@
640 \special{papersize=\the\stockwidth,\the\stockheight}%
641 \else
642 \ifdim\paperwidth>\z@
643 \ifdim\paperheight>\z@
644 \special{papersize=\the\paperwidth,\the\paperheight}%
645 \fi
646 \fi
647 \fi
648 \else
649 \ifdim\stockwidth=\z@
650 \ifdim\paperwidth>\z@
651 \ifdim\paperheight>\z@
652 \special{papersize=\the\paperwidth,\the\paperheight}%
653 \fi
654 \fi
655 \fi
656 \fi
657 \fi
658 \endgroup
659 \fi
660 \Hy@DisableOption{setpagesize}%
661 }
662 \def\@Gauge[#1]#2#3#4{% parameters, label, minimum, maximum
663 \Hy@Message{Sorry, dvipdfm/XeTeX does not support FORM gauges}%
664 }
665 \def\@Form[#1]{%
666 \@ifundefined{textcolor}{\let\textcolor\@gobble}{}%
667 \kvsetkeys{Form}{#1}%
668 \Hy@FormObjects
669 \@pdfm@mark{obj @afields []}%
670 \@pdfm@mark{obj @corder []}%
671 \@pdfm@mark{%
672 obj @aform <<%
673 /Fields @afields%
674 /DR<<%
675 /Font<<%
676 /ZaDb @OBJZaDb%
677 /Helv @OBJHelv%
678 >>%
679 >>%
680 /DA(/Helv 10 Tf 0 g)%
681 /CO @corder%
682 \ifHy@pdfa
683 \else
684 \ifHyField@NeedAppearances
685 /NeedAppearances true%
686 \fi
687 \fi
688 >>%
689 }%
690 \@pdfm@mark{put @catalog <</AcroForm @aform>>}%
691 }
692 \let\@endForm\@empty
693 \def\dvipdfm@setdim{%
694 height \the\ht\pdfm@box\space
695 width \the\wd\pdfm@box\space
696 depth \the\dp\pdfm@box\space
697 }
698 \newcount\HyField@AnnotCount
699 \HyField@AnnotCount=\z@
700 \def\HyField@AdvanceAnnotCount{%
701 \global\advance\HyField@AnnotCount\@ne
702 }
703 \def\HyField@TheAnnotCount{%
704 \the\HyField@AnnotCount
705 }
706 \def\Fld@pageobjref{/P @thispage}%
707 \def\HyField@AddToFields#1{%
708 \@pdfm@mark{put @afields @#1\HyField@TheAnnotCount}%
709 \ifx\Fld@calculate@code\@empty
710 \else
711 \@pdfm@mark{put @corder @#1\HyField@TheAnnotCount}%
712 \fi
713 }
714 \def\@TextField[#1]#2{% parameters, label
715 \def\Fld@name{#2}%
716 \let\Fld@default\@empty
717 \let\Fld@value\@empty
718 \def\Fld@width{\DefaultWidthofText}%
719 \def\Fld@height{%
720 \ifFld@multiline
721 \DefaultHeightofTextMultiline
722 \else
723 \DefaultHeightofText
724 \fi
725 }%
726 \begingroup
727 \expandafter\HyField@SetKeys\expandafter{%
728 \DefaultOptionsofText,#1%
729 }%
730 \PDFForm@Name
731 \HyField@FlagsText
732 \ifFld@hidden\def\Fld@width{1sp}\fi
733 \ifx\Fld@value\@empty\def\Fld@value{\Fld@default}\fi
734 \setbox\pdfm@box=\hbox{%
735 \MakeTextField{\Fld@width}{\Fld@height}%
736 }%
737 \HyField@AdvanceAnnotCount
738 \LayoutTextField{#2}{%
739 \leavevmode
740 \Hy@escapeform\PDFForm@Text
741 \@pdfm@mark{%
742 ann @text\HyField@TheAnnotCount\space
743 \dvipdfm@setdim << \PDFForm@Text >>%
744 }%
745 }%
746 \unhbox\pdfm@box
747 \HyField@AddToFields{text}%
748 % record in @afields array
749 \endgroup
750 }
751 \def\@ChoiceMenu[#1]#2#3{% parameters, label, choices
752 \def\Fld@name{#2}%
753 \let\Fld@default\relax
754 \let\Fld@value\relax
755 \def\Fld@width{\DefaultWidthofChoiceMenu}%
756 \def\Fld@height{\DefaultHeightofChoiceMenu}%
757 \begingroup
758 \Fld@menulength=0 %
759 \@tempdima\z@
760 \@for\@curropt:=#3\do{%
761 \expandafter\Fld@checkequals\@curropt==\\%
762 \Hy@StepCount\Fld@menulength
763 \settowidth{\@tempdimb}{\@currDisplay}%
764 \ifdim\@tempdimb>\@tempdima\@tempdima\@tempdimb\fi
765 }%
766 \advance\@tempdima by 15\p@
767 \begingroup
768 \HyField@SetKeys{#1}%
769 \edef\x{\endgroup
770 \noexpand\expandafter
771 \noexpand\HyField@SetKeys
772 \noexpand\expandafter{%
773 \expandafter\noexpand\csname DefaultOptionsof%
774 \ifFld@radio
775 Radio%
776 \else
777 \ifFld@combo
778 \ifFld@popdown
779 PopdownBox%
780 \else
781 ComboBox%
782 \fi
783 \else
784 ListBox%
785 \fi
786 \fi
787 \endcsname
788 }%
789 }\x
790 \HyField@SetKeys{#1}%
791 \PDFForm@Name
792 \ifFld@hidden\def\Fld@width{1sp}\fi
793 \ifx\Fld@value\relax
794 \let\Fld@value\Fld@default
795 \fi
796 \LayoutChoiceField{#2}{%
797 \ifFld@radio
798 \HyField@FlagsRadioButton
799 \@@Radio{#3}%
800 \else
801 \begingroup
802 \HyField@FlagsChoice
803 \ifdim\Fld@width<\@tempdima
804 \ifdim\@tempdima<1cm\@tempdima1cm\fi
805 \edef\Fld@width{\the\@tempdima}%
806 \fi
807 \ifFld@combo
808 \else
809 \@tempdima=\the\Fld@menulength\Fld@charsize
810 \advance\@tempdima by \Fld@borderwidth bp %
811 \advance\@tempdima by \Fld@borderwidth bp %
812 \edef\Fld@height{\the\@tempdima}%
813 \fi
814 \@@Listbox{#3}%
815 \endgroup
816 \fi
817 }%
818 \endgroup
819 }
820 \def\@@Radio#1{%
821 \Fld@listcount=0 %
822 \EdefEscapeName\Fld@default{\Fld@default}%
823 \setbox\pdfm@box=\hbox{%
824 \MakeRadioField{\Fld@width}{\Fld@height}%
825 }%
826 \@for\@curropt:=#1\do{%
827 \expandafter\Fld@checkequals\@curropt==\\%
828 \EdefEscapeName\@currValue{\@currValue}%
829 \Hy@StepCount\Fld@listcount
830 \@currDisplay\space
831 \leavevmode
832 \Hy@escapeform\PDFForm@Radio
833 \ifnum\Fld@listcount=1 %
834 \HyField@AdvanceAnnotCount
835 \fi
836 \@pdfm@mark{%
837 ann %
838 \ifnum\Fld@listcount=1 %
839 @radio\HyField@TheAnnotCount%
840 \space
841 \fi
842 \dvipdfm@setdim
843 <<%
844 \PDFForm@Radio
845 /AP<</N<</\@currValue /null>>>>%
846 >>%
847 }%
848 \unhcopy\pdfm@box\space% deliberate space between radio buttons
849 \ifnum\Fld@listcount=1 %
850 \HyField@AddToFields{radio}%
851 \fi
852 }%
853 }
854 \newcount\Fld@listcount
855 \def\@@Listbox#1{%
856 \HyField@PDFChoices{#1}%
857 \setbox\pdfm@box=\hbox{%
858 \MakeChoiceField{\Fld@width}{\Fld@height}%
859 }%
860 \leavevmode
861 \Hy@escapeform\PDFForm@List
862 \HyField@AdvanceAnnotCount
863 \@pdfm@mark{%
864 ann @list\HyField@TheAnnotCount\space
865 \dvipdfm@setdim
866 <<\PDFForm@List>>%
867 }%
868 \unhbox\pdfm@box
869 \HyField@AddToFields{list}%
870 }
871 \def\@PushButton[#1]#2{% parameters, label
872 \def\Fld@name{#2}%
873 \begingroup
874 \expandafter\HyField@SetKeys\expandafter{%
875 \DefaultOptionsofPushButton,#1%
876 }%
877 \PDFForm@Name
878 \ifHy@pdfa
879 \Hy@Error{%
880 PDF/A: Push button with JavaScript is prohibited%
881 }\@ehc
882 \LayoutPushButtonField{%
883 \leavevmode
884 \MakeButtonField{#2}%
885 }%
886 \else
887 \setbox\pdfm@box=\hbox{\MakeButtonField{#2}}%
888 \HyField@FlagsPushButton
889 \ifFld@hidden\def\Fld@width{1sp}\fi
890 \HyField@AdvanceAnnotCount
891 \LayoutPushButtonField{%
892 \leavevmode
893 \Hy@escapeform\PDFForm@Push
894 \@pdfm@mark{%
895 ann @push\HyField@TheAnnotCount\space
896 \dvipdfm@setdim
897 <<\PDFForm@Push>>%
898 }%
899 }%
900 \unhbox\pdfm@box
901 \HyField@AddToFields{push}%
902 \fi
903 \endgroup
904 }
905 \def\@Submit[#1]#2{%
906 \def\Fld@width{\DefaultWidthofSubmit}%
907 \def\Fld@height{\DefaultHeightofSubmit}%
908 \begingroup
909 \expandafter\HyField@SetKeys\expandafter{%
910 \DefaultOptionsofSubmit,#1%
911 }%
912 \HyField@FlagsPushButton
913 \HyField@FlagsSubmit
914 \ifFld@hidden\def\Fld@width{1sp}\fi
915 \setbox\pdfm@box=\hbox{\MakeButtonField{#2}}%
916 \leavevmode
917 \Hy@escapeform\PDFForm@Submit
918 \HyField@AdvanceAnnotCount
919 \@pdfm@mark{%
920 ann @submit\HyField@TheAnnotCount\space
921 \dvipdfm@setdim
922 <<\PDFForm@Submit>>%
923 }%
924 \unhbox\pdfm@box%
925 \HyField@AddToFields{submit}%
926 \endgroup
927 }
928 \def\@Reset[#1]#2{%
929 \def\Fld@width{\DefaultWidthofReset}%
930 \def\Fld@height{\DefaultHeightofReset}%
931 \begingroup
932 \expandafter\HyField@SetKeys\expandafter{%
933 \DefaultOptionsofReset,#1%
934 }%
935 \leavevmode
936 \ifHy@pdfa
937 \Hy@Error{%
938 PDF/A: Reset action is prohibited%
939 }\@ehc
940 \MakeButtonField{#2}%
941 \else
942 \HyField@FlagsPushButton
943 \ifFld@hidden\def\Fld@width{1sp}\fi
944 \setbox\pdfm@box=\hbox{\MakeButtonField{#2}}%
945 \Hy@escapeform\PDFForm@Reset
946 \HyField@AdvanceAnnotCount
947 \@pdfm@mark{%
948 ann @reset\HyField@TheAnnotCount\space
949 \dvipdfm@setdim
950 <<\PDFForm@Reset>>%
951 }%
952 \unhbox\pdfm@box
953 \HyField@AddToFields{reset}%
954 \fi
955 \endgroup
956 }
957 \def\@CheckBox[#1]#2{% parameters, label
958 \def\Fld@name{#2}%
959 \def\Fld@default{0}%
960 \begingroup
961 \def\Fld@width{\DefaultWidthofCheckBox}%
962 \def\Fld@height{\DefaultHeightofCheckBox}%
963 \expandafter\HyField@SetKeys\expandafter{%
964 \DefaultOptionsofCheckBox,#1%
965 }%
966 \PDFForm@Name
967 \HyField@FlagsCheckBox
968 \ifFld@hidden\def\Fld@width{1sp}\fi
969 \setbox\pdfm@box=\hbox{%
970 \MakeCheckField{\Fld@width}{\Fld@height}%
971 }%
972 \HyField@AdvanceAnnotCount
973 \LayoutCheckField{#2}{%
974 \leavevmode
975 \Hy@escapeform\PDFForm@Check
976 \@pdfm@mark{%
977 ann @check\HyField@TheAnnotCount\space
978 \dvipdfm@setdim
979 <<\PDFForm@Check>>%
980 }%
981 \unhbox\pdfm@box
982 \HyField@AddToFields{check}%
983 }%
984 \endgroup
985 }
986 \def\Hy@FormObjects{%
987 \@pdfm@mark{obj @OBJpdfdocencoding%
988 <<%
989 /Type/Encoding%
990 /Differences[%
991 24/breve/caron/circumflex/dotaccent/hungarumlaut/ogonek/ring/tilde %
992 39/quotesingle %
993 96/grave %
994 128/bullet/dagger/daggerdbl/ellipsis/emdash/endash/florin%
995 /fraction/guilsinglleft/guilsinglright/minus/perthousand%
996 /quotedblbase/quotedblleft/quotedblright/quoteleft/quoteright%
997 /quotesinglbase/trademark/fi/fl/Lslash/OE/Scaron/Ydieresis%
998 /Zcaron/dotlessi/lslash/oe/scaron/zcaron %
999 160/Euro %
1000 164/currency %
1001 166/brokenbar %
1002 168/dieresis/copyright/ordfeminine %
1003 172/logicalnot/.notdef/registered/macron/degree/plusminus%
1004 /twosuperior/threesuperior/acute/mu %
1005 183/periodcentered/cedilla/onesuperior/ordmasculine %
1006 188/onequarter/onehalf/threequarters %
1007 192/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE%
1008 /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute%
1009 /Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex%
1010 /Otilde/Odieresis/multiply/Oslash/Ugrave/Uacute/Ucircumflex%
1011 /Udieresis/Yacute/Thorn/germandbls/agrave/aacute/acircumflex%
1012 /atilde/adieresis/aring/ae/ccedilla/egrave/eacute%
1013 /ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis%
1014 /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis%
1015 /divide/oslash/ugrave/uacute/ucircumflex/udieresis/yacute%
1016 /thorn/ydieresis%
1017 ]%
1018 >>%
1019 }%
1020 \@pdfm@mark{obj @OBJZaDb%
1021 <<%
1022 /Type/Font%
1023 /Subtype/Type1%
1024 /Name/ZaDb%
1025 /BaseFont/ZapfDingbats%
1026 >>%
1027 }%
1028 \@pdfm@mark{obj @OBJHelv%
1029 <<%
1030 /Type/Font%
1031 /Subtype/Type1%
1032 /Name/Helv%
1033 /BaseFont/Helvetica%
1034 /Encoding @OBJpdfdocencoding%
1035 >>%
1036 }%
1037 \global\let\Hy@FormObjects\relax
1038 }
1039 \providecommand*{\Fld@pageobjref}{}
1040 \@ifundefined{pdf@escapestring}
1041 {%
1042 \let\Hy@escapestring\@firstofone
1043 \def\Hy@escapeform#1{%
1044 \ifHy@pdfescapeform
1045 \def\Hy@escapestring##1{%
1046 \noexpand\Hy@escapestring{\noexpand##1}%
1047 }%
1048 \edef\Hy@temp{#1}%
1049 \expandafter\Hy@@escapeform\Hy@temp\Hy@escapestring{}\@nil
1050 \def\Hy@escapestring##1{%
1051 \@ifundefined{Hy@esc@\string##1}{%
1052 ##1%
1053 \ThisShouldNotHappen
1054 }{%
1055 \csname Hy@esc@\string##1\endcsname
1056 }%
1057 }%
1058 \else
1059 \let\Hy@escapestring\@firstofone
1060 \fi
1061 }%
1062 \def\Hy@@escapeform#1\Hy@escapestring#2#3\@nil{%
1063 \ifx\\#3\\%
1064 \else
1065 \expandafter
1066 \Hy@pstringdef\csname Hy@esc@\string#2\endcsname{#2}%
1067 \Hy@ReturnAfterFi{%
1068 \Hy@@escapeform#3\@nil
1069 }%
1070 \fi
1071 }%
1072 }{%
1073 \def\Hy@escapeform#1{%
1074 \ifHy@pdfescapeform
1075 \let\Hy@escapestring\pdfescapestring
1076 \else
1077 \let\Hy@escapestring\@firstofone
1078 \fi
1079 }%
1080 \Hy@escapeform{}%
1081 }
1082 \def\PDFForm@Name{%
1083 \PDFForm@@Name\Fld@name
1084 \ifx\Fld@altname\relax
1085 \else
1086 \PDFForm@@Name\Fld@altname
1087 \fi
1088 \ifx\Fld@mappingname\relax
1089 \else
1090 \PDFForm@@Name\Fld@mappingname
1091 \fi
1092 }
1093 \def\PDFForm@@Name#1{%
1094 \begingroup
1095 \ifnum\Hy@pdf@majorminor@version<105 % implementation note 117, PDF spec 1.7
1096 \ifHy@unicode
1097 \Hy@unicodefalse
1098 \fi
1099 \fi
1100 \pdfstringdef\Hy@gtemp#1%
1101 \endgroup
1102 \let#1\Hy@gtemp
1103 }
1104 \def\Fld@@additionalactions{%
1105 \ifx\Fld@keystroke@code\@empty
1106 \else
1107 /K<</S/JavaScript/JS(\Hy@escapestring{\Fld@keystroke@code})>>%
1108 \fi
1109 \ifx\Fld@format@code\@empty
1110 \else
1111 /F<</S/JavaScript/JS(\Hy@escapestring{\Fld@format@code})>>%
1112 \fi
1113 \ifx\Fld@validate@code\@empty
1114 \else
1115 /V<</S/JavaScript/JS(\Hy@escapestring{\Fld@validate@code})>>%
1116 \fi
1117 \ifx\Fld@calculate@code\@empty
1118 \else
1119 /C<</S/JavaScript/JS(\Hy@escapestring{\Fld@calculate@code})>>%
1120 \fi
1121 \ifx\Fld@onfocus@code\@empty
1122 \else
1123 /Fo<</S/JavaScript/JS(\Hy@escapestring{\Fld@onfocus@code})>>%
1124 \fi
1125 \ifx\Fld@onblur@code\@empty
1126 \else
1127 /Bl<</S/JavaScript/JS(\Hy@escapestring{\Fld@onblur@code})>>%
1128 \fi
1129 \ifx\Fld@onmousedown@code\@empty
1130 \else
1131 /D<</S/JavaScript/JS(\Hy@escapestring{\Fld@onmousedown@code})>>%
1132 \fi
1133 \ifx\Fld@onmouseup@code\@empty
1134 \else
1135 /U<</S/JavaScript/JS(\Hy@escapestring{\Fld@onmouseup@code})>>%
1136 \fi
1137 \ifx\Fld@onenter@code\@empty
1138 \else
1139 /E<</S/JavaScript/JS(\Hy@escapestring{\Fld@onenter@code})>>%
1140 \fi
1141 \ifx\Fld@onexit@code\@empty
1142 \else
1143 /X<</S/JavaScript/JS(\Hy@escapestring{\Fld@onexit@code})>>%
1144 \fi
1145 }
1146 \def\Fld@additionalactions{%
1147 \if-\Fld@@additionalactions-%
1148 \else
1149 \ifHy@pdfa
1150 \else
1151 /AA<<\Fld@@additionalactions>>%
1152 \fi
1153 \fi
1154 }
1155 \def\Fld@annotnames{%
1156 /T(\Fld@name)%
1157 \ifx\Fld@altname\relax
1158 \else
1159 /TU(\Fld@altname)%
1160 \fi
1161 \ifx\Fld@mappingname\relax
1162 \else
1163 /TM(\Fld@mappingname)%
1164 \fi
1165 }
1166 \def\PDFForm@Check{%
1167 /Subtype/Widget%
1168 \Fld@annotflags
1169 \Fld@pageobjref
1170 \Fld@annotnames
1171 /FT/Btn%
1172 \Fld@flags
1173 /Q \Fld@align
1174 /BS<</W \Fld@borderwidth /S/\Fld@borderstyle>>%
1175 /AP<< /N <</Yes<<>>>> >> %new string /Yes is from below
1176 /MK<<%
1177 \ifnum\Fld@rotation=\z@
1178 \else
1179 /R \Fld@rotation
1180 \fi
1181 \ifx\Fld@bordercolor\relax
1182 \else
1183 /BC[\Fld@bordercolor]%
1184 \fi
1185 \ifx\Fld@bcolor\relax
1186 \else
1187 /BG[\Fld@bcolor]%
1188 \fi
1189 /CA(\Hy@escapestring{\Fld@cbsymbol})%
1190 >>%
1191 /DA(/ZaDb \strip@pt\Fld@charsize\space Tf%
1192 \ifx\Fld@color\@empty\else\space\Fld@color\fi)%
1193 /H/P%
1194 \ifFld@checked /V/Yes/AS/Yes\else /V/Off/AS/Off\fi
1195 \Fld@additionalactions
1196 }
1197 \ifHy@pdfa
1198 \else
1199 \def\PDFForm@Push{%
1200 /Subtype/Widget%
1201 \Fld@annotflags
1202 \Fld@pageobjref
1203 \Fld@annotnames
1204 /FT/Btn%
1205 \Fld@flags
1206 /H/P%
1207 /BS<</W \Fld@borderwidth/S/\Fld@borderstyle>>%
1208 \ifcase0\ifnum\Fld@rotation=\z@ \else 1\fi
1209 \ifx\Fld@bordercolor\relax\else 1\fi
1210 \space
1211 \else
1212 /MK<<%
1213 \ifnum\Fld@rotation=\z@
1214 \else
1215 /R \Fld@rotation
1216 \fi
1217 \ifx\Fld@bordercolor\relax
1218 \else
1219 /BC[\Fld@bordercolor]%
1220 \fi
1221 >>%
1222 \fi
1223 /A<</S/JavaScript/JS(\Hy@escapestring{\Fld@onclick@code})>>%
1224 \Fld@additionalactions
1225 }%
1226 \fi
1227 \def\PDFForm@List{%
1228 /Subtype/Widget%
1229 \Fld@annotflags
1230 \Fld@pageobjref
1231 \Fld@annotnames
1232 /FT/Ch%
1233 \Fld@flags
1234 /Q \Fld@align
1235 /BS<</W \Fld@borderwidth/S/\Fld@borderstyle>>%
1236 \ifcase0\ifnum\Fld@rotation=\z@ \else 1\fi
1237 \ifx\Fld@bordercolor\relax\else 1\fi
1238 \ifx\fld@bcolor\relax \else 1\fi
1239 \space
1240 \else
1241 /MK<<%
1242 \ifnum\Fld@rotation=\z@
1243 \else
1244 /R \Fld@rotation
1245 \fi
1246 \ifx\Fld@bordercolor\relax
1247 \else
1248 /BC[\Fld@bordercolor]%
1249 \fi
1250 \ifx\Fld@bcolor\relax
1251 \else
1252 /BG[\Fld@bcolor]%
1253 \fi
1254 >>%
1255 \fi
1256 /DA(/Helv \strip@pt\Fld@charsize\space Tf%
1257 \ifx\Fld@color\@empty\else\space\Fld@color\fi)%
1258 \Fld@choices
1259 \Fld@additionalactions
1260 }
1261 \def\PDFForm@Radio{%
1262 /Subtype/Widget%
1263 \Fld@annotflags
1264 \Fld@pageobjref
1265 \Fld@annotnames
1266 /FT/Btn%
1267 \Fld@flags
1268 /H/P%
1269 /BS<</W \Fld@borderwidth/S/\Fld@borderstyle>>%
1270 /MK<<%
1271 \ifnum\Fld@rotation=\z@
1272 \else
1273 /R \Fld@rotation
1274 \fi
1275 \ifx\Fld@bordercolor\relax
1276 \else
1277 /BC[\Fld@bordercolor]%
1278 \fi
1279 \ifx\Fld@bcolor\relax
1280 \else
1281 /BG[\Fld@bcolor]%
1282 \fi
1283 /CA(\Hy@escapestring{\Fld@radiosymbol})%
1284 >>%
1285 /DA(/ZaDb \strip@pt\Fld@charsize\space Tf%
1286 \ifx\Fld@color\@empty\else\space\Fld@color\fi)%
1287 \ifx\Fld@default\@empty
1288 /V/Off%
1289 /DV/Off%
1290 \else
1291 /V/\Fld@default
1292 /DV/\Fld@default
1293 \fi
1294 \Fld@additionalactions
1295 }
1296 \def\PDFForm@Text{%
1297 /Subtype/Widget%
1298 \Fld@annotflags
1299 \Fld@pageobjref
1300 \Fld@annotnames
1301 /FT/Tx%
1302 \Fld@flags
1303 /Q \Fld@align
1304 /BS<</W \Fld@borderwidth\space /S /\Fld@borderstyle>>%
1305 \ifcase0\ifnum\Fld@rotation=\z@ \else 1\fi
1306 \ifx\Fld@bordercolor\relax\else 1\fi
1307 \ifx\Fld@bcolor\relax \else 1\fi
1308 \space
1309 \else
1310 /MK<<%
1311 \ifnum\Fld@rotation=\z@
1312 \else
1313 /R \Fld@rotation
1314 \fi
1315 \ifx\Fld@bordercolor\relax
1316 \else
1317 /BC[\Fld@bordercolor]%
1318 \fi
1319 \ifx\Fld@bcolor\relax
1320 \else
1321 /BG[\Fld@bcolor]%
1322 \fi
1323 >>%
1324 \fi
1325 /DA(/Helv \strip@pt\Fld@charsize\space Tf%
1326 \ifx\Fld@color\@empty\else\space\Fld@color\fi)%
1327 /DV(\Hy@escapestring{\Fld@default})%
1328 /V(\Hy@escapestring{\Fld@value})%
1329 \Fld@additionalactions
1330 \ifnum\Fld@maxlen>\z@/MaxLen \Fld@maxlen \fi
1331 }
1332 \def\PDFForm@Submit{%
1333 /Subtype/Widget%
1334 \Fld@annotflags
1335 \Fld@pageobjref
1336 \Fld@annotnames
1337 /FT/Btn%
1338 \Fld@flags
1339 /H/P%
1340 /BS<</W \Fld@borderwidth/S/\Fld@borderstyle>>%
1341 \ifcase0\ifnum\Fld@rotation=\z@ \else 1\fi
1342 \ifx\Fld@bordercolor\relax\else 1\fi
1343 \space
1344 \else
1345 /MK<<%
1346 \ifnum\Fld@rotation=\z@
1347 \else
1348 /R \Fld@rotation
1349 \fi
1350 \ifx\Fld@bordercolor\relax
1351 \else
1352 /BC[\Fld@bordercolor]%
1353 \fi
1354 >>%
1355 \fi
1356 /A<<%
1357 /S/SubmitForm%
1358 /F<<%
1359 /FS/URL%
1360 /F(\Hy@escapestring{\Form@action})%
1361 >>%
1362 \Fld@submitflags
1363 >>%
1364 \Fld@additionalactions
1365 }
1366 \ifHy@pdfa
1367 \else
1368 \def\PDFForm@Reset{%
1369 /Subtype/Widget%
1370 \Fld@annotflags
1371 \Fld@pageobjref
1372 \Fld@annotnames
1373 /FT/Btn%
1374 \Fld@flags
1375 /H/P%
1376 /DA(/Helv \strip@pt\Fld@charsize\space Tf 0 0 1 rg)%
1377 \ifcase0\ifnum\Fld@rotation=\z@ \else 1\fi
1378 \ifx\Fld@bordercolor\relax\else 1\fi
1379 \space
1380 \else
1381 /MK<<%
1382 \ifnum\Fld@rotation=\z@
1383 \else
1384 /R \Fld@rotation
1385 \fi
1386 \ifx\Fld@bordercolor\relax
1387 \else
1388 /BC[\Fld@bordercolor]%
1389 \fi
1390 >>%
1391 \fi
1392 /BS<</W \Fld@borderwidth/S/\Fld@borderstyle>>%
1393 /A<</S/ResetForm>>%
1394 \Fld@additionalactions
1395 }%
1396 \fi
1397 \def\Hy@writebookmark#1#2#3#4#5{%
1398 % section number, text, label, level, file
1399 \ifx\WriteBookmarks\relax%
1400 \else
1401 \ifnum#4>\Hy@bookmarksdepth\relax
1402 \else
1403 \@@writetorep{#1}{#2}{#3}{#4}{#5}%
1404 \fi
1405 \fi
1406 }
1407 \def\Hy@currentbookmarklevel{0}
1408 \def\Hy@numberline#1{#1 }
1409 \def\@@writetorep#1#2#3#4#5{%
1410 \begingroup
1411 \edef\Hy@tempa{#5}%
1412 \ifx\Hy@tempa\Hy@bookmarkstype
1413 \edef\Hy@level{#4}%
1414 \ifx\Hy@levelcheck Y%
1415 \@tempcnta\Hy@level\relax
1416 \advance\@tempcnta by -1 %
1417 \ifnum\Hy@currentbookmarklevel<\@tempcnta
1418 \advance\@tempcnta by -\Hy@currentbookmarklevel\relax
1419 \advance\@tempcnta by 1 %
1420 \Hy@Warning{%
1421 Difference (\the\@tempcnta) between bookmark levels is %
1422 greater \MessageBreak than one, level fixed%
1423 }%
1424 \@tempcnta\Hy@currentbookmarklevel
1425 \advance\@tempcnta by 1 %
1426 \edef\Hy@level{\the\@tempcnta}%
1427 \fi
1428 \else
1429 \global\let\Hy@levelcheck Y%
1430 \fi
1431 \global\let\Hy@currentbookmarklevel\Hy@level
1432 \@tempcnta\Hy@level\relax
1433 \expandafter\xdef\csname Parent\Hy@level\endcsname{#3}%
1434 \advance\@tempcnta by -1 %
1435 \edef\Hy@tempa{#3}%
1436 \edef\Hy@tempb{\csname Parent\the\@tempcnta\endcsname}%
1437 \ifx\Hy@tempa\Hy@tempb
1438 \Hy@Warning{%
1439 The anchor of a bookmark and its parent's must not%
1440 \MessageBreak be the same. Added a new anchor%
1441 }%
1442 \phantomsection
1443 \fi
1444 \ifHy@bookmarksnumbered
1445 \let\numberline\Hy@numberline
1446 \let\booknumberline\Hy@numberline
1447 \let\partnumberline\Hy@numberline
1448 \let\chapternumberline\Hy@numberline
1449 \else
1450 \let\numberline\@gobble
1451 \let\booknumberline\@gobble
1452 \let\partnumberline\@gobble
1453 \let\chapternumberline\@gobble
1454 \fi
1455 \pdfstringdef\Hy@tempa{#2}%
1456 \HyPsd@SanitizeForOutFile\Hy@tempa
1457 \if@filesw
1458 \stepcounter{bookmark@seq@number}%
1459 \@ifundefined{@outlinefile}{%
1460 }{%
1461 \protected@write\@outlinefile{}{%
1462 \protect\BOOKMARK
1463 [\Hy@level][\@bookmarkopenstatus{\Hy@level}]{#3}%
1464 {\Hy@tempa}{\Hy@tempb}%
1465 \@percentchar\space\thebookmark@seq@number
1466 }%
1467 }%
1468 \fi
1469 \fi
1470 \endgroup
1471 }
1472 \newcounter{bookmark@seq@number}
1473 \begingroup
1474 \lccode`(=`{%
1475 \lccode`)=`}%
1476 \lccode`1=\z@
1477 \lccode`2=\z@
1478 \lccode`3=\z@
1479 \lccode`5=\z@
1480 \lccode`7=\z@
1481 \lccode`\#=\z@
1482 \lccode`\`=\z@
1483 \lccode`\{=\z@
1484 \lccode`\}=\z@
1485 \lowercase{%
1486 \endgroup
1487 \def\HyPsd@SanitizeForOutFile#1{%
1488 \@onelevel@sanitize\Hy@tempa
1489 \escapechar`\\%
1490 \edef\Hy@tempa{%
1491 \expandafter\HyPsd@SanitizeOut@BraceLeft\Hy@tempa(\@nil
1492 }%
1493 \edef\Hy@tempa{%
1494 \expandafter\HyPsd@SanitizeOut@BraceRight\Hy@tempa)\@nil
1495 }%
1496 }%
1497 \def\HyPsd@SanitizeOut@BraceLeft#1(#2\@nil{%
1498 #1%
1499 \ifx\\#2\\%
1500 \expandafter\@gobble
1501 \else
1502 \expandafter\@firstofone
1503 \fi
1504 {%
1505 \string\173%
1506 \HyPsd@SanitizeOut@BraceLeft#2\@nil
1507 }%
1508 }%
1509 \def\HyPsd@SanitizeOut@BraceRight#1)#2\@nil{%
1510 #1%
1511 \ifx\\#2\\%
1512 \expandafter\@gobble
1513 \else
1514 \expandafter\@firstofone
1515 \fi
1516 {%
1517 \string\175%
1518 \HyPsd@SanitizeOut@BraceRight#2\@nil
1519 }%
1520 }%
1521 }
1522 \newcommand{\currentpdfbookmark}{%
1523 \pdfbookmark[\Hy@currentbookmarklevel]%
1524 }
1525 \newcommand{\subpdfbookmark}{%
1526 \@tempcnta\Hy@currentbookmarklevel
1527 \Hy@StepCount\@tempcnta
1528 \expandafter\pdfbookmark\expandafter[\the\@tempcnta]%
1529 }
1530 \newcommand{\belowpdfbookmark}[2]{%
1531 \@tempcnta\Hy@currentbookmarklevel
1532 \Hy@StepCount\@tempcnta
1533 \expandafter\pdfbookmark\expandafter[\the\@tempcnta]{#1}{#2}%
1534 \advance\@tempcnta by -1 %
1535 \xdef\Hy@currentbookmarklevel{\the\@tempcnta}%
1536 }
1537 \renewcommand\pdfbookmark[3][0]{%
1538 \Hy@writebookmark{}{#2}{#3.#1}{#1}{toc}%
1539 \hyper@anchorstart{#3.#1}\hyper@anchorend
1540 }
1541 \def\BOOKMARK{%
1542 \@ifnextchar[{\@BOOKMARK}{\@@BOOKMARK[1][-]}%
1543 }
1544 \def\@BOOKMARK[#1]{%
1545 \@ifnextchar[{\@@BOOKMARK[{#1}]}{\@@BOOKMARK[{#1}][-]}%
1546 }
1547 \RequirePackage{rerunfilecheck}[2009/12/10]
1548 \def\Hy@OutlineRerunCheck{%
1549 \RerunFileCheck{\jobname.out}{%
1550 \immediate\closeout\@outlinefile
1551 }{%
1552 Rerun to get outlines right\MessageBreak
1553 or use package `bookmark'%
1554 }%
1555 }
1556 \def\ReadBookmarks{%
1557 \pdf@ifdraftmode{}{%
1558 \begingroup
1559 \def\do##1{%
1560 \ifnum\catcode`##1=\active
1561 \@makeother##1%
1562 \else
1563 \ifnum\catcode`##1=6 %
1564 \@makeother##1%
1565 \fi
1566 \fi
1567 }%
1568 \dospecials
1569 \Hy@safe@activestrue
1570 \escapechar=`\\%
1571 \def\@@BOOKMARK[##1][##2]##3##4##5{%
1572 \calc@bm@number{##5}%
1573 }%
1574 \InputIfFileExists{\jobname.out}{}{}%
1575 \ifx\WriteBookmarks\relax
1576 \global\let\WriteBookmarks\relax
1577 \fi
1578 \def\@@BOOKMARK[##1][##2]##3##4##5{%
1579 \def\Hy@temp{##4}%
1580 \Hy@pstringdef\Hy@pstringName{\HyperDestNameFilter{##3}}%
1581 \@pdfm@mark{%
1582 outline \ifHy@DvipdfmxOutlineOpen
1583 [%
1584 \ifnum##21>\z@
1585 \else
1586 -%
1587 \fi
1588 ] %
1589 \fi
1590 ##1<<%
1591 /Title(\expandafter\strip@prefix\meaning\Hy@temp)%
1592 /A<<%
1593 /S/GoTo%
1594 /D(\Hy@pstringName)%
1595 >>%
1596 >>%
1597 }%
1598 }%
1599 \begingroup
1600 \def\WriteBookmarks{0}%
1601 \InputIfFileExists{\jobname.out}{}{}%
1602 \endgroup
1603 %{\escapechar\m@ne\InputIfFileExists{\jobname.out}{}{}}%
1604 \endgroup
1605 }%
1606 \ifx\WriteBookmarks\relax
1607 \else
1608 \if@filesw
1609 \newwrite\@outlinefile
1610 \Hy@OutlineRerunCheck
1611 \immediate\openout\@outlinefile=\jobname.out\relax
1612 \fi
1613 \fi
1614 }
1615 \def\check@bm@number#1{%
1616 \expandafter\ifx\csname B_#1\endcsname\relax
1617 0%
1618 \else
1619 \csname B_#1\endcsname
1620 \fi
1621 }
1622 \def\calc@bm@number#1{%
1623 \@tempcnta=\check@bm@number{#1}\relax
1624 \advance\@tempcnta by 1 %
1625 \expandafter\xdef\csname B_#1\endcsname{\the\@tempcnta}%
1626 }
1627 \ifHy@implicit
1628 \else
1629 \expandafter\endinput
1630 \fi
1631 \newlength\Hy@SectionHShift
1632 \def\Hy@SectionAnchorHref#1{%
1633 \ifx\protect\@typeset@protect
1634 \Hy@@SectionAnchor{#1}%
1635 \fi
1636 }
1637 \DeclareRobustCommand*{\Hy@@SectionAnchor}[1]{%
1638 \leavevmode
1639 \hbox to 0pt{%
1640 \kern-\Hy@SectionHShift
1641 \Hy@raisedlink{%
1642 \hyper@anchorstart{#1}\hyper@anchorend
1643 }%
1644 \hss
1645 }%
1646 }
1647 \AddToNoCaseChangeList{\Hy@@SectionAnchor}
1648 \@ifundefined{hyper@nopatch@sectioning}
1649 {
1650 \let\H@old@ssect\@ssect
1651 \def\@ssect#1#2#3#4#5{%
1652 \Hy@MakeCurrentHrefAuto{section*}%
1653 \setlength{\Hy@SectionHShift}{#1}%
1654 \begingroup
1655 \toks@{\H@old@ssect{#1}{#2}{#3}{#4}}%
1656 \toks\tw@\expandafter{%
1657 \expandafter\Hy@SectionAnchorHref\expandafter{\@currentHref}%
1658 #5%
1659 }%
1660 \edef\x{\endgroup
1661 \the\toks@{\the\toks\tw@}%
1662 }\x
1663 }
1664 \let\H@old@schapter\@schapter
1665 \def\@schapter#1{%
1666 \begingroup
1667 \let\@mkboth\@gobbletwo
1668 \Hy@MakeCurrentHrefAuto{\Hy@chapapp*}%
1669 \Hy@raisedlink{%
1670 \hyper@anchorstart{\@currentHref}\hyper@anchorend
1671 }%
1672 \endgroup
1673 \H@old@schapter{#1}%
1674 }
1675 \@ifundefined{@chapter}{}{%
1676 \let\Hy@org@chapter\@chapter
1677 \def\@chapter{%
1678 \def\Hy@next{%
1679 \Hy@MakeCurrentHrefAuto{\Hy@chapapp*}%
1680 \Hy@raisedlink{%
1681 \hyper@anchorstart{\@currentHref}\hyper@anchorend
1682 }%
1683 }%
1684 \ifnum\c@secnumdepth>\m@ne
1685 \@ifundefined{if@mainmatter}%
1686 \iftrue{\csname if@mainmatter\endcsname}%
1687 \let\Hy@next\relax
1688 \fi
1689 \fi
1690 \Hy@next
1691 \Hy@org@chapter
1692 }%
1693 }
1694 \let\H@old@part\@part
1695 \@ifundefined{chapter}
1696 {\let\Hy@secnum@part\z@}
1697 {\let\Hy@secnum@part\m@ne}
1698 \def\@part{%
1699 \ifnum\Hy@secnum@part>\c@secnumdepth
1700 \phantomsection
1701 \fi
1702 \H@old@part
1703 }
1704 \let\H@old@spart\@spart
1705 \def\@spart#1{%
1706 \Hy@MakeCurrentHrefAuto{part*}%
1707 \Hy@raisedlink{%
1708 \hyper@anchorstart{\@currentHref}\hyper@anchorend
1709 }%
1710 \H@old@spart{#1}%
1711 }
1712 \let\H@old@sect\@sect
1713 \def\@sect#1#2#3#4#5#6[#7]#8{%
1714 \ifnum #2>\c@secnumdepth
1715 \expandafter\@firstoftwo
1716 \else
1717 \expandafter\@secondoftwo
1718 \fi
1719 {%
1720 \Hy@MakeCurrentHrefAuto{section*}%
1721 \setlength{\Hy@SectionHShift}{#3}%
1722 \begingroup
1723 \toks@{\H@old@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]}%
1724 \toks\tw@\expandafter{%
1725 \expandafter\Hy@SectionAnchorHref\expandafter{\@currentHref}%
1726 #8%
1727 }%
1728 \edef\x{\endgroup
1729 \the\toks@{\the\toks\tw@}%
1730 }\x
1731 }{%
1732 \H@old@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}%
1733 }%
1734 }
1735 }{}
1736 \expandafter\def\csname Parent-4\endcsname{}
1737 \expandafter\def\csname Parent-3\endcsname{}
1738 \expandafter\def\csname Parent-2\endcsname{}
1739 \expandafter\def\csname Parent-1\endcsname{}
1740 \expandafter\def\csname Parent0\endcsname{}
1741 \expandafter\def\csname Parent1\endcsname{}
1742 \expandafter\def\csname Parent2\endcsname{}
1743 \expandafter\def\csname Parent3\endcsname{}
1744 \expandafter\def\csname Parent4\endcsname{}
1745 \endinput
1746 %%
1747 %% End of file `hdvipdfm.def'.