From 6a0187151576ddf1c3bea2f68b5f87f4a21806fb Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 7 Mar 2007 18:08:02 +0000 Subject: hyperref update (1mar07) git-svn-id: svn://tug.org/texlive/trunk@4013 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/hyperref/doc/manual.tex | 12 ++- .../texmf-dist/source/latex/hyperref/hyperref.dtx | 117 ++++++++++++++------- 2 files changed, 91 insertions(+), 38 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/hyperref/doc/manual.tex b/Master/texmf-dist/source/latex/hyperref/doc/manual.tex index 5cd011a880f..6144a7dc3b2 100644 --- a/Master/texmf-dist/source/latex/hyperref/doc/manual.tex +++ b/Master/texmf-dist/source/latex/hyperref/doc/manual.tex @@ -11,7 +11,7 @@ % % Manual updates: % * Steve Peter and Karl Berry, 7/03. -% * Heiko Oberdiek, 2006. +% * Heiko Oberdiek, 2006, 2007. % \RequirePackage{ifpdf} @@ -431,6 +431,8 @@ CJKbookmarks & boolean & false & PDF files which actually violate the PDF specification because non-Unicode character codes are used -- some PDF readers localized for CJK languages (most notably Acroread itself) support this. + Also note that option `CJKbookmarks' cannot be used together + with option `unicode'. No mechanism is provided to translate non-Unicode bookmarks to Unicode; for portable PDF documents only Unicode encoding should @@ -743,6 +745,14 @@ given the name \emph{category.name} \noindent \emph{text} is made into a link to \emph{URL\#category.name} +\begin{cmdsyntax} +\ci{hyperref}\verb|[|\emph{label}\verb|]{|\emph{text}\verb|}| +\end{cmdsyntax} + +\noindent +\emph{text} is made into a link to the same place as +\verb|\ref{|\emph{label}\verb|}| would be linked. + \begin{cmdsyntax} \ci{hyperlink}\verb|{|\emph{name}\verb|}{|\emph{text}\verb|}| \end{cmdsyntax} diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx index 856cda98c23..5b2e8553914 100644 --- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx @@ -39,7 +39,7 @@ %\ProvidesFile{puenc.def} %\ProvidesFile{puvnenc.def} %\ProvidesFile{puarenc.def} -% [2007/02/07 v6.75r +% [2007/02/27 v6.75t % Hypertext links for LaTeX] % Dummy hyperref (SR)] % Hyperref documentation driver file] @@ -116,7 +116,7 @@ \end{document} % % \fi -% \CheckSum{19864} +% \CheckSum{19909} % % \MakeShortVerb{|} % \StopEventually{} @@ -1109,31 +1109,7 @@ % \begin{macrocode} \let\ref\HyPsd@ref \let\pageref\HyPsd@pageref -% \end{macrocode} -% -% Also we need an expandable form of \cs{autoref}. Babel's shorthands -% are not supported inside the reference label. -% \begin{macrocode} - \def\HyPsd@ar@get##1.##2\@nil{##1}% - \def\HyPsd@ar@tmp##1{% - \expandafter\expandafter\expandafter\HyPsd@ar@get - \expandafter\@fourthoffive##1\@empt\@empty.\@nil - }% - \def\auto@setref##1##2##3{% - \ifx##1\relax - \else - \csname\HyPsd@ar@tmp{##1}% - \expandafter\ifx\csname\HyPsd@ar@tmp{##1}autorefname\endcsname - \relax - \else - autoref% - \fi - name% - \endcsname - \space - \expandafter##2##1\@empty\@empty - \fi - }% + \let\autoref\HyPsd@autoref % \end{macrocode} % % \paragraph{Miscellaneous commands.} @@ -2186,6 +2162,65 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\HyPsd@autoref} +% Macro \cs{HyPsd@autoref} calls the macro \cs{HyPsd@@autoref} for star checking. +% The same methods like in \cs{HyPsd@hspace} is used. +% \begin{macrocode} +\def\HyPsd@autoref#1{\HyPsd@@autoref#1*\END} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HyPsd@@autoref} +% Macro \cs{HyPsd@@autoref} checks if a star is present. +% \begin{macrocode} +\def\HyPsd@@autoref#1*#2\END{% + \ifx\\#2\\% + \HyPsd@@@autoref{#1}% + \else + \expandafter\HyPsd@@@autoref + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HyPsd@@@autoref} +% \cs{HyPsd@@@autoref} does the work and extracts the second argument. +% \begin{macrocode} +\def\HyPsd@@@autoref#1{% + \expandafter\ifx\csname r@#1\endcsname\relax + ??% + \else + \expandafter\expandafter\expandafter\HyPsd@autorefname + \csname r@#1\endcsname{}{}{}{}\@nil + \expandafter\expandafter\expandafter\@car\csname r@#1\endcsname\@nil + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HyPsd@autorefname} +% At least a basic definition for getting the \cs{autoref} name. +% \begin{macrocode} +\def\HyPsd@autorefname#1#2#3#4#5\@nil{% + \ifx\\#4\\% + \else + \HyPsd@@autorefname#4.\@nil + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HyPsd@@autorefname} +% \begin{macrocode} +\def\HyPsd@@autorefname#1.#2\@nil{% + \@ifundefined{#1autorefname}{% + \@ifundefined{#1name}{% + }{% + \csname#1name\endcsname\space + }% + }{% + \csname#1autorefname\endcsname\space + }% +} +% \end{macrocode} +% \end{macro} +% % \subsubsection{Redefining the defining commands} % \label{defcmd} % Definitions aren't allowed, because they aren't executed in @@ -4956,9 +4991,14 @@ \else \toks0{\expandafter\hyper@readexternallink#2\\{#1}}% \fi - \toks1{{#4}}% + \toks2{#4}% + \edef\Hy@tempa{\the\toks2}% \edef\x{\endgroup - \the\toks0 {\x}\the\toks1 % + \ifx\Hy@tempa\@empty + \noexpand\Hy@Warning{Suppressing empty link}% + \else + \the\toks0 {\x}{\the\toks2}%% + \fi }% \x } @@ -6347,17 +6387,20 @@ \@hyper@itemfalse \@skiphyperreffalse \def\refstepcounter#1{% - \H@refstepcounter{#1}% - \edef\This@name{#1}% - \ifx\This@name\name@of@slide + \ifHy@pdfstring \else - \if@skiphyperref + \H@refstepcounter{#1}% + \edef\This@name{#1}% + \ifx\This@name\name@of@slide \else - \if@hyper@item - \stepcounter{Item}% - \hyper@refstepcounter{Item}% + \if@skiphyperref \else - \hyper@refstepcounter{#1}% + \if@hyper@item + \stepcounter{Item}% + \hyper@refstepcounter{Item}% + \else + \hyper@refstepcounter{#1}% + \fi \fi \fi \fi -- cgit v1.2.3