2 %% This is file `hvtex.def',
3 %% generated with the docstrip utility.
5 %% The original source files were:
7 %% hyperref.dtx (with options: `vtex,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{hvtex.def}
27 Hyperref driver for VTeX in PDF/PS mode]
28 \edef\Hy@VTeXversion{%
29 \ifx\VTeXversion\@undefined
32 \ifx\VTeXversion\relax
40 \ifnum\Hy@VTeXversion<660 %
41 \gdef\Hy@PutCatalog#1{%
43 VTeX 6.59g or above required for pdfpagelabels%
47 \gdef\Hy@PutCatalog#1{%
48 \Hy@vt@PutCatalog#1/PageLabels <<>>\@nil
50 \gdef\Hy@vt@PutCatalog#1/PageLabels <<#2>>#3\@nil{%
53 \immediate\special{!pdfpagelabels #2}%
59 \def\HyPL@StorePageLabel#1{%
60 \toks@\expandafter{\HyPL@Labels}%
63 \the\Hy@abspage\space<< #1 >> %
66 \AtEndDocument{\clearpage\HyPL@SetPageLabels}
68 \ifx\mediaheight\@undefined
70 \ifx\mediaheight\relax
72 \providecommand*{\VTeXInitMediaSize}{%
73 \setlength\mediaheight\paperheight
74 \setlength\mediawidth\paperwidth
76 \AtBeginDocument{\VTeXInitMediaSize}%
79 \providecommand\@pdfview{xyz}
80 \providecommand\@pdfborder{0 0 1}%
81 \def\CurrentBorderColor{\@linkbordercolor}
87 \special{!aname #1;\@pdfview}%
90 \Hy@colorlink{\@anchorcolor}\anchor@spot\Hy@endcolorlink
94 \def\hyper@anchorstart#1{%
98 \special{!aname #1;\@pdfview}%
102 \def\hyper@anchorend{%
103 \Hy@activeanchorfalse
107 \def\Hy@undefinedname{UNDEFINED}
108 \def\hyper@linkstart#1#2{%
109 \Hy@colorlink{\csname @#1color\endcsname}%
110 \edef\CurrentBorderColor{\csname @#1bordercolor\endcsname}%
112 \ifx\Hy@tempa\@urltype
114 aref <u=/Type /Action /S /URI /URI (#2)>;%
115 a=</Border [\@pdfborder] /C [\CurrentBorderColor]>%
118 \protected@edef\Hy@testname{#2}%
119 \ifx\Hy@testname\@empty
120 \let\Hy@testname\Hy@undefinedname
124 a=</Border [\@pdfborder] /C [\CurrentBorderColor]>%
132 \def\hyper@linkfile#1#2#3{%
136 a=</Border [\@pdfborder] /C [\@filebordercolor]>%
138 \Hy@colorlink{\@filecolor}#1\Hy@endcolorlink
141 \def\hyper@linkurl#1#2{%
146 aref <u=/Type /Action /S /URI /URI (#2)>;%
147 a=</Border [\@pdfborder] /C [\@urlbordercolor]>%
149 \Hy@colorlink{\@urlcolor}#1\Hy@endcolorlink
153 \def\hyper@link#1#2#3{%
154 \edef\CurrentBorderColor{\csname @#1bordercolor\endcsname}%
156 \protected@edef\Hy@testname{#2}%
157 \ifx\Hy@testname\@empty
158 \let\Hy@testname\Hy@undefinedname
162 a=</Border [\@pdfborder] /C [\CurrentBorderColor]>%
164 \Hy@colorlink{\csname @#1color\endcsname}#3\Hy@endcolorlink
167 \def\hyper@image#1#2{%
168 \hyper@linkurl{#2}{#1}%
170 \def\@hyper@launch run:#1\\#2#3{%
177 \ifHy@newwindow /NewWindow true \fi
178 \ifx\\#3\\\else /Win << /F (#1) /P (#3) >> \fi%
180 a=</Border [\@pdfborder] /C [\@runbordercolor]>%
182 \Hy@colorlink{\@filecolor}#2\Hy@endcolorlink
185 \def\Acrobatmenu#1#2{%
188 aref <u=/S /Named /N /#1>;%
189 a=</Border [\@pdfborder] /C [\@menubordercolor]>%
191 \Hy@colorlink{\@menucolor}#2\Hy@endcolorlink
194 \ifnum\Hy@VTeXversion<702 %
196 \def\hyper@pagetransition{%
197 \ifx\@pdfpagetransition\relax
199 \ifx\@pdfpagetransition\@empty
201 \hvtex@parse@trans\@pdfpagetransition
205 \def\hvtex@trans@effect@Blinds{\def\hvtex@trans@code{B}}
206 \def\hvtex@trans@effect@Box{\def\hvtex@trans@code{X}}
207 \def\hvtex@trans@effect@Dissolve{\def\hvtex@trans@code{D}}
208 \def\hvtex@trans@effect@Glitter{\def\hvtex@trans@code{G}}
209 \def\hvtex@trans@effect@Split{\def\hvtex@trans@code{S}}
210 \def\hvtex@trans@effect@Wipe{\def\hvtex@trans@code{W}}
211 \def\hvtex@trans@effect@R{\def\hvtex@trans@code{R}}
212 \def\hvtex@par@dimension{/Dm}
213 \def\hvtex@par@direction{/Di}
214 \def\hvtex@par@duration{/D}
215 \def\hvtex@par@motion{/M}
216 \def\hvtex@gettoken{\expandafter\hvtex@gettoken@\hvtex@buffer\@nil}
217 \def\hvtex@gettoken@#1 #2\@nil{%
218 \edef\hvtex@token{#1}%
219 \edef\hvtex@buffer{#2}%
221 \def\hvtex@parse@trans#1{%
222 \let\hvtex@trans@code\@empty
223 \let\hvtex@param@dimension\@empty
224 \let\hvtex@param@direction\@empty
225 \let\hvtex@param@duration\@empty
226 \let\hvtex@param@motion\@empty
227 \edef\hvtex@buffer{#1\space}%
229 \ifx\hvtex@token\@empty
230 \ifx\hvtex@buffer\@empty
235 \csname hvtex@trans@effect@\hvtex@token\endcsname
238 \def\hvtex@trans@params{%
239 \ifx\hvtex@buffer\@empty
242 \let\hvtex@trans@par\hvtex@token
243 \ifx\hvtex@buffer\@empty
246 \ifx\hvtex@trans@par\hvtex@par@duration
247 \let\hvtex@param@duration\hvtex@token
248 \else \ifx\hvtex@trans@par\hvtex@par@motion
249 \expandafter\edef\expandafter\hvtex@param@motion
250 \expandafter{\expandafter\@gobble\hvtex@token}%
251 \else \ifx\hvtex@trans@par\hvtex@par@dimension
252 \expandafter\edef\expandafter\hvtex@param@dimension
253 \expandafter{\expandafter\@gobble\hvtex@token}%
254 \else \ifx\hvtex@trans@par\hvtex@par@direction
255 \let\hvtex@param@direction\hvtex@token
259 \ifx\hvtex@buffer\@empty
260 \let\next\hvtex@produce@trans
262 \let\next\hvtex@trans@params
266 \def\hvtex@produce@trans{%
267 \let\vtex@trans@special\@empty
268 \if S\hvtex@trans@code
269 \edef\vtex@trans@special{\hvtex@trans@code
270 \hvtex@param@dimension\hvtex@param@motion}%
271 \else \if B\hvtex@trans@code
272 \edef\vtex@trans@special{\hvtex@trans@code\hvtex@param@dimension}%
273 \else \if X\hvtex@trans@code
274 \edef\vtex@trans@special{\hvtex@trans@code\hvtex@param@motion}%
275 \else \if W\hvtex@trans@code
276 \edef\vtex@trans@special{\hvtex@trans@code\hvtex@param@direction}%
277 \else \if D\hvtex@trans@code
278 \let\vtex@trans@special\hvtex@trans@code
279 \else \if R\hvtex@trans@code
280 \let\vtex@trans@special\hvtex@trans@code
281 \else \if G\hvtex@trans@code
282 \edef\vtex@trans@special{\hvtex@trans@code\hvtex@param@direction}%
283 \fi\fi\fi\fi\fi\fi\fi
284 \ifx\vtex@trans@special\@empty
286 \ifx\hvtex@param@duration\@empty
288 \setlength{\dimen@}{\hvtex@param@duration\p@}%
290 \edef\vtex@trans@special{\vtex@trans@special,\strip@pt\dimen@}%
292 \special{!trans \vtex@trans@special}%
295 \def\hyper@pageduration{%
296 \ifx\@pdfpageduration\relax
298 \ifx\@pdfpageduration\@empty
299 \special{!duration-}%
301 \special{!duration \@pdfpageduration}%
305 \def\hyper@pagehidden{%
307 \special{!hidden\ifHy@pdfpagehidden +\else -\fi}%
311 \def\@pdfproducer{VTeX}
312 \ifnum\Hy@VTeXversion>\z@
315 \edef\@pdfproducer{\@pdfproducer\space v\the\count@}
316 \multiply\count@ -100
317 \advance\count@\VTeXversion
320 .\ifnum\count@<10 0\fi\the\count@,\space
321 \ifnum\OpMode=\@ne PDF\else PS\fi
323 \ifx\gexmode\@undefined\else
324 \ifnum\gexmode>\z@\space with GeX\fi
329 \ifx\@pdfpagescrop\@empty
331 \special{!pdfinfo b=<\@pdfpagescrop>}%
333 \special{!onopen Page\@pdfstartpage}%
334 \special{!pdfinfo p=<\@pdfpagemode>}%
337 \special{!pdfinfo u=<<</Base (\@baseurl)>>>}%
339 \special{!pdfinfo v=<<<%
340 \ifHy@toolbar\else /HideToolbar true \fi
341 \ifHy@menubar\else /HideMenubar true \fi
342 \ifHy@windowui\else /HideWindowUI true \fi
343 \ifHy@fitwindow /FitWindow true \fi
344 \ifHy@centerwindow /CenterWindow true \fi
346 \ifx\pdf@pagelayout\@empty
348 \special{!pdfinfo l=</\pdf@pagelayout\space>}%
352 \special{!pdfinfo a=<\@pdfauthor>}%
353 \special{!pdfinfo t=<\@pdftitle>}%
354 \special{!pdfinfo s=<\@pdfsubject>}%
355 \special{!pdfinfo c=<\@pdfcreator>}%
356 \special{!pdfinfo r=<\@pdfproducer>}%
357 \special{!pdfinfo k=<\@pdfkeywords>}%
358 \Hy@DisableOption{pdfauthor}%
359 \Hy@DisableOption{pdftitle}%
360 \Hy@DisableOption{pdfsubject}%
361 \Hy@DisableOption{pdfcreator}%
362 \Hy@DisableOption{pdfproducer}%
363 \Hy@DisableOption{pdfkeywords}%
365 \newwrite\@outlinefile
366 \def\Hy@writebookmark#1#2#3#4#5{% section number, text, label, level, file
367 \ifx\WriteBookmarks\relax%
371 \@@writetorep{#1}{#2}{#3}{#4}{#5}%
374 \def\Hy@currentbookmarklevel{0}
375 \def\Hy@numberline#1{#1 }
376 \def\@@writetorep#1#2#3#4#5{%
379 \ifx\Hy@tempa\Hy@bookmarkstype
381 \ifx\Hy@levelcheck Y%
382 \@tempcnta\Hy@level\relax
383 \advance\@tempcnta by -1
384 \ifnum\Hy@currentbookmarklevel<\@tempcnta
385 \advance\@tempcnta by -\Hy@currentbookmarklevel\relax
386 \advance\@tempcnta by 1
388 Difference (\the\@tempcnta) between bookmark levels is %
389 greater \MessageBreak than one, level fixed%
391 \@tempcnta\Hy@currentbookmarklevel
392 \advance\@tempcnta by 1
393 \edef\Hy@level{\the\@tempcnta}%
396 \global\let\Hy@levelcheck Y%
398 \global\let\Hy@currentbookmarklevel\Hy@level
399 \@tempcnta\Hy@level\relax
400 \expandafter\xdef\csname Parent\Hy@level\endcsname{#3}%
401 \advance\@tempcnta by -1
403 \edef\Hy@tempb{\csname Parent\the\@tempcnta\endcsname}%
404 \ifx\Hy@tempa\Hy@tempb
406 The anchor of a bookmark and its parent's must not%
407 \MessageBreak be the same. Added a new anchor%
411 \ifHy@bookmarksnumbered
412 \let\numberline\Hy@numberline
414 \let\numberline\@gobble
416 \pdfstringdef\Hy@tempa{#2}%
417 \protected@write\@outlinefile{}{%
419 [\Hy@level][\@bookmarkopenstatus{\Hy@level}]{#3}%
420 {\Hy@tempa}{\Hy@tempb}%
425 \newcommand{\currentpdfbookmark}{%
426 \pdfbookmark[\Hy@currentbookmarklevel]%
428 \newcommand{\subpdfbookmark}{%
429 \@tempcnta\Hy@currentbookmarklevel
430 \Hy@StepCount\@tempcnta
431 \expandafter\pdfbookmark\expandafter[\the\@tempcnta]%
433 \newcommand{\belowpdfbookmark}[2]{%
434 \@tempcnta\Hy@currentbookmarklevel
435 \Hy@StepCount\@tempcnta
436 \expandafter\pdfbookmark\expandafter[\the\@tempcnta]{#1}{#2}%
437 \advance\@tempcnta by -1
438 \xdef\Hy@currentbookmarklevel{\the\@tempcnta}%
440 \renewcommand\pdfbookmark[3][0]{%
441 \Hy@writebookmark{}{#2}{#3.#1}{#1}{toc}%
442 \hyper@anchorstart{#3.#1}\hyper@anchorend
444 \def\BOOKMARK{\@ifnextchar[{\@BOOKMARK}{\@@BOOKMARK[1][-]}}
445 \def\@BOOKMARK[#1]{\@ifnextchar[{\@@BOOKMARK[#1]}{\@@BOOKMARK[#1][-]}}
446 \newcount\@serial@counter\@serial@counter=1\relax
449 \ifnum\Hy@VTeXversion<650 %
451 \gdef\hv@pdf@char#1#2#3{%
454 "00\or"01\or"02\or"03\or"04\or"05\or"06\or"07%
455 \or"08\or"09\or"0A\or"0B\or"0C\or"0D\or"0E\or"0F%
456 \or"10\or"11\or"12\or"13\or"14\or"15\or"16\or"17%
457 \or"18\or"19\or"1A\or"1B\or"1C\or"1D\or"1E\or"1F%
458 \or"20\or"21\or"22\or"23\or"24\or"25\or"26\or"27%
459 \or"28\or"29\or"2A\or"2B\or"2C\or"2D\or"2E\or"2F%
460 \or"30\or"31\or"32\or"33\or"34\or"35\or"36\or"37%
461 \or"38\or"39\or"3A\or"3B\or"3C\or"3D\or"3E\or"3F%
462 \or"40\or"41\or"42\or"43\or"44\or"45\or"46\or"47%
463 \or"48\or"49\or"4A\or"4B\or"4C\or"4D\or"4E\or"4F%
464 \or"50\or"51\or"52\or"53\or"54\or"55\or"56\or"57%
465 \or"58\or"59\or"5A\or"5B\or"5C\or"5D\or"5E\or"5F%
466 \or"60\or"61\or"62\or"63\or"64\or"65\or"66\or"67%
467 \or"68\or"69\or"6A\or"6B\or"6C\or"6D\or"6E\or"6F%
468 \or"70\or"71\or"72\or"73\or"74\or"75\or"76\or"77%
469 \or"78\or"79\or"7A\or"7B\or"7C\or"7D\or"7E\or"7F%
470 \or"80\or"81\or"82\or"83\or"84\or"85\or"86\or"87%
471 \or"88\or"89\or"8A\or"8B\or"8C\or"8D\or"8E\or"8F%
472 \or"90\or"91\or"92\or"93\or"94\or"95\or"96\or"97%
473 \or"98\or"99\or"9A\or"9B\or"9C\or"9D\or"9E\or"9F%
474 \or"A0\or"A1\or"A2\or"A3\or"A4\or"A5\or"A6\or"A7%
475 \or"A8\or"A9\or"AA\or"AB\or"AC\or"AD\or"AE\or"AF%
476 \or"B0\or"B1\or"B2\or"B3\or"B4\or"B5\or"B6\or"B7%
477 \or"B8\or"B9\or"BA\or"BB\or"BC\or"BD\or"BE\or"BF%
478 \or"C0\or"C1\or"C2\or"C3\or"C4\or"C5\or"C6\or"C7%
479 \or"C8\or"C9\or"CA\or"CB\or"CC\or"CD\or"CE\or"CF%
480 \or"D0\or"D1\or"D2\or"D3\or"D4\or"D5\or"D6\or"D7%
481 \or"D8\or"D9\or"DA\or"DB\or"DC\or"DD\or"DE\or"DF%
482 \or"E0\or"E1\or"E2\or"E3\or"E4\or"E5\or"E6\or"E7%
483 \or"E8\or"E9\or"EA\or"EB\or"EC\or"ED\or"EE\or"EF%
484 \or"F0\or"F1\or"F2\or"F3\or"F4\or"F5\or"F6\or"F7%
485 \or"F8\or"F9\or"FA\or"FB\or"FC\or"FD\or"FE\or"FF%
489 \gdef\hv@pdf@char{\char'}
492 \def\@@BOOKMARK[#1][#2]#3#4#5{%
493 \expandafter\edef\csname @count@#3\endcsname{\the\@serial@counter}%
494 \edef\@mycount{\the\@serial@counter}%
495 \Hy@StepCount\@serial@counter
497 \expandafter\ifx\csname @count@#5\endcsname\relax
500 \csname @count@#5\endcsname
503 \immediate\special{!outline #3;p=\@parcount,i=\@mycount,s=\ifx#2-c\else
508 \def\0{\hv@pdf@char 0}%
509 \def\1{\hv@pdf@char 1}%
510 \def\2{\hv@pdf@char 2}%
511 \def\3{\hv@pdf@char 3}%
514 \InputIfFileExists{\jobname.out}{}{}%
516 \ifx\WriteBookmarks\relax
519 \immediate\openout\@outlinefile=\jobname.out
521 \immediate\write\@outlinefile{<relaxxml>\relax}%
531 \global\let\@begindvi\HyPL@EveryPage
533 \expandafter\endinput
535 \let\H@old@ssect\@ssect
536 \def\@ssect#1#2#3#4#5{%
537 \H@old@ssect{#1}{#2}{#3}{#4}{#5}%
540 \let\H@old@schapter\@schapter
544 \let\@mkboth\@gobbletwo
545 \Hy@GlobalStepCount\Hy@linkcounter
546 \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
547 \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
550 \@ifundefined{@chapter}{}{%
551 \let\Hy@org@chapter\@chapter
554 \Hy@GlobalStepCount\Hy@linkcounter
555 \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
556 \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
558 \ifnum\c@secnumdepth>\m@ne
559 \@ifundefined{if@mainmatter}%
560 \iftrue{\csname if@mainmatter\endcsname}
568 \let\H@old@spart\@spart
571 \Hy@GlobalStepCount\Hy@linkcounter
572 \xdef\@currentHref{part*.\the\Hy@linkcounter}%
573 \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
575 \let\H@old@sect\@sect
576 \def\@sect#1#2#3#4#5#6[#7]#8{%
577 \ifnum #2>\c@secnumdepth
578 \Hy@GlobalStepCount\Hy@linkcounter
579 \xdef\@currentHref{section*.\the\Hy@linkcounter}%
581 \H@old@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}%
582 \ifnum #2>\c@secnumdepth
583 \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
586 \expandafter\def\csname Parent-4\endcsname{}
587 \expandafter\def\csname Parent-3\endcsname{}
588 \expandafter\def\csname Parent-2\endcsname{}
589 \expandafter\def\csname Parent-1\endcsname{}
590 \expandafter\def\csname Parent0\endcsname{}
591 \expandafter\def\csname Parent1\endcsname{}
592 \expandafter\def\csname Parent2\endcsname{}
593 \expandafter\def\csname Parent3\endcsname{}
594 \expandafter\def\csname Parent4\endcsname{}
596 \def\@addchap[##1]##2{%
603 \addtocontents{lof}{\protect\addvspace{10\p@}}%
604 \addtocontents{lot}{\protect\addvspace{10\p@}}%
605 \Hy@GlobalStepCount\Hy@linkcounter
606 \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
607 \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
609 \@topnewpage[\@makeschapterhead{##2}]%
611 \@makeschapterhead{##2}%
614 \addcontentsline{toc}{chapter}{##1}%
617 \@ifclassloaded{scrbook}{%
618 \@ifclasslater{scrbook}{2001/01/01}{%
622 \@ifclassloaded{scrreprt}{%
623 \@ifclasslater{scrreprt}{2001/01/01}{%
633 %% End of file `hvtex.def'.