summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hypdvips/hypdvips.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/hypdvips/hypdvips.sty')
-rw-r--r--Master/texmf-dist/tex/latex/hypdvips/hypdvips.sty250
1 files changed, 141 insertions, 109 deletions
diff --git a/Master/texmf-dist/tex/latex/hypdvips/hypdvips.sty b/Master/texmf-dist/tex/latex/hypdvips/hypdvips.sty
index f2df149d94c..ea9190259ea 100644
--- a/Master/texmf-dist/tex/latex/hypdvips/hypdvips.sty
+++ b/Master/texmf-dist/tex/latex/hypdvips/hypdvips.sty
@@ -1,10 +1,10 @@
%%
%% This is file `hypdvips.sty',
-%% Copyright 2008-2011 Raimund Niedrist
+%% Copyright 2008-2012 Raimund Niedrist
%%
%% With portions written by Donald Arsenau, David Carlisle, Steven
%% Douglas Cochran, Toby Cubitt, Geoffrey Keating, Heiko Oberdiek,
-%% Sebastian Rahtz, and the Latex3 Project 1986-2011
+%% Sebastian Rahtz, and the Latex3 Project 1986-2012
%%
%% This work may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, either version 1.3 of this
@@ -22,7 +22,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{hypdvips}
- [2011/12/06 v2.04
+ [2012/12/30 v3.00
Hyperref extensions for use with dvips]
\@ifpackageloaded{hyperref}
{
@@ -81,10 +81,6 @@
}%
}{}
}
-\ifHy@unicode
-\else
- \HyPsd@InitUnicode
-\fi
\hypersetup{breaklinks=true}
%%
%% Debug commands:
@@ -1258,7 +1254,7 @@
currentdict /Rect known and
SDict /pp.outerbox known and
SDict /pp.baselineskip known and
- {Rect 1 get Rect 3 get sub pp.outerbox pp.getheight lt {pp.breaklink} if}
+ {Rect 1 get Rect 3 get sub HyperBorder 2 mul sub 0 lt {pp.breaklink} if}
if
end
SDict /pp.outerbox undef
@@ -2160,6 +2156,7 @@
\edef\@processme{\noexpand\pdf@toks={\the\pdf@defaulttoks}}%
\@processme
\let\pdf@type\relax
+ \let\pdf@objdef\ltx@empty
\kvsetkeys{PDF}{#2}%
\ifHy@pdfmarkerror
\else
@@ -2171,26 +2168,36 @@
#1%
\else%
\ifx\pdf@type\relax
- \Hy@WarningNoLine{no pdfmark type specified in #2!!}%
- \ifx\\#1\\%
- \else
- \pdf@rect{#1}%
- \fi
+ \Hy@WarningNoLine{no pdfmark type specified in #2!!}%
+ \ifx\\#1\\%
+ \else
+ \pdf@rect{#1}%
+ \fi
\else
- \ifx\\#1\\%
- \literalps@out{%
- [\the\pdf@toks\space\pdf@type\space pdfmark%
- }%
- \else
- \@ifundefined{@\pdf@linktype color}{%
+ \ifx\\#1\\%
+ \literalps@out{%
+ [%
+ \ifx\pdf@objdef\ltx@empty
+ \else
+ /_objdef\string{\pdf@objdef\string}%
+ \fi
+ \the\pdf@toks\space\pdf@type\space pdfmark%
+ }%
+ \else
+ \ltx@IfUndefined{@\pdf@linktype color}{%
\Hy@colorlink\@linkcolor
}{%
- \expandafter\Hy@colorlink
+ \expandafter\Hy@colorlink
\csname @\pdf@linktype color\endcsname
}%
\pdf@rect{#1}%
\literalps@out{%
- [\the\pdf@toks\space\pdf@type\space pdfmark%
+ [%
+ \ifx\pdf@objdef\ltx@empty
+ \else
+ /_objdef\string{\pdf@objdef\string}%
+ \fi
+ \the\pdf@toks\space\pdf@type\space pdfmark%
}%
\Hy@endcolorlink
\fi
@@ -2349,32 +2356,41 @@
\renewcommand{\Hy@backout}[1]{%
\@bsphack
- \ifpp@detailedbr%
- \else%
- \ifpp@pagebackref%
- \def\pp@br@currentHref{page.\thepage}%
+ \ifBR@enable
+ \ifBR@verbose
+ \PackageInfo{backref}{Back cite \string`#1\string'}%
+ \fi
+ \ifpp@detailedbr%
\else%
- \ifx\@currentHref\@empty%
- \def\pp@br@currentHref{Doc-Start}%
+ \ifpp@pagebackref%
+ \def\pp@br@currentHref{page.\thepage}%
\else%
- \def\pp@br@currentHref{\@currentHref}%
+ \ifx\@currentHref\@empty%
+ \def\pp@br@currentHref{Doc-Start}%
+ \else%
+ \def\pp@br@currentHref{\@currentHref}%
+ \fi%
\fi%
\fi%
- \fi%
- \ifpp@pagebackref%
- \def\pp@string{\pp@br@pagestring~\thepage}%
- \else%
- \ifx\@empty\@currentlabel%
- \def\pp@string{\pp@br@documentstring}%
+ \ifpp@pagebackref%
+ \def\pp@string{\pp@br@pagestring\space\thepage}%
\else%
- \def\pp@string{\@currentlabel}%
+ \ifx\@empty\@currentlabel%
+ \def\pp@string{\pp@br@documentstring}%
+ \else%
+ \def\pp@string{\@currentlabel}%
+ \fi%
\fi%
- \fi%
- \protected@write\@auxout{}{%
- \string\@writefile{brf}{%
- \string\backcite{#1}{{\thepage}{\pp@string}{\pp@br@currentHref}}%
+ \protected@write\@auxout{}{%
+ \string\@writefile{brf}{%
+ \string\backcite{#1}{{\thepage}{\pp@string}{\pp@br@currentHref}}%
}%
}%
+ \else
+ \ifBR@verbose
+ \PackageInfo{backref}{Disabled back cite \string`#1\string'}%
+ \fi
+ \fi
\@esphack
}
@@ -2403,45 +2419,55 @@
\expandafter\pp@rangelink#1{\@labela}{\@labelb}{\relax}{\relax}{\relax}{\relax}\relax{\@linka}{\@linkb}%
\fi%
}
+ \def\backrefsectionsname{}%
\renewcommand{\Hy@backout}[1]{%
\@bsphack%
- \ifpp@detailedbr%
- \else%
- \ifpp@pagebackref%
- \def\pp@br@currentHref{page.\thepage}%
+ \ifBR@enable
+ \ifBR@verbose
+ \PackageInfo{backref}{Back cite \string`#1\string'}%
+ \fi
+ \ifpp@detailedbr%
\else%
- \def\pp@br@currentHref{\@currentHref}%
- \fi%
- \fi%
- \ifpp@pagebackref%
- \def\pp@string{\pp@br@pagestring~\thepage}%
- \else%
- \edef\pp@labelcaption{\@currentlabel}%
- \expandafter\@cref@gettype\cref@currentlabel\@nil{\pp@labeltype}%
- \@ifundefined{Cref@\pp@labeltype @name}%
- {%
- \PackageWarning{hypdvips}{\string\Cref\space reference format for label type `\pp@labeltype'\MessageBreak undefined in reference `\pp@labelcaption'.\MessageBreak Back-referencing to page `\thepage'.\MessageBreak}%
- \ifpp@detailedbr%
- \else%
+ \ifpp@pagebackref%
\def\pp@br@currentHref{page.\thepage}%
+ \else%
+ \def\pp@br@currentHref{\@currentHref}%
\fi%
- \def\pp@labelcaption{\thepage}%
- \def\pp@labelname{\pp@br@pagestring}%
- }%
- {%
- \def\pp@labelname{\csname Cref@\pp@labeltype @name\endcsname}%
- }%
- \ifx\pp@labelcaption\@empty%
- \def\pp@string{\pp@labelname}%
+ \fi%
+ \ifpp@pagebackref%
+ \def\pp@string{\pp@br@pagestring\space\thepage}%
\else%
- \def\pp@string{\pp@labelname~\pp@labelcaption}%
+ \edef\pp@labelcaption{\@currentlabel}%
+ \expandafter\@cref@gettype\cref@currentlabel\@nil{\pp@labeltype}%
+ \@ifundefined{Cref@\pp@labeltype @name}%
+ {%
+ \PackageWarning{hypdvips}{\string\Cref\space reference format for label type `\pp@labeltype'\MessageBreak undefined in reference `\pp@labelcaption'.\MessageBreak Back-referencing to page `\thepage'.\MessageBreak}%
+ \ifpp@detailedbr%
+ \else%
+ \def\pp@br@currentHref{page.\thepage}%
+ \fi%
+ \def\pp@labelcaption{\thepage}%
+ \def\pp@labelname{\pp@br@pagestring}%
+ }%
+ {%
+ \def\pp@labelname{\csname Cref@\pp@labeltype @name\endcsname}%
+ }%
+ \ifx\pp@labelcaption\@empty%
+ \def\pp@string{\pp@labelname}%
+ \else%
+ \def\pp@string{\pp@labelname\space\pp@labelcaption}%
+ \fi%
\fi%
- \fi%
- \protected@write\@auxout{}{%
- \string\@writefile{brf}{%
- \string\backcite{#1}{{\thepage}{\pp@string}{\pp@br@currentHref}}%
+ \protected@write\@auxout{}{%
+ \string\@writefile{brf}{%
+ \string\backcite{#1}{{\thepage}{\pp@string}{\pp@br@currentHref}}%
+ }%
}%
- }%
+ \else
+ \ifBR@verbose
+ \PackageInfo{backref}{Disabled back cite \string`#1\string'}%
+ \fi
+ \fi
\@esphack%
}%
}{}
@@ -2487,6 +2513,7 @@
}
\newcommand{\pp@UCenc}[2]{% arguments: result (=Unicode string), text
+ \HyPsd@LoadUnicode%
\ifHy@unicode%
\pdfstringdef#1{#2}%
\else%
@@ -3069,25 +3096,42 @@
}
\renewcommand{\contentsline}[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@@link{}{#4}{#2}
+ \hyper@@link{}{\Hy@tocdestname}{#2}
}{#3}%
\or % page
- \csname l@#1\endcsname{{#2}}{%
- \hyper@@link{}{#4}{#3}
- }%
+ \def\Hy@temp{#3}%
+ \ifx\Hy@temp\ltx@empty
+ \csname l@#1\endcsname{#2}{#3}%
+ \else
+ \csname l@#1\endcsname{{#2}}{%
+ \hyper@@link{}{\Hy@tocdestname}{#3}
+ }%
+ \fi
\else % all
- \csname l@#1\endcsname{%
- \hyper@@link{}{#4}{#2}
- }{%
- \hyper@@link{}{#4}{#3}
- }%
+ \def\Hy@temp{#3}%
+ \ifx\Hy@temp\ltx@empty
+ \csname l@#1\endcsname{%
+ \hyper@@link{}{\Hy@tocdestname}{#2}
+ }{}%
+ \else
+ \csname l@#1\endcsname{%
+ \hyper@@link{}{\Hy@tocdestname}{#2}
+ }{%
+ \hyper@@link{}{\Hy@tocdestname}{#3}
+ }%
+ \fi
\fi
\fi
}
@@ -3159,17 +3203,13 @@
\def\HyPL@SetPageLabels{}
\fi
-\let\pp@backup@Hy@backout\Hy@backout
-\newcommand{\pp@br@disable}{\let\Hy@backout\@gobble}
-\newcommand{\pp@br@enable}{\let\Hy@backout\pp@backup@Hy@backout}
-
\ifpp@lofbr
\else
\let\pp@backup@listoffigures\listoffigures%
\renewcommand{\listoffigures}{%
- \pp@br@disable%
+ \backrefsetup{disable}%
\pp@backup@listoffigures%
- \pp@br@enable%
+ \backrefsetup{enable}%
}
\fi
@@ -3177,9 +3217,9 @@
\else
\let\pp@backup@listoftables\listoftables%
\renewcommand{\listoftables}{%
- \pp@br@disable%
+ \backrefsetup{disable}%
\pp@backup@listoftables%
- \pp@br@enable%
+ \backrefsetup{enable}%
}
\fi
@@ -3187,9 +3227,9 @@
\else
\let\pp@backup@tableofcontents\tableofcontents%
\renewcommand{\tableofcontents}{%
- \pp@br@disable%
+ \backrefsetup{disable}%
\pp@backup@tableofcontents%
- \pp@br@enable%
+ \backrefsetup{enable}%
}
\fi
@@ -3452,9 +3492,9 @@
\else
\let\pp@backup@listofattachments\listofattachments%
\renewcommand{\listofattachments}{%
- \pp@br@disable%
+ \backrefsetup{disable}%
\pp@backup@listofattachments%
- \pp@br@enable%
+ \backrefsetup{enable}%
}
\fi
@@ -3582,23 +3622,6 @@
\fi%
}
-\def\Acrobatmenu#1#2{%
- \Hy@Acrobatmenu{#1}{#2}{%
- \pp@PSenc\pp@menustring{#1}%
- \pdfmark[{#2}]{%
- linktype=menu,%
- pdfmark=/ANN,%
- AcroHighlight=\@pdfhighlight,%
- Border=\@pdfborder,%
- BorderStyle=\@pdfborderstyle,%
- Color=\@menubordercolor,%
- Action={<< /Subtype /Named /N (\pp@menustring) cvn >>},%
- Subtype=/Link,%
- PDFAFlags=4%
- }%
- }%
-}
-
\edef\@tablenotecolor{\@linkcolor}
\edef\@tablenotebordercolor{\@linkbordercolor}
\@ifpackageloaded{threeparttable}{
@@ -3681,6 +3704,15 @@
\pp@backup@@startcolumn%
}
+\@ifpackageloaded{acronym}
+ {
+ \AtBeginDocument{%
+ \let\pp@backup@AC@phantomsection\AC@phantomsection%
+ \def\AC@phantomsection{\ifx\pp@activerect\pp@false\pp@backup@AC@phantomsection\fi}%
+ \def\AC@hypertarget#1#2{\hyper@anchorstart{#1}\hyper@anchorend#2}%
+ }
+ }
+
%%
%% Exported commands:
%%