2 %% This is file `hdvipdfm.def',
3 %% generated with the docstrip utility.
5 %% The original source files were:
7 %% hyperref.dtx (with options: `dvipdfm,pdfform,outlines')
9 %% File: hyperref.dtx Copyright 1995-2001 Sebastian Rahtz,
10 %% RCS: $Id: hyperref.dtx 6.71 2000/10/04 rahtz Exp rahtz $
12 %% This file is part of the `Hyperref Bundle'.
13 %% -------------------------------------------
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.
22 %% The list of all files belonging to the `Hyperref Bundle' is
23 %% given in the file `manifest.txt'.
25 \ProvidesFile{hdvipdfm.def}
27 Hyperref driver for dvipdfm]
28 \def\Hy@PutCatalog#1{\@pdfm@mark{docview << #1 >>}}
30 \def\HyPL@StorePageLabel#1{%
33 \edef\Hy@tempa{\the\Hy@abspage\space<< #1 >> }%
34 \immediate\write\@mainaux{%
35 \string\HyPL@Entry{\Hy@tempa}%
42 \immediate\write\@mainaux{%
43 \string\providecommand\string*\string\HyPL@Entry[1]{}%
46 \ifx\HyPL@Labels\@empty
47 \Hy@WarningNoLine{Rerun to get /PageLabels entry}%
51 \let\HyPL@Entry\@gobble
54 \expandafter\gdef\expandafter\HyPL@Labels\expandafter{%
60 \newsavebox{\pdfm@box}
61 \def\@pdfm@mark#1{\special{pdf:#1}}
64 \@pdfm@mark{dest (#1) [@thispage /\@pdfview\space @xpos @ypos]}%
67 \providecommand\@pdfview{XYZ}
68 \providecommand\@pdfborder{0 0 1}
72 \def\hyper@anchorstart#1{%
76 \def\hyper@anchorend{%
79 \def\Hy@undefinedname{UNDEFINED}
80 \def\hyper@linkstart#1#2{%
81 \protected@edef\Hy@testname{#2}%
82 \ifx\Hy@testname\@empty
83 \let\Hy@testname\Hy@undefinedname
90 /C [\csname @#1bordercolor\endcsname]
97 \Hy@colorlink{\csname @#1color\endcsname}%
103 \def\hyper@link#1#2#3{%
104 \hyper@linkstart{#1}{#2}#3\hyper@linkend
106 \def\hyper@linkfile#1#2#3{%
111 /Border [\@pdfborder]
112 /C [\@filebordercolor]
116 /D \ifx\\#3\\[0 \@pdfstartview]\else(#3)\fi\space
117 \ifHy@newwindow /NewWindow true \fi
121 \Hy@colorlink{\@filecolor}#1\Hy@endcolorlink
124 \def\@hyper@launch run:#1\\#2#3{% filename, anchor text linkname
129 /Border [\@pdfborder]
130 /C [\@filebordercolor]
134 \ifHy@newwindow /NewWindow true \fi
137 /Win << /P (#3) /F (#1) >>
142 \Hy@colorlink{\@filecolor}#2\Hy@endcolorlink
145 \def\hyper@linkurl#1#2{%
150 /Border [\@pdfborder]
151 /C [\@urlbordercolor]
158 \Hy@colorlink{\@urlcolor}#1\Hy@endcolorlink
161 \def\Acrobatmenu#1#2{%
170 /Border [\@pdfborder]
171 /C [\@menubordercolor]
174 \Hy@colorlink{\@menucolor}#2\Hy@endcolorlink
177 \def\@pdfproducer{dvipdfm}
182 /Subject (\@pdfsubject)
183 /Creator (\@pdfcreator)
184 /Author (\@pdfauthor)
185 /Producer (\@pdfproducer)
186 /Keywords (\@pdfkeywords)
189 \Hy@DisableOption{pdfauthor}%
190 \Hy@DisableOption{pdftitle}%
191 \Hy@DisableOption{pdfsubject}%
192 \Hy@DisableOption{pdfcreator}%
193 \Hy@DisableOption{pdfproducer}%
194 \Hy@DisableOption{pdfkeywords}%
199 /Page \@pdfstartpage\space
200 /View \@pdfstartview\space
201 /URI << /Base (\@baseurl) >>
202 /PageMode \@pdfpagemode
203 /ViewerPreferences <<
204 \ifHy@toolbar\else /HideToolbar true \fi
205 \ifHy@menubar\else /HideMenubar true \fi
206 \ifHy@windowui\else /HideWindowUI true \fi
207 \ifHy@fitwindow /FitWindow true \fi
208 \ifHy@centerwindow /CenterWindow true \fi
210 \ifx\pdf@pagelayout\@empty
212 /PageLayout /\pdf@pagelayout\space
216 \ifx\@pdfpagescrop\@empty
218 \@pdfm@mark{put @pages << /CropBox [\@pdfpagescrop] >>}
221 \def\@Gauge[#1]#2#3#4{% parameters, label, minimum, maximum
222 \typeout{Sorry, dvipdfm does not support FORM gauges}%
225 \@ifundefined{textcolor}{\let\textcolor\@gobble}{}%
227 \@pdfm@mark{obj @afields [ ]}%
228 \@pdfm@mark{obj @corder [ ]}%
232 /DR << /Font << /ZaDb @OBJZaDb /Helv @OBJHelv >> >>
233 /DA (/Helv 10 Tf 0 g )
235 /NeedAppearances true
238 \@pdfm@mark{put @catalog << /AcroForm @aform >>}%
241 \def\dvipdfm@setdim{%
242 height \the\ht\pdfm@box\space
243 width \the\wd\pdfm@box\space
244 depth \the\dp\pdfm@box\space
246 \def\@TextField[#1]#2{% parameters, label
249 \let\Fld@value\@empty
250 \def\Fld@width{\DefaultWidthofText}%
251 \def\Fld@height{\DefaultHeightofText}%
255 \ifFld@hidden\def\Fld@width{1sp}\fi
256 \ifx\Fld@value\@empty\def\Fld@value{\Fld@default}\fi
258 \def\Fld@height{4\DefaultHeightofText}% DANGER
260 \setbox\pdfm@box=\hbox{%
261 \MakeTextField{\Fld@width}{\Fld@height}%
263 \LayoutTextField{#2}{%
265 ann @\Fld@name\space \dvipdfm@setdim << \PDFForm@Text >>%
269 \@pdfm@mark{put @afields @\Fld@name}% record in @afields array
272 \def\@ChoiceMenu[#1]#2#3{% parameters, label, choices
275 \def\Fld@width{\DefaultWidthofChoiceMenu}%
276 \def\Fld@height{\DefaultHeightofChoiceMenu}%
280 \@for\@curropt:=#3\do{%
281 \expandafter\Fld@checkequals\@curropt==\\%
282 \Hy@StepCount\Fld@menulength
283 \settowidth{\@tempdimb}{\@currDisplay}%
284 \ifdim\@tempdimb>\@tempdima\@tempdima\@tempdimb\fi
286 \advance\@tempdima by 15\p@
289 \ifFld@hidden\def\Fld@width{1sp}\fi
290 \LayoutChoiceField{#2}{%
295 \ifdim\Fld@width<\@tempdima
296 \ifdim\@tempdima<1cm\@tempdima1cm\fi
297 \edef\Fld@width{\the\@tempdima}%
300 \ifFld@combo\def\Fld@flags{/Ff 917504}\fi
301 \ifFld@popdown\def\Fld@flags{/Ff 131072}\fi
302 \ifx\Fld@flags\@empty
303 \@tempdima=\the\Fld@menulength\Fld@charsize
304 \advance\@tempdima by \Fld@borderwidth bp
305 \advance\@tempdima by \Fld@borderwidth bp
306 \edef\Fld@height{\the\@tempdima}%
316 \setbox\pdfm@box=\hbox{\MakeRadioField{\Fld@width}{\Fld@height}}%
317 \@for\@curropt:=#1\do{%
318 \expandafter\Fld@checkequals\@curropt==\\%
319 \Hy@StepCount\Fld@listcount
323 ann \ifnum\Fld@listcount=1 @\Fld@name\space\fi
327 /AP << /N << /\@currValue /null >> >>
330 \unhcopy\pdfm@box\space% deliberate space between radio buttons
331 \ifnum\Fld@listcount=1\@pdfm@mark{put @afields @\Fld@name}\fi
334 \newcount\Fld@listcount
338 \@for\@curropt:=#1\do{%
339 \expandafter\Fld@checkequals\@curropt==\\%
340 \Hy@StepCount\Fld@listcount
342 \Choice@toks{\the\Choice@toks [(\@currValue) (\@currDisplay)]}%
345 \setbox\pdfm@box=\hbox{\MakeChoiceField{\Fld@width}{\Fld@height}}%
348 ann @\Fld@name\space\dvipdfm@setdim
352 \@pdfm@mark{put @afields @\Fld@name}%
354 \def\@PushButton[#1]#2{% parameters, label
359 \ifFld@hidden\def\Fld@width{1sp}\fi
360 \setbox\pdfm@box=\hbox{\MakeButtonField{#2}}%
361 \LayoutPushButtonField{%
364 ann @\Fld@name\space\dvipdfm@setdim
369 \@pdfm@mark{put @afields @\Fld@name}%
374 \def\Fld@width{\DefaultWidthofSubmit}%
375 \def\Fld@height{\DefaultHeightofSubmit}%
377 \def\Fld@name{Submit}%
379 \ifFld@hidden\def\Fld@width{1sp}\fi
380 \setbox\pdfm@box=\hbox{\MakeButtonField{#2}}%
383 ann @\Fld@name\space\dvipdfm@setdim
384 << \PDFForm@Submit >>%
387 \@pdfm@mark{put @afields @\Fld@name}%
392 \def\Fld@width{\DefaultWidthofReset}%
393 \def\Fld@height{\DefaultHeightofReset}%
395 \def\Fld@name{Reset}%
397 \ifFld@hidden\def\Fld@width{1sp}\fi
398 \setbox\pdfm@box=\hbox{\MakeButtonField{#2}}%
401 ann @\Fld@name\space\dvipdfm@setdim
402 << \PDFForm@Reset >>%
405 \@pdfm@mark{put @afields @\Fld@name}%
408 \def\@CheckBox[#1]#2{% parameters, label
412 \def\Fld@width{\DefaultWidthofCheckBox}%
413 \def\Fld@height{\DefaultHeightofCheckBox}%
416 \ifFld@hidden\def\Fld@width{1sp}\fi
417 \setbox\pdfm@box=\hbox{\MakeCheckField{\Fld@width}{\Fld@height}}%
418 \LayoutCheckField{#2}{%
420 ann @\Fld@name\space\dvipdfm@setdim
421 << \PDFForm@Check >>%
424 \@pdfm@mark{put @afields @\Fld@name}%
428 \@pdfm@mark{obj @OBJpdfdocencoding << /Type /Encoding /Differences [%
429 24 /breve /caron /circumflex /dotaccent /hungarumlaut /ogonek /ring
433 128 /bullet /dagger /daggerdbl /ellipsis /emdash /endash /florin
434 /fraction /guilsinglleft /guilsinglright /minus /perthousand
435 /quotedblbase /quotedblleft /quotedblright /quoteleft /quoteright
436 /quotesinglbase /trademark /fi /fl /Lslash /OE /Scaron /Ydieresis
437 /Zcaron /dotlessi /lslash /oe /scaron /zcaron
440 168 /dieresis /copyright /ordfeminine
441 172 /logicalnot /.notdef /registered /macron /degree /plusminus
442 /twosuperior /threesuperior /acute /mu
443 183 /periodcentered /cedilla /onesuperior /ordmasculine
444 188 /onequarter /onehalf /threequarters
445 192 /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE
446 /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute
447 /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex
448 /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex
449 /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex
450 /atilde /adieresis /aring /ae /ccedilla /egrave /eacute
451 /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis
452 /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis
453 /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute
457 \@pdfm@mark{obj @OBJZaDb
462 /BaseFont /ZapfDingbats
465 \@pdfm@mark{obj @OBJHelv
471 /Encoding @OBJpdfdocencoding
476 \ifFld@hidden /F 6 \else /F 4 \fi
479 /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >>
481 /BC [\Fld@bordercolor]
482 \ifx\Fld@bcolor\@empty
488 /DA (/ZaDb \strip@pt\Fld@charsize\space Tf \Fld@color\space rg)
491 \ifFld@checked /V /Yes \else /V /Off \fi
495 \ifFld@hidden /F 6 \else /F 4 \fi
500 /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >>
502 /BC [\Fld@bordercolor]
504 /A << /S /JavaScript /JS (\Fld@onclick;) >>
508 \ifFld@hidden /F 6 \else /F 4 \fi
512 /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >>
514 /BC [\Fld@bordercolor]
515 \ifx\Fld@bcolor\@empty
520 /DA (/Helv \strip@pt\Fld@charsize\space Tf \Fld@color\space rg )
521 /Opt [\the\Choice@toks]
527 \ifFld@hidden /F 6 \else /F 4 \fi
532 /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >>
534 /BC [\Fld@bordercolor]
535 \ifx\Fld@bcolor\@empty
541 /DA (/ZaDb \strip@pt\Fld@charsize\space Tf \Fld@color\space rg)
542 \ifx\@currValue\Fld@default
543 /V /\Fld@default\space
550 \ifFld@hidden /F 6 \else /F 4 \fi
554 /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >>
556 /BC [\Fld@bordercolor]
557 \ifx\Fld@bcolor\@empty
562 /DA (/Helv \strip@pt\Fld@charsize\space Tf \Fld@color\space rg )
565 \ifx\Fld@keystroke@code\@empty
567 /K << /S /JavaScript /JS (\Fld@keystroke@code) >>
569 \ifx\Fld@format@code\@empty
571 /F << /S /JavaScript /JS (\Fld@format@code) >>
573 \ifx\Fld@validate@code\@empty
575 /V << /S /JavaScript /JS (\Fld@validate@code) >>
577 \ifx\Fld@calculate@code\@empty
579 /C << /S /JavaScript /JS (\Fld@calculate@code) >>
584 \ifFld@readonly /Ff 4097 \else /Ff 4096 \fi
587 \ifFld@readonly /Ff 8193 \else /Ff 8192 \fi
590 \ifnum\Fld@maxlen>0/MaxLen \Fld@maxlen \fi
592 \def\PDFForm@Submit{%
594 \ifFld@hidden /F 6 \else /F 4 \fi
599 /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >>
601 /BC [\Fld@bordercolor]
609 \ifForm@html /Flags 4 \fi
614 \ifFld@hidden /F 6 \else /F 4 \fi
618 /DA (/Helv \strip@pt\Fld@charsize\space Tf 0 0 1 rg)
621 /BC [\Fld@bordercolor]
623 /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >>
624 /A << /S /ResetForm >>
626 \newwrite\@outlinefile
627 \def\Hy@writebookmark#1#2#3#4#5{% section number, text, label, level, file
628 \ifx\WriteBookmarks\relax%
632 \@@writetorep{#1}{#2}{#3}{#4}{#5}%
635 \def\Hy@currentbookmarklevel{0}
636 \def\Hy@numberline#1{#1 }
637 \def\@@writetorep#1#2#3#4#5{%
640 \ifx\Hy@tempa\Hy@bookmarkstype
642 \ifx\Hy@levelcheck Y%
643 \@tempcnta\Hy@level\relax
644 \advance\@tempcnta by -1
645 \ifnum\Hy@currentbookmarklevel<\@tempcnta
646 \advance\@tempcnta by -\Hy@currentbookmarklevel\relax
647 \advance\@tempcnta by 1
649 Difference (\the\@tempcnta) between bookmark levels is %
650 greater \MessageBreak than one, level fixed%
652 \@tempcnta\Hy@currentbookmarklevel
653 \advance\@tempcnta by 1
654 \edef\Hy@level{\the\@tempcnta}%
657 \global\let\Hy@levelcheck Y%
659 \global\let\Hy@currentbookmarklevel\Hy@level
660 \@tempcnta\Hy@level\relax
661 \expandafter\xdef\csname Parent\Hy@level\endcsname{#3}%
662 \advance\@tempcnta by -1
664 \edef\Hy@tempb{\csname Parent\the\@tempcnta\endcsname}%
665 \ifx\Hy@tempa\Hy@tempb
667 The anchor of a bookmark and its parent's must not%
668 \MessageBreak be the same. Added a new anchor%
672 \ifHy@bookmarksnumbered
673 \let\numberline\Hy@numberline
675 \let\numberline\@gobble
677 \pdfstringdef\Hy@tempa{#2}%
678 \protected@write\@outlinefile{}{%
680 [\Hy@level][\@bookmarkopenstatus{\Hy@level}]{#3}%
681 {\Hy@tempa}{\Hy@tempb}%
686 \newcommand{\currentpdfbookmark}{%
687 \pdfbookmark[\Hy@currentbookmarklevel]%
689 \newcommand{\subpdfbookmark}{%
690 \@tempcnta\Hy@currentbookmarklevel
691 \Hy@StepCount\@tempcnta
692 \expandafter\pdfbookmark\expandafter[\the\@tempcnta]%
694 \newcommand{\belowpdfbookmark}[2]{%
695 \@tempcnta\Hy@currentbookmarklevel
696 \Hy@StepCount\@tempcnta
697 \expandafter\pdfbookmark\expandafter[\the\@tempcnta]{#1}{#2}%
698 \advance\@tempcnta by -1
699 \xdef\Hy@currentbookmarklevel{\the\@tempcnta}%
701 \renewcommand\pdfbookmark[3][0]{%
702 \Hy@writebookmark{}{#2}{#3.#1}{#1}{toc}%
703 \hyper@anchorstart{#3.#1}\hyper@anchorend
705 \def\BOOKMARK{\@ifnextchar[{\@BOOKMARK}{\@@BOOKMARK[1][-]}}
706 \def\@BOOKMARK[#1]{\@ifnextchar[{\@@BOOKMARK[#1]}{\@@BOOKMARK[#1][-]}}
710 \let\escapechar\@gobble %
711 \def\@@BOOKMARK [##1][##2]##3##4##5{\calc@bm@number{##5}}%
712 \InputIfFileExists{\jobname.out}{}{}%
713 \ifx\WriteBookmarks\relax
714 \global\let\WriteBookmarks\relax
716 \def\@@BOOKMARK[##1][##2]##3##4##5{%
720 /Title (\expandafter\strip@prefix\meaning\Hy@temp)
729 \def\WriteBookmarks{0}%
730 \InputIfFileExists{\jobname.out}{}{}%
732 %{\escapechar\m@ne\InputIfFileExists{\jobname.out}{}{}}%
733 \ifx\WriteBookmarks\relax\else
734 \if@filesw\immediate\openout\@outlinefile=\jobname.out
736 \immediate\write\@outlinefile{<relaxxml>\relax}%
742 \def\check@bm@number#1{%
743 \expandafter\ifx\csname B_#1\endcsname\relax
746 \csname B_#1\endcsname
749 \def\calc@bm@number#1{%
750 \@tempcnta=\check@bm@number{#1}\relax
751 \advance\@tempcnta by1
752 \expandafter\xdef\csname B_#1\endcsname{\the\@tempcnta}%
759 \global\let\@begindvi\HyPL@EveryPage
761 \expandafter\endinput
763 \let\H@old@ssect\@ssect
764 \def\@ssect#1#2#3#4#5{%
765 \H@old@ssect{#1}{#2}{#3}{#4}{#5}%
768 \let\H@old@schapter\@schapter
772 \let\@mkboth\@gobbletwo
773 \Hy@GlobalStepCount\Hy@linkcounter
774 \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
775 \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
778 \@ifundefined{@chapter}{}{%
779 \let\Hy@org@chapter\@chapter
782 \Hy@GlobalStepCount\Hy@linkcounter
783 \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
784 \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
786 \ifnum\c@secnumdepth>\m@ne
787 \@ifundefined{if@mainmatter}%
788 \iftrue{\csname if@mainmatter\endcsname}
796 \let\H@old@spart\@spart
799 \Hy@GlobalStepCount\Hy@linkcounter
800 \xdef\@currentHref{part*.\the\Hy@linkcounter}%
801 \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
803 \let\H@old@sect\@sect
804 \def\@sect#1#2#3#4#5#6[#7]#8{%
805 \ifnum #2>\c@secnumdepth
806 \Hy@GlobalStepCount\Hy@linkcounter
807 \xdef\@currentHref{section*.\the\Hy@linkcounter}%
809 \H@old@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}%
810 \ifnum #2>\c@secnumdepth
811 \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
814 \expandafter\def\csname Parent-4\endcsname{}
815 \expandafter\def\csname Parent-3\endcsname{}
816 \expandafter\def\csname Parent-2\endcsname{}
817 \expandafter\def\csname Parent-1\endcsname{}
818 \expandafter\def\csname Parent0\endcsname{}
819 \expandafter\def\csname Parent1\endcsname{}
820 \expandafter\def\csname Parent2\endcsname{}
821 \expandafter\def\csname Parent3\endcsname{}
822 \expandafter\def\csname Parent4\endcsname{}
824 \def\@addchap[##1]##2{%
831 \addtocontents{lof}{\protect\addvspace{10\p@}}%
832 \addtocontents{lot}{\protect\addvspace{10\p@}}%
833 \Hy@GlobalStepCount\Hy@linkcounter
834 \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
835 \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
837 \@topnewpage[\@makeschapterhead{##2}]%
839 \@makeschapterhead{##2}%
842 \addcontentsline{toc}{chapter}{##1}%
845 \@ifclassloaded{scrbook}{%
846 \@ifclasslater{scrbook}{2001/01/01}{%
850 \@ifclassloaded{scrreprt}{%
851 \@ifclasslater{scrreprt}{2001/01/01}{%
861 %% End of file `hdvipdfm.def'.