From f3f5f724bfb1c2f181b5ddab7c34248e64a075d8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 12 Sep 2009 18:07:15 +0000 Subject: hyperref update (11sep09) git-svn-id: svn://tug.org/texlive/trunk@15237 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/hyperref/doc/manual.tex | 91 +++++++++++++++++++++- .../texmf-dist/source/latex/hyperref/hyperref.dtx | 16 +++- 2 files changed, 101 insertions(+), 6 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 9fe096a46f8..38ac35a0057 100644 --- a/Master/texmf-dist/source/latex/hyperref/doc/manual.tex +++ b/Master/texmf-dist/source/latex/hyperref/doc/manual.tex @@ -118,7 +118,7 @@ \title{Hypertext marks in \LaTeX: a manual for \textsf{hyperref}} \author{Sebastian Rahtz \and Heiko Oberdiek} -\date{October 2008} +\date{September 2009} \begin{document} @@ -410,7 +410,9 @@ breaklinks & boolean & false & allow links to break over lines by making l the same target \\ colorlinks & boolean & false & Colors the text of links and anchors. The colors chosen depend on the the type of link. At present the only types of link distinguished are citations, page references, - URLs, local file references, and other links. \\ + URLs, local file references, and other links. + In spite of colored boxes, the colored + text remains when printing.\\ linkcolor & color & red & Color for normal internal links. \\ anchorcolor & color & black & Color for anchor text. \\ citecolor & color & green & Color for bibliographical citations in text. \\ @@ -468,7 +470,10 @@ pdfborder & & 0 0 1 & The style of box around links; defaul Note that the color of link borders can be specified \emph{only} as 3 numbers in the range 0..1, giving an RGB color. You cannot use colors -defined in \TeX. +defined in \TeX. Since version 6.76a this is no longer true. +Especially with the help of package \textsf{xcolor} the usual +color specifications of package \textsf{(x)color} can be used. +For further information see description of package \textsf{hycolor}. The bookmark commands are stored in a file called \textit{jobname}\texttt{.out}. The files is not processed by \LaTeX\ so @@ -859,6 +864,44 @@ Example for a redefinition if \textsf{babel} is used: \end{verbatim} \end{quote} +Hint: \verb|\autoref| works via the counter name that the reference +is based on. Sometimes \verb|\autoref| chooses the wrong name, if +the counter is used for different things. For example, it happens +with \verb|\newtheorem| if a lemma shares a counter with theorems. +Then package \textsf{aliascnt} provides a method to generate a +simulated second counter that allows the differentiation between +theorems and lemmas: +\begin{quote} +\begin{verbatim} +\documentclass{article} + +\usepackage{aliascnt} +\usepackage{hyperref} + +\newtheorem{theorem}{Theorem} + +\newaliascnt{lemma}{theorem} +\newtheorem{lemma}[lemma]{Lemma} +\aliascntresetthe{lemma} + +\providecommand*{\lemmaautorefname}{Lemma} + +\begin{document} + +We will use \autoref{a} to prove \autoref{b}. + +\begin{lemma}\label{a} + Nobody knows. +\end{lemma} + +\begin{theorem}\label{b} + Nobody is right. +\end{theorem}. + +\end{document} +\end{verbatim} +\end{quote} + \begin{cmdsyntax} \ci{autopageref}\verb|{|\emph{label}\verb|}| \end{cmdsyntax} @@ -919,8 +962,48 @@ In addition, parentheses are protected to avoid the danger of unsafe unbalanced parentheses in the PDF string. For further details, see Heiko Oberdiek's Euro\TeX\ paper distributed with \textsf{hyperref}. +\subsection{Bookmark macros} + +\subsubsection{Setting bookmarks} + +Usually \textsf{hyperref} automatically adds bookmarks for +\verb|\section| and similar macros. But they can also set manually. + +\begin{cmdsyntax} +\ci{pdfbookmark}\verb|[|\emph{level}\verb|]{|text\verb|}{|\emph{name}\verb|}| +\end{cmdsyntax} +creates a bookmark with the specified text and at the given level (defaul is +0). As name for the internal anchor name is used (in conjunction with +level). Therefore the name must be unique (similar to \verb|\label|). + +\begin{cmdsyntax} +\ci{currentpdfbookmark}\verb|{|\emph{text}\verb|}{|\emph{name}\verb|}| +\end{cmdsyntax} +creates a bookmark at the current level. + +\begin{cmdsyntax} +\ci{subpdfbookmark}\verb|{|\emph{text}\verb|}{|\emph{name}\verb|}| +\end{cmdsyntax} +creates a bookmark one step down in the bookmark hierarchy. +Internally the current level is increased by one. + +\begin{cmdsyntax} +\ci{subpdfbookmark}\verb|{|\emph{text}\verb|}{|\emph{name}\verb|}| +\end{cmdsyntax} +creates a bookmark below the current bookmark level. However after the +command the current bookmark level has not changed. + +\noindent \textbf{Hint:} Package \textsf{bookmark} replaces +\textsf{hyperref}'s bookmark organization by a new algorithm: +\begin{itemize} +\item Usually only one \LaTeX\ run is needed. +\item More control over the bookmark appearance (color, font). +\item Different bookmark actions are supported (external file links, + urls, \dots). +\end{itemize} +Therefore I recommend using this package. -\subsection{Replacement macros} +\subsubsection{Replacement macros} \textsf{hyperref} takes the text for bookmarks from the arguments of commands like \ci{section}, which can contain things like math, colors, diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx index 4da5df1b66d..4dcc30d5333 100644 --- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx @@ -38,7 +38,7 @@ %\ProvidesFile{puenc.def} %\ProvidesFile{puvnenc.def} %\ProvidesFile{puarenc.def} -% [2009/08/04 v6.78t +% [2009/09/10 v6.78u % Hypertext links for LaTeX] % Dummy hyperref (SR)] % Hyperref documentation driver file] @@ -114,7 +114,7 @@ \end{document} % % \fi -% \CheckSum{24579} +% \CheckSum{24588} % % \MakeShortVerb{|} % \StopEventually{} @@ -5592,7 +5592,19 @@ \let\@unprocessedoptions\relax \Hy@RestoreCatcodes } +% \end{macrocode} +% Support for open outlines is enabled for Xe\TeX\ >= 0.9995. +% I don't know, if older versions also support this. +% AFAIK older dvipdfmx versions will break, thus the +% switch cannot be turned on by default. +% \begin{macrocode} \newif\ifHy@DvipdfmxOutlineOpen +\ifxetex + \ifdim\number\XeTeXversion\XeTeXrevision in<0.9995in % + \else + \Hy@DvipdfmxOutlineOpentrue + \fi +\fi \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname SpecialDvipdfmxOutlineOpen\endcsname\relax \else -- cgit v1.2.3