%%
%% This is file `hypertex.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hyperref.dtx  (with options: `hypertex')
%% 
%% File: hyperref.dtx Copyright (C) 1995-1999 Sebastian Rahtz
%%
%% This package may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
%%
\def\PDF@FinishDoc{}
\def\PDF@SetupDoc{%
 \ifx\@baseurl\@empty\else
  \special{html:<base href="\@baseurl">}%
 \fi
}
\def\hyper@anchor#1{%
   {\let\protect=\string\special{html:<A name=\hyper@quote #1\hyper@quote>}}%
   \hy@activeanchortrue
   \hy@colorlink{\@anchorcolor}\anchor@spot\hy@endcolorlink
   \special{html:</A>}%
   \hy@activeanchorfalse
}
\def\hyper@anchorstart#1{%
 {\hyper@chars\special{html:<A name=\hyper@quote#1\hyper@quote>}}%
  \hy@activeanchortrue
}
\def\hyper@anchorend{%
  \special{html:</A>}%
  \hy@activeanchorfalse
}
\def\@urltype{url}
\def\hyper@linkstart#1#2{%
  \hy@colorlink{\csname @#1color\endcsname}%
  \def\@tempa{#1}\ifx\@tempa\@urltype
    \special{html:<A href=\hyper@quote#2\hyper@quote>}%
  \else
   {\hyper@chars\special{html:<A href=\hyper@quote\##2\hyper@quote>}}%
  \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{%
 \ifhy@raiselinks
  \setbox\@tempboxa=\hbox{#1}%
  \@linkdim\dp\@tempboxa
  \leavevmode\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
  {\hyper@chars
   \special{html:<A href=\hyper@quote#2\hyper@quote>}%
   \hy@colorlink{\@urlcolor}#1\special{html:</A>}%
   \hy@endcolorlink}%
 \fi
}
\def\hyper@link#1#2#3{%
  \hyper@linkurl{#3}{\##2}%
}
\def\hyper@image#1#2{%
  {\hyper@chars
   \special{html:<img src=\hyper@quote#1\hyper@quote>}}}
\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}}
%%
%% End of file `hypertex.def'.

\let\H@old@sect\@sect
\def\@sect#1#2#3#4#5#6[#7]#8{%
 \H@old@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}%
 \ifx\\#1\\\else
  \ifnum#2>\c@secnumdepth\else
    \ifhy@naturalnames
      {\let\textlatin\@firstofone
      \xdef\@thishlabel{\csname the#1\endcsname}}%
    \else
     \edef\@thishlabel{\csname theH#1\endcsname}%
    \fi
\@writetorep{\csname the#1\endcsname}{#7}{#1.\@thishlabel}{#2}\fi
 \fi
}
\let\H@old@part\@part
\def\@part[#1]#2{%
 \H@old@part[{#1}]{#2}%
 \ifhy@naturalnames
   {\let\textlatin\@firstofone
    \@writetorep{\thepart}{#1}{part.\thepart}{-1}}%
 \else
   \@writetorep{\thepart}{#1}{part.\theHpart}{-1}%
 \fi
}
\let\H@old@chapter\@chapter
\def\@chapter[#1]#2{%
 \H@old@chapter[{#1}]{#2}%
 \ifhy@naturalnames
  {\let\textlatin\@firstofone
   \@writetorep{\thechapter}{#1}{chapter.\thechapter}{0}}%
 \else
   \@writetorep{\thechapter}{#1}{chapter.\theHchapter}{0}%
 \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{}
\newwrite\@outlinefile
\def\@writetorep#1#2#3#4{\ifx\WriteBookmarks\relax{}%
    \else\@@writetorep{#1}{#2}{#3}{#4}\fi}
\def\Hy@currentbookmarklevel{0}
\def\@@writetorep#1#2#3#4{%
  \xdef\Hy@currentbookmarklevel{#4}%
  \@tempcnta#4
  \expandafter\xdef\csname Parent#4\endcsname{#3}%
  \advance\@tempcnta by -1
  \pdfstringdef\@tempa{%
    \ifhy@bookmarksnumbered\ifx\\#1\\\else#1 \fi\fi
    #2%
  }%
  \protected@write\@outlinefile{}{%
    \protect\BOOKMARK[#4]{#3}%
      {\@tempa}{\csname Parent\the\@tempcnta\endcsname}%
  }%
}
\newcommand{\currentpdfbookmark}{%
  \pdfbookmark[\Hy@currentbookmarklevel]%
}
\newcommand{\subpdfbookmark}{%
  \@tempcnta\Hy@currentbookmarklevel
  \advance\@tempcnta by 1
  \expandafter\pdfbookmark\expandafter[\the\@tempcnta]%
}
\renewcommand\pdfbookmark[3][0]{%
  \@writetorep{}{#2}{#3.#1}{#1}%
  \hyper@anchorstart{#3.#1}\hyper@anchorend
}

\def\BOOKMARK{\@ifnextchar[{\@BOOKMARK}{\@BOOKMARK[1]}}
\def\ReadBookmarks{%
  \begingroup
  \escapechar=`\\%
  \let\escapechar\@gobble %
  \def\@BOOKMARK [##1]##2##3##4{\calc@bm@number{##4}}%
  \InputIfFileExists{\jobname.out}{}{}%
  \ifx\WriteBookmarks\relax\global\let\WriteBookmarks\relax\fi
  \def\@BOOKMARK[##1]##2##3##4{%
   \def\@tempx{##3}%
%   \pdfoutline goto
% name{##2}%
%    count\@bookmarkopenstatus{##1}\check@bm@number{##2}{%
    \special{bookmark add ##1 ##2 ##4 \expandafter\strip@prefix\meaning\@tempx}%
   }%
   {%
    \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\fi
   \fi
   \endgroup
}
\def\check@bm@number#1{\expandafter \ifx\csname#1\endcsname \relax 0%
    \else \csname#1\endcsname \fi}
\def\calc@bm@number#1{\@tempcnta=\check@bm@number{#1}\relax
    \advance\@tempcnta by1
    \expandafter\xdef\csname#1\endcsname{\the\@tempcnta}}
\endinput
%%
%% End of file `hpdftex.def'.
