summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-11-28 23:55:25 +0000
committerKarl Berry <karl@freefriends.org>2011-11-28 23:55:25 +0000
commitc204e102aa12e127fb7b52b3e893a49d3ab75ea8 (patch)
tree6391d7215a5d0f5d88cedffd107d0778810d2774 /Master/texmf-dist/source/latex/hyperref/hyperref.dtx
parentec1850934776a8b813fb4abed29480666a252ead (diff)
hyperref (22nov11)
git-svn-id: svn://tug.org/texlive/trunk@24686 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/hyperref/hyperref.dtx')
-rw-r--r--Master/texmf-dist/source/latex/hyperref/hyperref.dtx127
1 files changed, 91 insertions, 36 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
index 5097b02f0e6..5fb0a84cc31 100644
--- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
@@ -44,7 +44,7 @@
%<puenc>\ProvidesFile{puenc.def}
%<puvnenc>\ProvidesFile{puvnenc.def}
%<puarenc>\ProvidesFile{puarenc.def}
-%<!none> [2011/10/01 v6.82j %
+%<!none> [2011/11/21 v6.82l %
%<package> Hypertext links for LaTeX]
%<nohyperref> Dummy hyperref (SR)]
%<driver> Hyperref documentation driver file]
@@ -82,9 +82,15 @@
%<puarenc> Hyperref: Additions to puenc.def for Arabi]
%<*driver>
\documentclass{ltxdoc}
-\usepackage{array,times}
-\usepackage[T1]{fontenc}
-\renewcommand*{\ttdefault}{lmvtt}
+\usepackage{array}
+\usepackage{ifluatex,ifxetex}
+\ifnum 0\ifluatex 1\else\ifxetex 1\fi\fi=0 %
+ \usepackage[T1]{fontenc}%
+ \renewcommand*{\ttdefault}{lmvtt}%
+\else
+ \usepackage{fontspec}%
+ \renewcommand*{\ttdefault}{lmvtt}%
+\fi
\usepackage[%
colorlinks,%
hyperindex=false,% done by hypdoc
@@ -139,7 +145,7 @@
\end{document}
%</driver>
% \fi
-% \CheckSum{28614}
+% \CheckSum{28678}
%
% \MakeShortVerb{|}
% \StopEventually{}
@@ -8542,11 +8548,45 @@
\def\Fld@height{#1}%
}
\define@key{Field}{charsize}{%
- \Fld@charsize#1%
+ \setlength{\Fld@charsize}{#1}%
}
\define@key{Field}{borderwidth}{%
- \def\Fld@borderwidth{#1}%
+ \Hy@defaultbp\Fld@borderwidth{#1}%
+}
+\def\Hy@defaultbp#1#2{%
+ \begingroup
+ \afterassignment\Hy@defaultbpAux
+ \dimen@=#2bp\relax{#1}{#2}%
}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname dimexpr\endcsname\relax
+ \def\Hy@defaultbpAux#1\relax#2#3{%
+ \ifx!#1!%
+ \endgroup
+ \def#2{#3}%
+ \else
+ \dimen@=.99626\dimen@
+ \edef\x{\endgroup
+ \def\noexpand#2{%
+ \strip@pt\dimen@
+ }%
+ }\x
+ \fi
+ }%
+\else
+ \def\Hy@defaultbpAux#1\relax#2#3{%
+ \ifx!#1!%
+ \endgroup
+ \def#2{#3}%
+ \else
+ \edef\x{\endgroup
+ \def\noexpand#2{%
+ \strip@pt\dimexpr\dimen@*800/803\relax
+ }%
+ }\x
+ \fi
+ }%
+\fi
\define@key{Field}{borderstyle}{%
\let\Hy@temp\Fld@borderstyle
\def\Fld@borderstyle{#1}%
@@ -9293,8 +9333,8 @@
\global\let\HyPL@thisLabel\relax
\fi
\let\HyPL@Type\relax
- \ifnum\the\c@page>0 %
- \ifx\HyPLSlidesSetPage\ltx@empty
+ \ifnum\c@page>0 %
+ \ifx\HyPL@SlidesSetPage\ltx@empty
\expandafter\HyPL@CheckThePage\HyPL@page\@nil
\fi
\fi
@@ -9768,27 +9808,27 @@
\fi
}
\Hy@CounterExists{section}{%
- \newcommand\theHequation{\theHsection.\arabic{equation}}%
+ \providecommand\theHequation{\theHsection.\arabic{equation}}%
}
\Hy@CounterExists{part}{%
- \newcommand\theHpart{\arabic{part}}%
+ \providecommand\theHpart{\arabic{part}}%
}
\ltx@IfUndefined{thechapter}{%
- \newcommand\theHsection {\arabic{section}}%
- \newcommand\theHfigure {\arabic{figure}}%
- \newcommand\theHtable {\arabic{table}}%
+ \providecommand\theHsection {\arabic{section}}%
+ \providecommand\theHfigure {\arabic{figure}}%
+ \providecommand\theHtable {\arabic{table}}%
}{%
- \newcommand\theHchapter {\arabic{chapter}}%
- \newcommand\theHfigure {\theHchapter.\arabic{figure}}%
- \newcommand\theHtable {\theHchapter.\arabic{table}}%
- \newcommand\theHsection {\theHchapter.\arabic{section}}%
-}
-\newcommand\theHsubsection {\theHsection.\arabic{subsection}}
-\newcommand\theHsubsubsection{\theHsubsection.\arabic{subsubsection}}
-\newcommand\theHparagraph {\theHsubsubsection.\arabic{paragraph}}
-\newcommand\theHsubparagraph {\theHparagraph.\arabic{subparagraph}}
-\newcommand\theHtheorem {\theHsection.\arabic{theorem}}
-\newcommand\theHthm {\theHsection.\arabic{thm}}
+ \providecommand\theHchapter {\arabic{chapter}}%
+ \providecommand\theHfigure {\theHchapter.\arabic{figure}}%
+ \providecommand\theHtable {\theHchapter.\arabic{table}}%
+ \providecommand\theHsection {\theHchapter.\arabic{section}}%
+}
+\providecommand\theHsubsection {\theHsection.\arabic{subsection}}
+\providecommand\theHsubsubsection{\theHsubsection.\arabic{subsubsection}}
+\providecommand\theHparagraph {\theHsubsubsection.\arabic{paragraph}}
+\providecommand\theHsubparagraph {\theHparagraph.\arabic{subparagraph}}
+\providecommand\theHtheorem {\theHsection.\arabic{theorem}}
+\providecommand\theHthm {\theHsection.\arabic{thm}}
% \end{macrocode}
% Thanks to Greta Meyer (gbd@pop.cwru.edu) for making me realize
% that enumeration starts at 0 for every list! But |\item|
@@ -9806,13 +9846,15 @@
% \end{macrocode}
%
% \begin{macrocode}
-\newcommand\theHenumi {\theHItem}
-\newcommand\theHenumii {\theHItem}
-\newcommand\theHenumiii {\theHItem}
-\newcommand\theHenumiv {\theHItem}
-\newcommand\theHHfootnote {\arabic{Hfootnote}}
-\newcommand\theHmpfootnote{\arabic{mpfootnote}}
-\let\theHHmpfootnote\theHHfootnote
+\providecommand\theHenumi {\theHItem}
+\providecommand\theHenumii {\theHItem}
+\providecommand\theHenumiii {\theHItem}
+\providecommand\theHenumiv {\theHItem}
+\providecommand\theHHfootnote {\arabic{Hfootnote}}
+\providecommand\theHmpfootnote{\arabic{mpfootnote}}
+\@ifundefined{theHHmpfootnote}{%
+ \let\theHHmpfootnote\theHHfootnote
+}{}
% \end{macrocode}
% Tanmoy asked for this default handling of undefined |\theH<name>|
% situations. It really isn't clear what would be ideal, whether to
@@ -10370,7 +10412,7 @@
\def\endsubeqnarray{%
\H@endsubeqnarray
}%
- \newcommand\theHsubequation{\theHequation\alph{subequation}}%
+ \providecommand\theHsubequation{\theHequation\alph{subequation}}%
}
% \end{macrocode}
% The aim of this macro is to produce a sanitized version of
@@ -11902,13 +11944,14 @@
% Contributions by Denis Girou (\Email{denis.girou@idris.fr}).
% \begin{macrocode}
\@ifclassloaded{seminar}{%
- \Hy@seminarslidestrue\newcommand\theHslide{\arabic{slide}}%
+ \Hy@seminarslidestrue
+ \providecommand\theHslide{\arabic{slide}}%
}{%
\Hy@seminarslidesfalse
}
\@ifpackageloaded{slidesec}{%
- \newcommand\theHslidesection {\arabic{slidesection}}%
- \newcommand\theHslidesubsection{%
+ \providecommand\theHslidesection {\arabic{slidesection}}%
+ \providecommand\theHslidesubsection{%
\theHslidesection.\arabic{slidesubsection}%
}%
\def\slide@heading[#1]#2{%
@@ -12243,7 +12286,12 @@
\pageautorefname\nobreakspace
}%
}
+% \end{macrocode}
+% \cs{leavevmode} is added to make package wrapfigure happy, if
+% \cs{autoref} starts a paragraph.
+% \begin{macrocode}
\DeclareRobustCommand*{\autoref}{%
+ \leavevmode
\@ifstar{\HyRef@autoref\@gobbletwo}{\HyRef@autoref\hyper@@link}%
}
\def\HyRef@autoref#1#2{%
@@ -13248,6 +13296,7 @@
%<*pdftex>
\def\Acrobatmenu#1#2{%
\Hy@Acrobatmenu{#1}{#2}{%
+ \leavevmode
\pdfstartlink
attr{%
\Hy@setpdfborder
@@ -17035,6 +17084,7 @@
\ifFld@hidden\def\Fld@width{1sp}\fi
\ifx\Fld@value\@empty\def\Fld@value{\Fld@default}\fi
\LayoutTextField{#2}{%
+ \leavevmode
\Hy@escapeform\PDFForm@Text
\pdfmark[\MakeTextField{\Fld@width}{\Fld@height}]{%
pdfmark=/ANN,Raw={\PDFForm@Text}%
@@ -17214,6 +17264,7 @@
\HyField@FlagsCheckBox
\ifFld@hidden\def\Fld@width{1sp}\fi
\LayoutCheckField{#2}{%
+ \leavevmode
\Hy@escapeform\PDFForm@Check
\pdfmark[\MakeCheckField{\Fld@width}{\Fld@height}]{%
pdfmark=/ANN,Raw={\PDFForm@Check}%
@@ -17529,6 +17580,7 @@
\ifFld@hidden\def\Fld@width{1sp}\fi
\ifx\Fld@value\@empty\def\Fld@value{\Fld@default}\fi
\LayoutTextField{#2}{%
+ \leavevmode
\Hy@escapeform\PDFForm@Text
\pdfstartlink user {\PDFForm@Text}\relax
\MakeTextField{\Fld@width}{\Fld@height}\pdfendlink
@@ -17735,6 +17787,7 @@
\HyField@FlagsCheckBox
\ifFld@hidden\def\Fld@width{1sp}\fi
\LayoutCheckField{#2}{%
+ \leavevmode
\Hy@escapeform\PDFForm@Check
\pdfstartlink user {\PDFForm@Check}\relax
\MakeCheckField{\Fld@width}{\Fld@height}%
@@ -17914,6 +17967,7 @@
}%
\HyField@AdvanceAnnotCount
\LayoutTextField{#2}{%
+ \leavevmode
\Hy@escapeform\PDFForm@Text
\@pdfm@mark{%
ann @text\HyField@TheAnnotCount\space
@@ -18189,6 +18243,7 @@
}%
\HyField@AdvanceAnnotCount
\LayoutCheckField{#2}{%
+ \leavevmode
\Hy@escapeform\PDFForm@Check
\@pdfm@mark{%
ann @check\HyField@TheAnnotCount\space