summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hyperref/hyperref.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-07-29 22:04:20 +0000
committerKarl Berry <karl@freefriends.org>2012-07-29 22:04:20 +0000
commitfe32258562977401195cca3076b1e37bdf9c836a (patch)
tree70bfa31f28ef339f5dd2650b73a1b46e7747c3ce /Master/texmf-dist/tex/latex/hyperref/hyperref.sty
parent70467f28c321a6700620dd5b77fba19e158047a8 (diff)
hyperref
git-svn-id: svn://tug.org/texlive/trunk@27238 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperref/hyperref.sty')
-rw-r--r--Master/texmf-dist/tex/latex/hyperref/hyperref.sty248
1 files changed, 226 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperref/hyperref.sty b/Master/texmf-dist/tex/latex/hyperref/hyperref.sty
index 24440c3c24c..18b149b4e5b 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/05/13 v6.82q %
+ [2012/07/29 v6.82v %
Hypertext links for LaTeX]
\begingroup
\@makeother\`%
@@ -130,6 +130,7 @@
\RequirePackage{ifxetex}[2006/08/21]
\RequirePackage{hycolor}
\RequirePackage{letltxmacro}[2008/06/13]
+\RequirePackage{auxhook}[2009/12/14]
\def\Hy@Error{\@PackageError{hyperref}}
\def\Hy@Warning{\@PackageWarning{hyperref}}
\def\Hy@WarningNoLine{\@PackageWarningNoLine{hyperref}}
@@ -259,6 +260,7 @@
\newif\ifHy@pdfcenterwindow
\newif\ifHy@CJKbookmarks
\newif\ifHy@colorlinks
+\newif\ifHy@destlabel
\newif\ifHy@draft
\let\Hy@finaltrue\Hy@draftfalse
\let\Hy@finalfalse\Hy@drafttrue
@@ -288,6 +290,7 @@
\newif\ifHy@seminarslides
\newif\ifHy@setpagesize
\newif\ifHy@texht
+\newif\ifHy@psdextra
\newif\ifHy@pdftoolbar
\newif\ifHy@unicode
\newif\ifHy@pdfusetitle
@@ -304,6 +307,7 @@
\Hy@breaklinksfalse
\Hy@pdfcenterwindowfalse
\Hy@CJKbookmarksfalse
+\Hy@destlabelfalse
\Hy@pdfescapeformfalse
\Hy@hyperfiguresfalse
\Hy@pdffitwindowfalse
@@ -326,6 +330,7 @@
\Hy@raiselinksfalse
\Hy@setpagesizetrue
\Hy@texhtfalse
+\Hy@psdextrafalse
\Hy@pdftoolbartrue
\Hy@typexmlfalse
\Hy@unicodefalse
@@ -481,11 +486,19 @@
\let\phantom\@gobble
\let\vphantom\@gobble
\let\hphantom\@gobble
+ \let\ding\HyPsd@ding
+ \let\Cube\HyPsd@DieFace
\def\begin#1{\csname#1\endcsname}%
\def\end#1{\csname end#1\endcsname}%
\def\textcolor##1##{\@secondoftwo}%
\def\MakeUppercase{\MakeUppercaseUnsupportedInPdfStrings}%
\def\MakeLowercase{\MakeLowercaseUnsupportedInPdfStrings}%
+ \ifHy@psdextra
+ \ifHy@unicode
+ \csname psdmapshortnames\endcsname
+ \csname psdaliasnames\endcsname
+ \fi
+ \fi
\let\foreignlanguage\@secondoftwo
\let\textlatin\@firstofone
\ltx@IfUndefined{language@group}{}{%
@@ -524,6 +537,7 @@
\def\halign{\pdfstringdefWarn\halign\@gobble}%
\let\ignorespaces\HyPsd@ignorespaces
\let\Hy@SectionAnchorHref\@gobble
+ \let\ensuremath\@firstofone
\HyPsd@CJKhook
\Hy@pdfstringtrue
\pdfstringdefPreHook
@@ -576,7 +590,8 @@
}%
\expandafter\HyPsd@RemoveMask\expandafter
|\expandafter\@empty#1\HyPsd@End#1%
- \expandafter\HyPsd@Subst\expandafter{\HyPsd@GLYPHERR}{\relax}#1%
+ \expandafter
+ \HyPsd@Subst\expandafter{\HyPsd@GLYPHERR}{\relax}#1%
\let\HyPsd@String\@empty
\expandafter\HyPsd@GlyphProcess#1\relax\@empty
\global\let#1\HyPsd@String
@@ -772,7 +787,7 @@
\DeclareFontFamily{PD1}{pdf}{}
\DeclareFontShape{PD1}{pdf}{m}{n}{ <-> cmr10 }{}
\DeclareFontSubstitution{PD1}{pdf}{m}{n}
-\def\HyPsd@InitUnicode{%
+\def\HyPsd@LoadUnicode{%
\@ifundefined{T@PU}{%
\input{puenc.def}%
\HyLinguex@Restore
@@ -780,7 +795,8 @@
\DeclareFontFamily{PU}{pdf}{}%
\DeclareFontShape{PU}{pdf}{m}{n}{ <-> cmr10 }{}%
\DeclareFontSubstitution{PU}{pdf}{m}{n}%
- \let\HyPsd@InitUnicode\relax
+ \input{psdextra.def}%
+ \let\HyPsd@LoadUnicode\relax
}
\def\texorpdfstring{%
\ifHy@pdfstring
@@ -2220,6 +2236,117 @@
into preamble]%
\fi
}%
+\def\HyPsd@DieFace#1{%
+ \ifHy@unicode
+ \ifnum#1<1 %
+ \HyPsd@UnicodeReplacementCharacter
+ \else
+ \ifnum#1>6 %
+ \9046\205%
+ \expandafter\expandafter\expandafter
+ \HyPsd@DieFaceLarge\intcalcSub{#1}{6}!%
+ \else
+ \9046\20\intcalcDec{#1}%
+ \fi
+ \fi
+ \else
+ .% Die faces are not part of PDFDocEncoding
+ \fi
+}
+\def\HyPsd@DieFaceLarge#1!{%
+ \ifnum#1>6 %
+ \expandafter\ltx@firstoftwo
+ \else
+ \expandafter\ltx@secondoftwo
+ \fi
+ {%
+ \9046\205%
+ \expandafter\expandafter\expandafter
+ \HyPsd@DieFaceLarge\IntCalcSub#1!6!!%
+ }{%
+ \9046\20\IntCalcDec#1!%
+ }%
+}
+\def\HyPsd@MoonPha#1{%
+ \ifcase\intcalcNum{#1} %
+ \HyPsd@UnicodeReplacementCharacter
+ \or % 1
+ \9330\074\9337\032%
+ \or % 2
+ \HyPsd@UnicodeReplacementCharacter
+ \or % 3
+ \9330\074\9337\035%
+ \or % 4
+ \9330\074\9337\034%
+ \else
+ \HyPsd@UnicodeReplacementCharacter
+ \fi
+}
+\def\HyPsd@ding#1{%
+ \ifHy@unicode
+ \ifnum#1<32 %
+ \HyPsd@UnicodeReplacementCharacter
+ \else
+ \ifnum#1>254 %
+ \HyPsd@UnicodeReplacementCharacter
+ \else
+ \ifnum#1<127 %
+ \expandafter\expandafter\expandafter
+ \HyPsd@@ding\intcalcNum{#1}!%
+ \else
+ \ifnum#1>160 %
+ \expandafter\expandafter\expandafter
+ \HyPsd@@ding\intcalcNum{#1}!%
+ \else
+ \HyPsd@UnicodeReplacementCharacter
+ \fi
+ \fi
+ \fi
+ \fi
+ \else
+ .% Dingbats are not part of PDFDocEncoding
+ \fi
+}
+\def\HyPsd@@ding#1!{%
+ \ltx@ifundefined{HyPsd@ding@#1}{%
+ \ifnum#1<127 %
+ \9047%
+ \HyPsd@DecimalToOctalSecond{\IntCalcSub#1!32!}%
+ \else
+ \ifnum#1<168 %
+ \9047\14\IntCalcSub#1!160!%
+ \else
+ \ifnum#1>181 %
+ \9047\HyPsd@DecimalToOctalSecond{\IntCalcSub#1!64!}%
+ \else
+ % 172..181 -> U+2460..U+2469
+ \9044\HyPsd@DecimalToOctalSecond{\IntCalcSub#1!76!}%
+ \fi
+ \fi
+ \fi
+ }{%
+ \csname HyPsd@ding@#1\endcsname
+ }%
+}
+\@namedef{HyPsd@ding@32}{\space}
+\@namedef{HyPsd@ding@37}{\9046\016}% U+260E
+\@namedef{HyPsd@ding@42}{\9046\033}% U+261B
+\@namedef{HyPsd@ding@43}{\9046\036}% U+261E
+\@namedef{HyPsd@ding@72}{\9046\005}% U+2605
+\@namedef{HyPsd@ding@108}{\9045\317}% U+25CF
+\@namedef{HyPsd@ding@110}{\9045\240}% U+25A0
+\@namedef{HyPsd@ding@115}{\9045\262}% U+25B2
+\@namedef{HyPsd@ding@116}{\9045\274}% U+25BC
+\@namedef{HyPsd@ding@117}{\9045\306}% U+25C6
+\@namedef{HyPsd@ding@119}{\9045\327}% U+25D7
+\@namedef{HyPsd@ding@168}{\textclubsuitblack}%
+\@namedef{HyPsd@ding@169}{\textdiamondsuitblack}%
+\@namedef{HyPsd@ding@170}{\textheartsuitblack}%
+\@namedef{HyPsd@ding@171}{\textspadesuitblack}%
+\@namedef{HyPsd@ding@213}{\textrightarrow}%
+\@namedef{HyPsd@ding@214}{\textleftrightarrow}%
+\@namedef{HyPsd@ding@215}{\textupdownarrow}%
+\@namedef{HyPsd@ding@240}{\HyPsd@UnicodeReplacementCharacter}
\@ifclassloaded{memoir}{%
\Hy@AtEndOfPackage{\RequirePackage{memhfixc}}%
}{}
@@ -2575,6 +2702,9 @@
\define@key{Hyp}{nesting}[true]{%
\Hy@boolkey{nesting}{#1}%
}
+\define@key{Hyp}{destlabel}[true]{%
+ \Hy@boolkey{destlabel}{#1}%
+}
\define@key{Hyp}{unicode}[true]{%
\Hy@boolkey{unicode}{#1}%
\ifHy@unicode
@@ -2584,16 +2714,6 @@
\def\HyPsd@pdfencoding{pdfdoc}%
\fi
}
-\def\HyPsd@LoadUnicode{%
- \@ifundefined{T@PU}{%
- \input{puenc.def}%
- \HyLinguex@Restore
- }{}%
- \DeclareFontFamily{PU}{pdf}{}%
- \DeclareFontShape{PU}{pdf}{m}{n}{ <-> cmr10 }{}%
- \DeclareFontSubstitution{PU}{pdf}{m}{n}%
- \global\let\HyPsd@LoadUnicode\relax
-}
\Hy@AtBeginDocument{%
\ifx\HyPsd@LoadUnicode\relax
\else
@@ -2666,6 +2786,9 @@
}%
}%
}
+\define@key{Hyp}{psdextra}[true]{%
+ \Hy@boolkey{psdextra}{#1}%
+}
\def\hypersetup{\kvsetkeys{Hyp}}
\newif\ifHy@setpdfversion
\define@key{Hyp}{pdfversion}{%
@@ -3947,7 +4070,9 @@
\def\Hy@xspace@end{%
\ltx@gobble{end for xspace}%
}%
- \xspaceaddexceptions{\Hy@xspace@end,\hyper@linkend,\hyper@anchorend}%
+ \xspaceaddexceptions{%
+ \Hy@xspace@end,\hyper@linkend,\hyper@anchorend
+ }%
}%
}%
}{%
@@ -4084,7 +4209,7 @@
\ifHy@typexml
\Hy@AtEndOfPackage{%
\RequirePackage{color}%
- \RequirePackage{nameref}%
+ \RequirePackage{nameref}[2012/07/28]%
}%
\fi
\Hy@DisableOption{typexml}
@@ -4417,7 +4542,7 @@
\ifHy@typexml
\else
\Hy@CatcodeWrapper{%
- \RequirePackage{nameref}%
+ \RequirePackage{nameref}[2012/07/28]%
}%
\fi
\fi
@@ -4901,6 +5026,76 @@
\let\anchor@spot\@empty
}
\let\anchor@spot\ltx@empty
+\ifHy@destlabel
+ \def\hyper@newdestlabel#1#2{%
+ \begingroup
+ \Hy@safe@activestrue
+ \edef\x{\endgroup
+ \noexpand\@newl@bel{HyDL}{#1}{#2}%
+ }%
+ \x
+ }%
+ \providecommand*{\hyper@destlabel@hook}{}%
+ \newcommand*{\Hy@DestRename}[2]{%
+ \ltx@IfUndefined{HyDL!#1}{%
+ \begingroup
+ \Hy@safe@activestrue
+ \edef\dest@name{#1}%
+ \edef\label@name{#2}%
+ \hyper@destlabel@hook
+ \Hy@IsNotEmpty{dest@name}{%
+ \Hy@IsNotEmpty{label@name}{%
+ \global\expandafter
+ \let\csname HyDL!#1\endcsname\ltx@empty
+ \if@filesw
+ \protected@write\@auxout{}{%
+ \string\hyper@newdestlabel
+ {#1}%
+ {\label@name}%
+ }%
+ \fi
+ }%
+ }%
+ \endgroup
+ }{}%
+ }%
+ \newcommand*{\HyperDestRename}[2]{%
+ \AtBeginDocument{%
+ \Hy@DestRename{#1}{#2}%
+ }%
+ }%
+ \AtBeginDocument{%
+ \let\HyperDestRename\Hy@DestRename
+ }%
+ \def\Hy@IsNotEmpty#1{%
+ \ltx@IfUndefined{#1}\ltx@gobble{%
+ \expandafter\ifx\csname#1\endcsname\ltx@empty
+ \expandafter\ltx@gobble
+ \else
+ \expandafter\ltx@firstofone
+ \fi
+ }%
+ }%
+ \ltx@GlobalAppendToMacro\label@hook{%
+ \HyperDestRename\@currentHref\label@name
+ }%
+ \def\HyperDestLabelReplace#1{%
+ \ltx@ifundefined{HyDL@#1}{%
+ #1%
+ }{%
+ \csname HyDL@#1\endcsname
+ }%
+ }%
+\let\HyperDestNameFilter\HyperDestLabelReplace
+\else
+ \let\hyper@newdestlabel\ltx@gobbletwo
+ \let\HyperDestLabelReplace\ltx@firstofone
+ \let\HyperDestRename\ltx@gobbletwo
+\fi
+\Hy@DisableOption{destlabel}
+\AddLineBeginAux{%
+ \string\providecommand\string\hyper@newdestlabel[2]{}%
+}
\let\htmladdimg\hyperimage
\def\htmladdnormallink#1#2{\href{#2}{#1}}
\def\htmladdnormallinkfoot#1#2{\href{#2}{#1}\footnote{#2}}
@@ -6009,8 +6204,15 @@
}%
\fi
}
-\AtBeginShipoutFirst{%
- \Hy@FirstPageHook
+\ltx@iffileloaded{hpdftex.def}{%
+ \AtBeginShipout{%
+ \Hy@FirstPageHook
+ \global\let\Hy@FirstPageHook\ltx@empty
+ }%
+}{%
+ \AtBeginShipoutFirst{%
+ \Hy@FirstPageHook
+ }%
}
\g@addto@macro\Hy@FirstPageHook{%
\PDF@FinishDoc
@@ -6705,7 +6907,9 @@
\def\@tempa{\@oparg{\@begintheorem{#3}{}}[]}%
\else
\refstepcounter{#2}%
- \def\@tempa{\@oparg{\@begintheorem{#3}{\csname the#2\endcsname}}[]}%
+ \def\@tempa{%
+ \@oparg{\@begintheorem{#3}{\csname the#2\endcsname}}[]%
+ }%
\fi
\@tempa
}%
@@ -7511,12 +7715,12 @@
\let\H@definecounter\@definecounter
\def\@definecounter#1{%
\H@definecounter{#1}%
- \expandafter\def\csname theH#1\endcsname{\arabic{#1}}%
+ \expandafter\gdef\csname theH#1\endcsname{\arabic{#1}}%
}
\let\H@newctr\@newctr
\def\@newctr#1[#2]{%
\H@newctr#1[{#2}]%
- \expandafter\def\csname theH#1\endcsname{%
+ \expandafter\gdef\csname theH#1\endcsname{%
\csname the\@ifundefined{theH#2}{}{H}#2\endcsname.\arabic{#1}%
}%
}