summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hyperref/hyperref.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperref/hyperref.sty')
-rw-r--r--Master/texmf-dist/tex/latex/hyperref/hyperref.sty68
1 files changed, 62 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperref/hyperref.sty b/Master/texmf-dist/tex/latex/hyperref/hyperref.sty
index bd1ae8568a3..72f4d947935 100644
--- a/Master/texmf-dist/tex/latex/hyperref/hyperref.sty
+++ b/Master/texmf-dist/tex/latex/hyperref/hyperref.sty
@@ -30,7 +30,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{hyperref}
- [2012/08/13 v6.83a %
+ [2012/08/18 v6.83b %
Hypertext links for LaTeX]
\begingroup
\@makeother\`%
@@ -4931,6 +4931,56 @@
\expandafter\hyper@@anchor\expandafter{\Hy@AnchorName}{\relax}#4%
\fi
}
+\newdimen\XeTeXLinkMargin
+\setlength{\XeTeXLinkMargin}{2pt}
+\ifxetex
+ \font\XeTeXLink@font=pzdr at 1sp\relax
+ \newcommand*{\XeTeXLink@space}{%
+ \begingroup
+ \XeTeXLink@font
+ \@xxxii
+ \endgroup
+ }%
+ \newcommand{\XeTeXLinkBox}[1]{%
+ \begingroup
+ \leavevmode
+ \sbox\z@{#1}%
+ \begingroup
+ \dimen@=\dp\z@
+ \advance\dimen@\XeTeXLinkMargin
+ \setbox\tw@=\llap{%
+ \hb@xt@\XeTeXLinkMargin{%
+ \lower\dimen@\hbox{\XeTeXLink@space}%
+ \hss
+ }%
+ }%
+ \dp\tw@=\dp\z@
+ \ht\tw@=\ht\z@
+ \copy\tw@
+ \endgroup
+ \copy\z@
+ \dimen@=\ht\z@
+ \advance\dimen@\XeTeXLinkMargin
+ \setbox\tw@=\rlap{%
+ \hb@xt@\XeTeXLinkMargin{%
+ \hss
+ \raise\dimen@\hbox{\XeTeXLink@space}%
+ }%
+ }%
+ \dp\tw@=\dp\z@
+ \ht\tw@=\ht\z@
+ \copy\tw@
+ \endgroup
+ }%
+\else
+ \newcommand*{\XeTeXLinkBox}[1]{%
+ \begingroup
+ \leavevmode
+ \sbox\z@{#1}%
+ \copy\z@
+ \endgroup
+ }%
+\fi
\def\hyper@@link{\let\Hy@reserved@a\relax
\@ifnextchar[{\hyper@link@}{\hyper@link@[link]}%
}
@@ -6662,6 +6712,7 @@
}
\def\hyper@makecurrent#1{%
\begingroup
+ \Hy@safe@activestrue
\edef\Hy@param{#1}%
\ifx\Hy@param\Hy@chapterstring
\let\Hy@param\Hy@chapapp
@@ -7805,24 +7856,29 @@
\endgroup
}
\def\contentsline#1#2#3#4{%
- \ifx\\#4\\%
+ \begingroup
+ \Hy@safe@activestrue
+ \edef\x{\endgroup
+ \def\noexpand\Hy@tocdestname{#4}%
+ }\x
+ \ifx\Hy@tocdestname\ltx@empty
\csname l@#1\endcsname{#2}{#3}%
\else
\ifcase\Hy@linktoc % none
\csname l@#1\endcsname{#2}{#3}%
\or % section
\csname l@#1\endcsname{%
- \hyper@linkstart{link}{#4}{#2}\hyper@linkend
+ \hyper@linkstart{link}{\Hy@tocdestname}{#2}\hyper@linkend
}{#3}%
\or % page
\csname l@#1\endcsname{{#2}}{%
- \hyper@linkstart{link}{#4}{#3}\hyper@linkend
+ \hyper@linkstart{link}{\Hy@tocdestname}{#3}\hyper@linkend
}%
\else % all
\csname l@#1\endcsname{%
- \hyper@linkstart{link}{#4}{#2}\hyper@linkend
+ \hyper@linkstart{link}{\Hy@tocdestname}{#2}\hyper@linkend
}{%
- \hyper@linkstart{link}{#4}{#3}\hyper@linkend
+ \hyper@linkstart{link}{\Hy@tocdestname}{#3}\hyper@linkend
}%
\fi
\fi