summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/hyperref/hyperref.dtx')
-rw-r--r--Master/texmf-dist/source/latex/hyperref/hyperref.dtx139
1 files changed, 107 insertions, 32 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
index 9751739892b..4a969eee631 100644
--- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
@@ -37,7 +37,7 @@
%<pd1enc>\ProvidesFile{pd1enc.def}
%<puenc>\ProvidesFile{puenc.def}
%<puvnenc>\ProvidesFile{puvnenc.def}
-%<!none> [2006/09/06 v6.75e
+%<!none> [2006/11/15 v6.75g
%<package> Hypertext links for LaTeX]
%<nohyperref> Dummy hyperref (SR)]
%<driver> Hyperref documentation driver file]
@@ -113,7 +113,7 @@
\end{document}
%</driver>
% \fi
-% \CheckSum{19035}
+% \CheckSum{19119}
%
% \MakeShortVerb{|}
% \StopEventually{}
@@ -680,6 +680,19 @@
% \end{macro}
% \end{macro}
%
+% \subsection{Babel's protection of shorthand characters}
+%
+% \begin{macro}{\Hy@safe@activestrue}
+% \begin{macro}{\Hy@safe@activesfalse}
+% Babel's switch setting commands cannot used directly,
+% because they can be undefined if babel is not loaded.
+% \begin{macrocode}
+\def\Hy@safe@activestrue{\csname safe@activestrue\endcsname}
+\def\Hy@safe@activesfalse{\csname safe@activesfalse\endcsname}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Coordinate transformations}
%
% At some places numbers in pdf units are
@@ -3050,6 +3063,14 @@
%
% \section{Support of other packages}
%
+% \subsection{Class memoir}
+%
+% \begin{macrocode}
+\@ifclassloaded{memoir}{%
+ \AtEndOfPackage{\RequirePackage{memhfixc}}%
+}{}
+% \end{macrocode}
+%
% \subsection{Package subfigure}
% Added fix for version 2.1. Here \cmd{\sub@label} is defined.
% \begin{macrocode}
@@ -3987,7 +4008,7 @@
}
\def\Hy@bordercolor#1#2#3{%
\begingroup
- \csname @safe@activestrue\endcsname
+ \Hy@safe@activestrue
\@ifundefined{XC@edef}{\edef}{\XC@edef}\x{#2}%
\expandafter\Hy@CheckColorSpec\x#3#3\@nil{#1}{#2}%
}
@@ -4038,7 +4059,15 @@
\ifx\Hy@tempa\@empty
\let\@pdfnonfullscreenpagemode\@empty
\else
- \def\@pdfnonfullscreenpagemode{/#1 }%
+ \def\@pdfnonfullscreenpagemode{/#1}%
+ \fi
+}
+\define@key{Hyp}{pdfprintscaling}{%
+ \def\Hy@tempa{#1}%
+ \ifx\Hy@tempa\@empty
+ \let\@pdfprintscaling\@empty
+ \else
+ \def\@pdfprintscaling{/#1}%
\fi
}
\define@key{Hyp}{pdfusetitle}[true]{%
@@ -4114,6 +4143,7 @@
\def\@pdfhighlight{/I}
\def\@pdfpagemode{}
\def\@pdfnonfullscreenpagemode{}
+\def\@pdfprintscaling{}
\def\@pdftitle{}
\def\@pdfauthor{}
\let\@pdfproducer\relax
@@ -4485,14 +4515,14 @@
\providecommand*\@safe@activestrue{}%
\providecommand*\@safe@activesfalse{}%
\def\T@ref#1{%
- \@safe@activestrue
+ \Hy@safe@activestrue
\expandafter\@setref\csname r@#1\endcsname\@firstoffive{#1}%
- \@safe@activesfalse
+ \Hy@safe@activesfalse
}%
\def\T@pageref#1{%
- \@safe@activestrue
+ \Hy@safe@activestrue
\expandafter\@setref\csname r@#1\endcsname\@secondoffive{#1}%
- \@safe@activesfalse
+ \Hy@safe@activesfalse
}%
\else
\ifHy@typexml\else\RequirePackage{nameref}\fi
@@ -4560,7 +4590,7 @@
\let\textasciitilde\hyper@tilde
\let\\\@backslashchar
\edef${\string$}
- \ifx\@safe@activestrue\@undefined\else\@safe@activestrue\fi
+ \Hy@safe@activestrue
\hyper@n@rmalise
}
\catcode`\#=6
@@ -4644,7 +4674,7 @@
}
\def\Hy@babelnormalise#1[#2]{%
\begingroup
- \csname @safe@activestrue\endcsname
+ \Hy@safe@activestrue
\edef\Hy@tempa{%
\endgroup
\noexpand#1[{#2}]%
@@ -4718,7 +4748,7 @@
\def\hyper@link@[#1]#2#3#4{%
\begingroup
\protected@edef\Hy@tempa{#2}%
- \csname @safe@activestrue\endcsname
+ \Hy@safe@activestrue
\edef\x{#3}%
\ifx\Hy@tempa\@empty
\toks0{\hyper@link{#1}}%
@@ -5272,6 +5302,7 @@
\Hy@DisableOption{pdfpagescrop}%
\Hy@DisableOption{pdfpagemode}%
\Hy@DisableOption{pdfnonfullscreenpagemode}%
+ \Hy@DisableOption{pdfprintscaling}%
\Hy@DisableOption{pdfstartview}%
\Hy@DisableOption{pdfstartpage}%
\Hy@DisableOption{pdftoolbar}%
@@ -7891,49 +7922,65 @@
% and |\autoref| prefixes with a tag based on the type.
% \begin{macrocode}
\def\@refstar#1{%
- \@safe@activestrue
+ \Hy@safe@activestrue
\expandafter\real@setref\csname r@#1\endcsname\@firstoffive{#1}%
- \@safe@activesfalse
+ \Hy@safe@activesfalse
}
\def\@pagerefstar#1{%
- \@safe@activestrue
+ \Hy@safe@activestrue
\expandafter\real@setref\csname r@#1\endcsname\@secondoffive{#1}%
- \@safe@activesfalse
+ \Hy@safe@activesfalse
+}
+\DeclareRobustCommand\autoref{%
+ \@ifstar{\HyRef@autoref\@gobbletwo}{\HyRef@autoref\hyper@@link}%
}
-\DeclareRobustCommand\autoref[1]{%
- \@safe@activestrue
- \expandafter\auto@setref\csname r@#1\endcsname\@firstoffive{#1}%
- \@safe@activesfalse
+\def\HyRef@autoref#1#2{%
+ \begingroup
+ \Hy@safe@activestrue
+ \expandafter\HyRef@autosetref\csname r@#2\endcsname{#2}{#1}%
+ \endgroup
}
-\def\auto@setref#1#2#3{% csname, extract group, refname
+\def\HyRef@autosetref#1#2#3{% link command, csname, refname
\ifcase 0\ifx#1\relax 1\fi\ifx#1\Hy@varioref@undefined 1\fi\relax
- \edef\@thisref{\expandafter\@fourthoffive#1\@empty\@empty}%
- \expandafter\test@reftype\@thisref\\%
- \hyper@@link
- {\expandafter\@fifthoffive#1}%
- {\expandafter\@fourthoffive#1\@empty\@empty}%
- {\@currentHtag\expandafter#2#1\@empty\@empty\null}%
+ \edef\HyRef@thisref{\expandafter\@fourthoffive#1\@empty\@empty\@empty}%
+ \expandafter\HyRef@testreftype\HyRef@thisref\\%
+ \Hy@safe@activesfalse
+ #3{%
+ \expandafter\@fifthoffive#1%
+ }{%
+ \expandafter\@fourthoffive#1\@empty\@empty\@empty
+ }{%
+ \HyRef@currentHtag
+ \expandafter\@firstoffive#1\@empty\@empty\@empty
+ \null
+ }%
\else
\protect\G@refundefinedtrue
\nfss@text{\reset@font\bfseries ??}%
\@latex@warning{%
- Reference `#3' on page \thepage \space undefined%
+ Reference `#2' on page \thepage\space undefined%
}%
\fi
}
-\def\test@reftype#1.#2\\{%
+\def\HyRef@testreftype#1.#2\\{%
\@ifundefined{#1autorefname}{%
\@ifundefined{#1name}{%
- \def\@currentHtag{}%
+ \def\HyRef@currentHtag{}%
\@latex@warning{no tag name for #1 at \the\inputlineno}%
}{%
- \def\@currentHtag{\csname#1name\endcsname~}%
+ \edef\HyRef@currentHtag{%
+ \expandafter\noexpand\csname#1name\endcsname
+ \noexpand~%
+ }%
}%
}{%
- \def\@currentHtag{\csname#1autorefname\endcsname~}%
+ \edef\HyRef@currentHtag{%
+ \expandafter\noexpand\csname#1autorefname\endcsname
+ \noexpand~%
+ }%
}%
}
-\def\@currentHtag{}
+\def\HyRef@currentHtag{}
% \end{macrocode}
%
% Defaults for the names that \cmd{\autoref} uses.
@@ -8299,6 +8346,10 @@
\else
/NonFullScreenPageMode\@pdfnonfullscreenpagemode
\fi
+ \ifx\@pdfprintscaling\@empty
+ \else
+ /PrintScaling\@pdfprintscaling
+ \fi
}%
\pdfcatalog{%
\ifx\Hy@temp\@empty
@@ -8893,6 +8944,10 @@
\else
/NonFullScreenPageMode\@pdfnonfullscreenpagemode
\fi
+ \ifx\@pdfprintscaling\@empty
+ \else
+ /PrintScaling\@pdfprintscaling
+ \fi
}%
\pdfmark{pdfmark=/PUT,
Raw={%
@@ -9094,6 +9149,10 @@
\else
/NonFullScreenPageMode\@pdfnonfullscreenpagemode
\fi
+ \ifx\@pdfprintscaling\@empty
+ \else
+ /PrintScaling\@pdfprintscaling
+ \fi
}%
\Hy@pstringdef\Hy@pstringB{\@baseurl}%
\@pdfm@mark{%
@@ -9707,6 +9766,10 @@
\else
/NonFullScreenPageMode\@pdfnonfullscreenpagemode
\fi
+ \ifx\@pdfprintscaling\@empty
+ \else
+ /PrintScaling\@pdfprintscaling
+ \fi
>>>}%
\ifx\pdf@pagelayout\@empty
\else
@@ -10067,6 +10130,10 @@
\else
/NonFullScreenPageMode\@pdfnonfullscreenpagemode
\fi
+ \ifx\@pdfprintscaling\@empty
+ \else
+ /PrintScaling\@pdfprintscaling
+ \fi
}%
\Hy@pstringdef\Hy@pstringB{\@baseurl}%
\pdfmark{%
@@ -11067,6 +11134,10 @@
\else
/NonFullScreenPageMode\@pdfnonfullscreenpagemode
\fi
+ \ifx\@pdfprintscaling\@empty
+ \else
+ /PrintScaling\@pdfprintscaling
+ \fi
}%
\Hy@pstringdef\Hy@pstringB{\@baseurl}%
\pdfmark{%
@@ -12725,8 +12796,12 @@
\fi
\ifHy@bookmarksnumbered
\let\numberline\Hy@numberline
+ \let\partnumberline\Hy@numberline
+ \let\chapternumberline\Hy@numberline
\else
\let\numberline\@gobble
+ \let\partnumberline\@gobble
+ \let\chapternumberline\@gobble
\fi
\pdfstringdef\Hy@tempa{#2}%
\if@filesw