summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/tex4ht/hyperref.4ht
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/tex4ht/hyperref.4ht')
-rw-r--r--Master/texmf-dist/tex/generic/tex4ht/hyperref.4ht173
1 files changed, 103 insertions, 70 deletions
diff --git a/Master/texmf-dist/tex/generic/tex4ht/hyperref.4ht b/Master/texmf-dist/tex/generic/tex4ht/hyperref.4ht
index f198ac7a468..8b6fbf0ac5d 100644
--- a/Master/texmf-dist/tex/generic/tex4ht/hyperref.4ht
+++ b/Master/texmf-dist/tex/generic/tex4ht/hyperref.4ht
@@ -1,15 +1,15 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% hyperref.4ht 2007-01-03-21:02 %
-% Copyright (C) 1999--2007 Eitan M. Gurari %
+% hyperref.4ht 2008-02-28-20:51 %
+% Copyright (C) 1999--2008 Eitan M. Gurari %
% %
% This work may be distributed and/or modified under the %
% conditions of the LaTeX Project Public License, either %
-% version 1.3 of this license or (at your option) any %
+% version 1.3c of this license or (at your option) any %
% later version. The latest version of this license is %
% in %
% http://www.latex-project.org/lppl.txt %
-% and version 1.3 or later is part of all distributions %
-% of LaTeX version 2003/12/01 or later. %
+% and version 1.3c or later is part of all distributions %
+% of LaTeX version 2005/12/01 or later. %
% %
% This work has the LPPL maintenance status "maintained".%
% %
@@ -24,9 +24,17 @@
% gurari@cse.ohio-state.edu %
% http://www.cse.ohio-state.edu/~gurari %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\immediate\write-1{version 2007-01-03-21:02}
+\immediate\write-1{version 2008-02-28-20:51}
\csname end:hyperref\endcsname
+\@ifpackageloaded{nameref}{}
+{
+ \let\sv:label\label
+ \RequirePackage{nameref}%
+ \let\label\sv:label
+ \input nameref.4ht
+}
+
\expandafter\ifx \csname ifHy@texht\endcsname\relax
\expand:after{\expandafter
\let \csname ifHy@texht\endcsname}\csname ifhy@texht\endcsname
@@ -47,8 +55,14 @@
\AtBeginDocument{%
\edef\autoref{\noexpand\protect\expandafter\noexpand
\csname autoref \endcsname}}
-\long\expandafter\def\csname autoref \endcsname#1{\expandafter
- \auto@setref \csname r@#1\endcsname \@firstoffive {#1}}
+\expandafter\def\csname autoref \endcsname{%
+ \@ifstar {\HyRef@autoref \@gobbletwo }{\HyRef@autoref \hyper@@link}}
+\def\HyRef@autoref#1#2{%
+ \begingroup
+ \Hy@safe@activestrue
+ \expandafter\auto@setref \csname r@#2\endcsname \@firstoffive {#2}%
+ \endgroup
+}
\def\auto@setref#1#2#3{\@safe@activestrue
\let\:autoref\::autoref
\T@ref{#3}\@safe@activesfalse}
@@ -56,6 +70,45 @@
\def\@refstar{\let\:autoref\:gobble
\T@ref}
\fi
+\def\:temp{\protect \T@ref}
+\ifx \::ref\:temp
+ \edef\::ref{\noexpand\protect \expandafter\noexpand \csname ::ref \endcsname}
+ \expandafter\def\csname ::ref \endcsname{\@ifstar \@refstar \T@ref}
+\fi
+\def\:temp#1{\@safe@activestrue\org@:ref{#1}\@safe@activesfalse}
+\expandafter\ifx \csname :ref \endcsname\:temp
+ \expandafter\def\csname :ref \endcsname{\@ifnextchar*{\:refstar}{\r:ref}}
+ \def\r:ref#1{\@safe@activestrue\org@:ref{#1}\@safe@activesfalse}
+ \def\:refstar#1{\r:ref}
+\fi
+
+\expandafter\ifx \csname real@setref\endcsname\relax
+ \def\@pagerefstar#1{%
+ \HyRef@StarSetRef{#1}\@secondoffive
+ }
+ \def\HyRef@StarSetRef#1{%
+ \begingroup
+ \Hy@safe@activestrue
+ \edef\x{#1}%
+ \@onelevel@sanitize\x
+ \edef\x{\endgroup
+ \noexpand\HyRef@@StarSetRef
+ \expandafter\noexpand\csname r@\x\endcsname{\x}%
+ }%
+ \x
+ }
+
+ \def\HyRef@@StarSetRef#1#2#3{%
+ \ifx#1\@undefined
+ \let#1\relax
+ \fi
+ \real@setref#1#3{#2}%
+ }
+\fi
+\expandafter\ifx \csname real@setref\endcsname\relax
+ \let\real@setref\@setref
+\fi
+
\let\:autoref\:gobble
@@ -112,7 +165,6 @@
\ifx \Hy@RestoreLastskip\:UnDef
\let\Hy@RestoreLastskip\relax
\fi
-\def\prf:label{{}{}{}}%
\def\hyperlink#1#2{\Link{#1}{}#2\EndLink}
\def\hypertarget#1#2{\Link{}{#1}#2\EndLink}
\ifx \hyperpage\:UnDef \let\hyperpage=\empty \fi
@@ -169,6 +221,34 @@
\expandafter\:tempa
\fi}
+\def\hyper@makecurrent#1{%
+ \begingroup
+ \edef\Hy@param{#1}%
+ \ifx\Hy@param\Hy@chapterstring
+ \let\Hy@param\Hy@chapapp
+ \fi
+ \ifHy@hypertexnames
+ \let\@number\@firstofone
+ \@ifundefined{latin@Alph}{}{%
+ \ifx\@Alph\greek@Alph
+ \def\@Alph{Alph\@arabic}%
+ \fi
+ }%
+ \ifHy@naturalnames
+ \let\textlatin\@firstofone
+ \xdef\@currentHlabel{\csname the#1\endcsname}%
+ \else
+ \xdef\@currentHlabel{\csname theH#1\endcsname}%
+ \fi
+ \xdef\@currentHref{%
+ \Hy@param.\expandafter\strip@prefix\meaning\@currentHlabel
+ }%
+ \else
+ \Hy@GlobalStepCount\Hy@linkcounter
+ \xdef\@currentHref{\Hy@param.\the\Hy@linkcounter}%
+ \fi
+ \endgroup
+}
\def\hyper@natlinkend{%
\hyper@linkend
}
@@ -200,12 +280,20 @@
\csname Hy@captionsenglish\endcsname
\let\def=\:temp
\fi
-\def\::autoref#1{%
- \expandafter\ifx \csname #1autorefname\endcsname \relax
- \expandafter \ifx \csname #1name\endcsname \relax
- \else \csname #1name\endcsname~\fi
- \else \csname #1autorefname\endcsname~\fi}
+\def\::autoref#1{{%
+ \bgroup
+ \a:@newlabel
+ \expandafter\global \expandafter\let
+ \expandafter\:temp \csname #1autorefname\endcsname
+ \expandafter\global \expandafter\let
+ \expandafter\:tempa \csname #1name\endcsname
+ \egroup
+ \ifx \:temp\relax
+ \ifx \:tempa \relax #1%
+ \else \:tempa \fi
+ \else \:temp \fi ~}}
\let\:autoref\:gobble
+\append:def\protect:wrtoc{\def\ref{\protect\o:ref}}
\ifx \H@equation\:UnDef \else
\let\o:equation:\H@equation
@@ -226,63 +314,8 @@
\let\o:endsubeqnarray:\H@endsubeqnarray
\fi
-\@ifpackageloaded{subfigure}{%
- \@ifundefined{sub@label}{}{%
- \RequirePackage{nameref}%
-}}{}
-\Configure{newlabel}
- {\cur:th \:currentlabel}
- {\string\csname\space
- :autoref\string\endcsname {\@currentlabelname}#1}
-\ifx \@currentlabelname\:UnDef
- \let\@currentlabelname\empty
-\fi
-\append:defI\refstepcounter{\def\@currentlabelname{#1}}
-\pend:def\eqnarray{\def\@currentlabelname{equation}}
-\pend:def\equation{\def\@currentlabelname{equation}}
-\ifx \figure\:UnDef \else
- \pend:def\figure{\def\@currentlabelname{figure}}
- \expandafter\pend:def\csname
- figure*\endcsname{\def\@currentlabelname{figure}}
-\fi
-\pend:defII\:thm{\def\@currentlabelname{##1}}
-\ifx \part\:UnDef \else
- \def\:temp#1->#2//{#1}
- \def\:tempc#1{}
- \edef\:tempc{\expandafter\:temp\meaning\:tempc//}
- \edef\:temp{\expandafter\:temp\meaning\part//}
- \ifx \:temp\:tempc
- \pend:defI\part{\def\@currentlabelname{part}}
-\fi\fi
-\ifx \chapter\:UnDef \else
- \let\NR:chapter\@chapter
- \def\@chapter[#1]#2{%
- \gHAdvance\:mpNum by 1
-\HAssign\minipageNum=\:mpNum \relax
-%
- \def\@currentlabelname{\ch:autorefname}%
- \NR:chapter[{#1}]{#2}%
- }
- \let\NR:schapter\@schapter
- \def\@schapter#1{%
- \gdef\@currentlabelname{}%
- \NR:schapter{#1}%
- }
- \def\ch:autorefname{chapter}
- \let\hy:appendix\appendix
- \def\appendix{\def\ch:autorefname{appendix}\hy:appendix}
-\fi
-\let\NR:sect\no@sect
-\def\no@sect#1#2#3#4#5#6[#7]#8{%
- \xdef\@currentlabelname{\ifnum #2>\c@secnumdepth\else #1\fi}%
- \NR:sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}%
-}
-\let\NR:ssect\no@ssect
-\def\no@ssect#1#2#3#4#5{%
- \gdef\@currentlabelname{}%
- \NR:ssect{#1}{#2}{#3}{#4}{#5}%
-}
+\csname ReadBookmarks\endcsname
\ifx \Hy@linkfileprefix\empty\else
\:warning{\noexpand\href of hyperref.sty introduces the prefix
`\Hy@linkfileprefix' to prefix-free references.