diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperref/hyperref.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/hyperref/hyperref.sty | 141 |
1 files changed, 120 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperref/hyperref.sty b/Master/texmf-dist/tex/latex/hyperref/hyperref.sty index 980ea5b7e7a..d43d9003303 100644 --- a/Master/texmf-dist/tex/latex/hyperref/hyperref.sty +++ b/Master/texmf-dist/tex/latex/hyperref/hyperref.sty @@ -23,7 +23,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{hyperref} - [2007/05/29 v6.76g + [2007/06/14 v6.76i Hypertext links for LaTeX] \begingroup \@makeother\`% @@ -437,8 +437,22 @@ \fi \xdef#1{#1\@empty}% \fi + \endgroup + \begingroup \ifHy@unicode \HyPsd@ConvertToUnicode#1% + \ifx\HyPsd@pdfencoding\HyPsd@pdfencoding@auto + \@ifundefined{StringEncodingConvertTest}{% + }{% + \EdefUnescapeString\HyPsd@temp#1% + \StringEncodingConvertTest\HyPsd@temp\HyPsd@temp + {utf16be}{pdfdoc}{% + \EdefEscapeString\HyPsd@temp\HyPsd@temp + \global\let#1\HyPsd@temp + \Hy@unicodefalse + }{}% + }% + \fi \fi \pdfstringdefPostHook#1% \endgroup @@ -1696,7 +1710,91 @@ } \define@key{Hyp}{unicode}[true]{% \Hy@boolkey{unicode}{#1}% - \HyPsd@InitUnicode + \ifHy@unicode + \def\HyPsd@pdfencoding{unicode}% + \else + \def\HyPsd@pdfencoding{pdfdoc}% + \fi + \HyPsd@LoadUnicode +} +\def\HyPsd@LoadUnicode{% + \@ifundefined{T@PU}{\input{puenc.def}}{}% + \DeclareFontFamily{PU}{pdf}{}% + \DeclareFontShape{PU}{pdf}{m}{n}{ <-> cmr10 }{}% + \DeclareFontSubstitution{PU}{pdf}{m}{n}% + \global\let\HyPsd@LoadUnicode\relax +} +\AtBeginDocument{% + \ifx\HyPsd@LoadUnicode\relax + \else + \def\HyPsd@LoadUnicode{% + \PackageError{hyperref}{% + Unicode support for bookmarks is not available.\MessageBreak + Activate unicode support by using one of the options\MessageBreak + `unicode', `pdfencoding=unicode', `pdfencoding=auto'\MessageBreak + in the preamble% + }\@ehc + \global\let\HyPsd@LoadUnicode\relax + \global\Hy@unicodefalse + \global\let\Hy@unicodetrue\Hy@unicodefalse + }% + \fi +} +\define@key{Hyp}{pdfencoding}{% + \edef\HyPsd@temp{#1}% + \ifx\HyPsd@temp\HyPsd@pdfencoding@pdfdoc + \let\HyPsd@pdfencoding\HyPsd@temp + \Hy@unicodefalse + \else + \ifcase\ifx\HyPsd@temp\HyPsd@pdfencoding@unicode + \z@ + \else + \ifx\HyPsd@temp\HyPsd@pdfencoding@auto + \z@ + \else + \@ne + \fi + \fi + \let\HyPsd@pdfencoding\HyPsd@temp + \hypersetup{unicode}% + \ifHy@unicode + \def\HyPsd@pdfencoding{#1}% + \ifx\HyPsd@pdfencoding\HyPsd@pdfencoding@auto + \HyPsd@LoadStringEnc + \fi + \else + \Hy@Warning{Cannot switch to unicode bookmarks}% + \let\HyPsd@pdfencoding\HyPsd@pdfencoding@pdfdoc + \fi + \else + \@onelevel@sanitize\HyPsd@temp + \Hy@Warning{% + Values of option `pdfencoding':\MessageBreak + `pdfdoc', `unicode', `auto'.\MessageBreak + Ignoring unknown value `\HyPsd@temp'% + }% + \fi + \fi +} +\def\HyPsd@pdfencoding@auto{auto} +\def\HyPsd@pdfencoding@pdfdoc{pdfdoc} +\def\HyPsd@pdfencoding@unicode{unicode} +\let\HyPsd@pdfencoding\Hy@pdfencoding@pdfdoc +\def\HyPsd@LoadStringEnc{% + \RequirePackage{stringenc}[2007/06/14] + \let\HyPsd@LoadStringEnc\relax +} +\AtBeginDocument{% + \@ifpackageloaded{stringenc}{% + \let\HyPsd@LoadStringEnc\relax + }{% + \def\HyPsd@LoadStringEnc{% + \Hy@WarningNoLine{% + Missing package `stringenc'. Use `pdfencoding=auto'\MessageBreak + in the preamble or load the package there% + }% + }% + }% } \define@key{Hyp}{hyperref}[true]{} \define@key{Hyp}{tex4ht}[true]{% @@ -2460,22 +2558,6 @@ \Hy@DisableOption{nolinks}% \Hy@DisableOption{final}% }% -\ifx\HyPsd@InitUnicode\relax - \define@key{Hyp}{unicode}[true]{% - \Hy@boolkey{unicode}{#1}% - }% -\else - \define@key{Hyp}{unicode}[true]{% - \Hy@boolkey{unicode}{#1}% - \ifHy@unicode - \Hy@WarningNoLine{Set package option `unicode' first\MessageBreak - in order to load unicode support% - }% - \Hy@unicodefalse - \fi - }% -\fi -\let\HyPsd@InitUnicode\@undefined \Hy@nextfalse \@ifundefined{spanish@sh@"@sel}{}{\Hy@nexttrue} \@ifundefined{galician@sh@"@sel}{}{\Hy@nexttrue} @@ -3655,8 +3737,25 @@ \fi \Hy@DisableOption{pdfpagelabels} \MaybeStopEarly -\newcommand\theHequation{\theHsection.\arabic{equation}} -\@ifundefined{thepart}{}{\newcommand\theHpart{\arabic{part}}} +\def\Hy@CounterExists#1{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname c@#1\endcsname\relax + \expandafter\@gobble + \else + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname the#1\endcsname\relax + \expandafter\expandafter\expandafter\@gobble + \else + \expandafter\expandafter\expandafter\@firstofone + \fi + \fi +} +\Hy@CounterExists{section}{% + \newcommand\theHequation{\theHsection.\arabic{equation}}% +} +\Hy@CounterExists{part}{% + \newcommand\theHpart{\arabic{part}}% +} \@ifundefined{thechapter}{% \newcommand\theHsection {\arabic{section}}% \newcommand\theHfigure {\arabic{figure}}% @@ -3863,7 +3962,7 @@ #2\@sharp#####4% }% }% - \expandafter\expandafter\expandafter\x\y[#1]{#2}\@nil + \expandafter\expandafter\expandafter\x\y[{#1}]{#2}\@nil \begingroup \def\x#1\ifvoid\LT@firsthead\copy#2\@nil{% \endgroup |