\def\hyper@anchor#1{%
  \Hy@SaveLastskip
  \begingroup
    \let\protect=\string
    \special{html:<a name=\hyper@quote #1\hyper@quote>}%
  \endgroup
  \Hy@activeanchortrue
  \Hy@colorlink{\@anchorcolor}\anchor@spot\Hy@endcolorlink
  \special{html:</a>}%
  \Hy@activeanchorfalse
  \Hy@RestoreLastskip
}
\def\hyper@anchorstart#1{%
  \Hy@SaveLastskip
  \begingroup
    \hyper@chars
    \special{html:<a name=\hyper@quote#1\hyper@quote>}%
  \endgroup
  \Hy@activeanchortrue
}
\def\hyper@anchorend{%
  \special{html:</a>}%
  \Hy@activeanchorfalse
  \Hy@RestoreLastskip
}
\def\@urltype{url}
\def\hyper@linkstart#1#2{%
  \Hy@colorlink{\csname @#1color\endcsname}%
  \def\Hy@tempa{#1}%
  \ifx\Hy@tempa\@urltype
    \special{html:<a href=\hyper@quote#2\hyper@quote>}%
  \else
    \begingroup
      \hyper@chars
      \special{html:<a href=\hyper@quote\##2\hyper@quote>}%
    \endgroup
  \fi
}
\def\hyper@linkend{%
  \special{html:</a>}%
  \Hy@endcolorlink
}
\def\hyper@linkfile#1#2#3{%
  \hyper@linkurl{#1}{file:#2\ifx\\#3\\\else\##3\fi}%
}
\def\hyper@linkurl#1#2{%
  \leavevmode
  \ifHy@raiselinks
    \setbox\@tempboxa=\hbox{#1}%
    \@linkdim\dp\@tempboxa
    \lower\@linkdim\hbox{%
      \hyper@chars
      \special{html:<a href=\hyper@quote#2\hyper@quote>}%
    }%
    \Hy@colorlink{\@urlcolor}#1%
    \@linkdim\ht\@tempboxa
    \advance\@linkdim by -6.5\p@
    \raise\@linkdim\hbox{\special{html:</a>}}%
    \Hy@endcolorlink
  \else
    \begingroup
      \hyper@chars
      \special{html:<a href=\hyper@quote#2\hyper@quote>}%
      \Hy@colorlink{\@urlcolor}#1%
      \special{html:</a>}%
      \Hy@endcolorlink
    \endgroup
  \fi
}
\def\hyper@link#1#2#3{%
  \hyper@linkurl{#3}{\##2}%
}
\def\hyper@image#1#2{%
  \begingroup
    \hyper@chars
    \special{html:<img src=\hyper@quote#1\hyper@quote>}%
  \endgroup
}
\def\@hyper@launch run:#1\\#2#3{%
  \begingroup
    \leavevmode
%     \pdfmark[{#2}]{%
%       pdfmark=/ANN,%
%       Subtype=/Link,%
%       AcroHighlight=\@pdfhighlight,%
%       Border=\@pdfborder,%
%       linktype=file,%
%       Color=\@filebordercolor,%
%       Action=<<
%         /S /Launch
%         \ifHy@newwindow /NewWindow true \fi
%         /F (#1)
%         \ifx\\#3\\\else /Win << /P (#3) /F (#1) >> \fi
%       >>%
%     }%
  \endgroup
}
\def\@Form[#1]{\typeout{Sorry, HyperTeX does not support FORMs}}
\def\@endForm{}
\def\@Gauge[#1]#2#3#4{% parameters, label, minimum, maximum
  \typeout{Sorry, HyperTeX does not support FORM gauges}%
}
\def\@TextField[#1]#2{% parameters, label
  \typeout{Sorry, HyperTeX does not support FORM text fields}%
}
\def\@CheckBox[#1]#2{% parameters, label
  \typeout{Sorry, HyperTeX does not support FORM checkboxes}%
}
\def\@ChoiceMenu[#1]#2#3{% parameters, label, choices
  \typeout{Sorry, HyperTeX does not support FORM choice menus}%
}
\def\@PushButton[#1]#2{% parameters, label
  \typeout{Sorry, HyperTeX does not support FORM pushbuttons}%
}
\def\@Reset[#1]#2{\typeout{Sorry, HyperTeX does not support FORMs}}
\def\@Submit[#1]#2{\typeout{Sorry, HyperTeX does not support FORMs}}
% ------------------------------------------------------------------------
\newwrite\@outlinefile
\def\Hy@writebookmark#1#2#3#4#5{% section number, text, label,  level, file
 \ifx\WriteBookmarks\relax%
 \else
  \ifnum#4>\c@tocdepth
  \else
   \@@writetorep{#1}{#2}{#3}{#4}{#5}%
  \fi
 \fi}
\def\Hy@currentbookmarklevel{0}
\def\Hy@numberline#1{#1 }
\def\@@writetorep#1#2#3#4#5{%
  \begingroup
    \def\Hy@tempa{#5}%
    \ifx\Hy@tempa\Hy@bookmarkstype
      \let\numberline\@gobble
      \xdef\Hy@currentbookmarklevel{#4}%
      \@tempcnta#4\relax
      \expandafter\xdef\csname Parent#4\endcsname{#3}%
      \advance\@tempcnta by -1
      \ifHy@bookmarksnumbered
        \let\numberline\Hy@numberline
      \else
        \let\numberline\@gobble
      \fi
      \pdfstringdef\Hy@tempa{#2}%
      \protected@write\@outlinefile{}{%
        \protect\BOOKMARK[#4][\@bookmarkopenstatus{#4}]{#3}%
          {\Hy@tempa}{\csname Parent\the\@tempcnta\endcsname}%
      }%
    \fi
  \endgroup
}
\newcommand{\currentpdfbookmark}{%
  \pdfbookmark[\Hy@currentbookmarklevel]%
}
\newcommand{\subpdfbookmark}{%
  \@tempcnta\Hy@currentbookmarklevel
  \Hy@StepCount\@tempcnta
  \expandafter\pdfbookmark\expandafter[\the\@tempcnta]%
}
\newcommand{\belowpdfbookmark}[2]{%
  \@tempcnta\Hy@currentbookmarklevel
  \Hy@StepCount\@tempcnta
  \expandafter\pdfbookmark\expandafter[\the\@tempcnta]{#1}{#2}%
  \advance\@tempcnta by -1
  \xdef\Hy@currentbookmarklevel{\the\@tempcnta}%
}
\renewcommand\pdfbookmark[3][0]{%
  \Hy@writebookmark{}{#2}{#3.#1}{#1}{toc}%
  \hyper@anchorstart{#3.#1}\hyper@anchorend
}
\def\BOOKMARK{\@ifnextchar[{\@BOOKMARK}{\@@BOOKMARK[1][-]}}
\def\@BOOKMARK[#1]{\@ifnextchar[{\@@BOOKMARK[#1]}{\@@BOOKMARK[#1][-]}}
\def\ReadBookmarks{%
  \begingroup
    \escapechar=`\\%
    \let\escapechar\@gobble %
    \def\@@BOOKMARK [##1][##2]##3##4##5{\calc@bm@number{##5}}%
    \InputIfFileExists{\jobname.out}{}{}%
    \ifx\WriteBookmarks\relax
      \global\let\WriteBookmarks\relax
    \fi
    \def\@@BOOKMARK[##1][##2]##3##4##5{%
      \def\Hy@temp{##4}%
%      \pdfmark{%
%        pdfmark=/OUT,%
%        Count=##2\check@bm@number{##3},%
%        Dest=##3,%
%        Title=\expandafter\strip@prefix\meaning\Hy@temp
       \special{bookmark add ##1 ##3 \expandafter\strip@prefix\meaning\Hy@temp\space}%
      %}%
   }%
   {%
    \def\WriteBookmarks{0}%
    \special{bookmark begin}%
    \InputIfFileExists{\jobname.out}{}{}%
    \special{bookmark end}%
   }%
   %{\escapechar\m@ne\InputIfFileExists{\jobname.out}{}{}}%
   \ifx\WriteBookmarks\relax\else
     \if@filesw\immediate\openout\@outlinefile=\jobname.out
      \ifHy@typexml
       \immediate\write\@outlinefile{<relaxxml>\relax}%
      \fi
     \fi
   \fi
   \endgroup
}
\def\check@bm@number#1{%
  \expandafter\ifx\csname B_#1\endcsname\relax
    0%
  \else
    \csname B_#1\endcsname
  \fi
}
\def\calc@bm@number#1{%
  \@tempcnta=\check@bm@number{#1}\relax
  \advance\@tempcnta by1
  \expandafter\xdef\csname B_#1\endcsname{\the\@tempcnta}%
}
\ifHy@implicit
\else
  \def\@begindvi{%
    \unvbox\@begindvibox
    \HyPL@EveryPage
    \global\let\@begindvi\HyPL@EveryPage
  }%
  \expandafter\endinput
\fi
\let\H@old@ssect\@ssect
\def\@ssect#1#2#3#4#5{%
  \H@old@ssect{#1}{#2}{#3}{#4}{#5}%
  \phantomsection
}
\let\H@old@schapter\@schapter
\def\@schapter#1{%
  \H@old@schapter{#1}%
  \begingroup
    \let\@mkboth\@gobbletwo
    \Hy@GlobalStepCount\Hy@linkcounter
    \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
    \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
  \endgroup
}
\@ifundefined{@chapter}{}{%
  \let\Hy@org@chapter\@chapter
  \def\@chapter{%
    \def\Hy@next{%
      \Hy@GlobalStepCount\Hy@linkcounter
      \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
      \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
    }%
    \ifnum\c@secnumdepth>\m@ne
      \@ifundefined{if@mainmatter}%
      \iftrue{\csname if@mainmatter\endcsname}
        \let\Hy@next\relax
      \fi
    \fi
    \Hy@next
    \Hy@org@chapter
  }%
}
\let\H@old@spart\@spart
\def\@spart#1{%
  \H@old@spart{#1}%
  \Hy@GlobalStepCount\Hy@linkcounter
  \xdef\@currentHref{part*.\the\Hy@linkcounter}%
  \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
}
\let\H@old@sect\@sect
\def\@sect#1#2#3#4#5#6[#7]#8{%
  \ifnum #2>\c@secnumdepth
    \Hy@GlobalStepCount\Hy@linkcounter
    \xdef\@currentHref{section*.\the\Hy@linkcounter}%
  \fi
  \H@old@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}%
  \ifnum #2>\c@secnumdepth
    \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
  \fi
}
\expandafter\def\csname Parent-4\endcsname{}
\expandafter\def\csname Parent-3\endcsname{}
\expandafter\def\csname Parent-2\endcsname{}
\expandafter\def\csname Parent-1\endcsname{}
\expandafter\def\csname Parent0\endcsname{}
\expandafter\def\csname Parent1\endcsname{}
\expandafter\def\csname Parent2\endcsname{}
\expandafter\def\csname Parent3\endcsname{}
\expandafter\def\csname Parent4\endcsname{}
\@ifclassloaded{scrbook}{%
  \def\@addchap[#1]#2{%
    \typeout{#2}%
    \if@twoside\@mkboth{#1}{}\else\@mkboth{}{#1}\fi
    \addtocontents{lof}{\protect\addvspace{10\p@}}%
    \addtocontents{lot}{\protect\addvspace{10\p@}}%
    \Hy@GlobalStepCount\Hy@linkcounter
    \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
    \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
    \if@twocolumn
       \@topnewpage[\@makeschapterhead{#2}]%
    \else
       \@makeschapterhead{#2}%
       \@afterheading
    \fi
    \addcontentsline{toc}{chapter}{#1}%
  }%
}{}
\begingroup
  \catcode`P=12
  \catcode`T=12
  \lowercase{\endgroup
  \gdef\rem@ptetc#1.#2PT#3!{#1\ifnum#2>\z@.#2\fi}%
}
\def\strip@pt@and@otherjunk#1{\expandafter\rem@ptetc\the#1!}

\AtBeginDocument{%
%  \ifHy@colorlinks
%    \def\@pdfborder{0 0 0}%
%  \fi
  \ifx\special@paper\@empty\else
    \special{papersize=\special@paper}%
  \fi
}
\endinput
%%
%% End of file `hdvips.def'.
