summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-04-20 21:33:37 +0000
committerKarl Berry <karl@freefriends.org>2008-04-20 21:33:37 +0000
commitfbbc434924c127c9b89abff25fbdfc4f387fcd47 (patch)
tree6cc8f38565f80b2d6b16b18f37ea267b029d9586 /Master/texmf-dist/source
parentb2da44db5b6071ae3d6320974e527a2143043793 (diff)
hyperref update (20apr08)
git-svn-id: svn://tug.org/texlive/trunk@7554 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/hyperref/hyperref.dtx299
1 files changed, 290 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
index f38a70fe03c..41e4538f7b2 100644
--- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
@@ -39,7 +39,7 @@
%<puenc>\ProvidesFile{puenc.def}
%<puvnenc>\ProvidesFile{puvnenc.def}
%<puarenc>\ProvidesFile{puarenc.def}
-%<!none> [2008/04/17 v6.77q
+%<!none> [2008/04/20 v6.77s
%<package> Hypertext links for LaTeX]
%<nohyperref> Dummy hyperref (SR)]
%<driver> Hyperref documentation driver file]
@@ -116,7 +116,7 @@
\end{document}
%</driver>
% \fi
-% \CheckSum{22578}
+% \CheckSum{22824}
%
% \MakeShortVerb{|}
% \StopEventually{}
@@ -609,6 +609,7 @@
\newif\ifHy@nesting
\newif\ifHy@newwindowset
\newif\ifHy@newwindow
+\newif\ifHy@ocgcolorlinks
\newif\ifHy@pageanchor
\newif\ifHy@pagelabels
\newif\ifHy@pdfpagehidden
@@ -4599,6 +4600,21 @@
\let\@pdfborderstyle\@empty
\fi
}
+\define@key{Hyp}{ocgcolorlinks}[true]{%
+ \Hy@boolkey{ocgcolorlinks}{#1}%
+}
+\AtBeginDocument{%
+ \begingroup
+ \@ifundefined{OBJ@OCG@view}{%
+ \ifHy@ocgcolorlinks
+ \Hy@Warning{%
+ Driver does not support `ocgcolorlinks',\MessageBreak
+ using `colorlinks' instead%
+ }%
+ \fi
+ }{}%
+ \endgroup
+}
\define@key{Hyp}{frenchlinks}[true]{%
\Hy@boolkey{frenchlinks}{#1}%
}
@@ -5127,7 +5143,6 @@
\Hy@DisableOption{nolinks}%
\Hy@DisableOption{final}%
}
-\Hy@DisableOption{pdfversion}%
% \end{macrocode}
%
% \subsection{PDF/A}
@@ -5138,6 +5153,7 @@
%
% \begin{macrocode}
\ifHy@pdfa
+ \setkeys{Hyp}{pdfversion=1.4}%
\def\Hy@Acrobatmenu#1#2{%
\leavevmode
\begingroup
@@ -5408,6 +5424,9 @@
\Hy@DisableOption{latex2html}
\Hy@DisableOption{ps2pdf}
\Hy@DisableOption{xetex}
+\AtEndOfPackage{%
+ \Hy@DisableOption{pdfversion}%
+}
% \end{macrocode}
%
% \subsubsection{Bookmarks}
@@ -5451,6 +5470,20 @@
% the color specification.
% \begin{macrocode}
\AtBeginDocument{%
+ \ifHy@ocgcolorlinks
+ \setkeys{Hyp}{colorlinks}%
+ \ifHy@pdfa
+ \Hy@Warning{%
+ PDF/A: Optional Content Groups are prohibited,\MessageBreak
+ using `colorlinks' instead of `ocgcolorlinks'%
+ }%
+ \Hy@ocgcolorlinksfalse
+ \fi
+ \fi
+ \ifHy@ocgcolorlinks
+ \else
+ \Hy@DisableOption{ocgcolorlinks}%
+ \fi
\ifHy@colorlinks
\ifHy@typexml
\else
@@ -5458,7 +5491,7 @@
\fi
\def\Hy@colorlink#1{%
\begingroup
- \HyColor@UseColor#1%
+ \HyColor@UseColor#1%
}%
\def\Hy@endcolorlink{\endgroup}%
\Hy@Info{Link coloring ON}%
@@ -6881,6 +6914,16 @@
\else
\Hy@Info{Link coloring OFF}%
\fi
+\ifHy@ocgcolorlinks
+ \Hy@Info{Link coloring with OCG ON}%
+\else
+ \Hy@Info{Link coloring with OCG OFF}%
+\fi
+\ifHy@pdfa
+ \Hy@Info{PDF/A mode ON}%
+\else
+ \Hy@Info{PDF/A mode OFF}%
+\fi
% \end{macrocode}
% \section{Low-level utility macros}
% We need unrestricted access to the |#|, |~| and |"| characters, so make
@@ -10020,6 +10063,11 @@
PDF version is not set, because pdfTeX is too old (<1.10a)%
}%
}{%
+ \ifHy@ocgcolorlinks
+ \ifnum\Hy@pdfminorversion<5 %
+ \setkeys{Hyp}{pdfversion=1.5}%
+ \fi
+ \fi
\ifHy@setpdfversion
\ifnum\Hy@pdfminorversion=\Hy@pdfversion\relax
\else
@@ -10031,8 +10079,113 @@
}%
\fi
\edef\Hy@pdfversion{\number\Hy@pdfminorversion}%
- \Hy@DisableOption{pdfversion}%
}
+\Hy@DisableOption{pdfversion}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifHy@ocgcolorlinks
+ \immediate\pdfobj{%
+ <<%
+ /Type/OCG%
+ /Name(View)%
+ /Usage<<%
+ /Print<<%
+ /PrintState/OFF%
+ >>%
+ /View<<%
+ /ViewState/ON%
+ >>%
+ >>%
+ >>%
+ }%
+ \edef\OBJ@OCG@view{\the\pdflastobj\space 0 R}%
+ \immediate\pdfobj{%
+ <<%
+ /Type/OCG%
+ /Name(Print)%
+ /Usage<<%
+ /Print<<%
+ /PrintState/ON%
+ >>%
+ /View<<%
+ /ViewState/OFF%
+ >>%
+ >>%
+ >>%
+ }%
+ \edef\OBJ@OCG@print{\the\pdflastobj\space 0 R}%
+ \immediate\pdfobj{%
+ [%
+ \OBJ@OCG@view\space\OBJ@OCG@print
+ ]%
+ }%
+ \edef\OBJ@OCGs{\the\pdflastobj\space 0 R}%
+ \pdfcatalog{%
+ /OCProperties<<%
+ /OCGs \OBJ@OCGs
+ /D<<%
+ /OFF[\OBJ@OCG@print]%
+ /AS[%
+ <<%
+ /Event/View%
+ /OCGs \OBJ@OCGs
+ /Category[/View]%
+ >>%
+ <<%
+ /Event/Print%
+ /OCGs \OBJ@OCGs
+ /Category[/Print]%
+ >>%
+ <<%
+ /Event/Export%
+ /OCGs \OBJ@OCGs
+ /Category[/Print]%
+ >>%
+ ]%
+ >>%
+ >>%
+ }%
+ \begingroup
+ \edef\x{\endgroup
+ \pdfpageresources{%
+ /Properties<<%
+ /OCView \OBJ@OCG@view
+ /OCPrint \OBJ@OCG@print
+ >>%
+ }%
+ }%
+ \x
+ \AtBeginDocument{%
+ \def\Hy@colorlink#1{%
+ \begingroup
+ \ifHy@ocgcolorlinks
+ \def\Hy@ocgcolor{#1}%
+ \setbox0=\color@hbox
+ \else
+ \HyColor@UseColor#1%
+ \fi
+ }%
+ \def\Hy@endcolorlink{%
+ \ifHy@ocgcolorlinks
+ \color@endbox
+ \mbox{%
+ \pdfliteral page{/OC/OCPrint BDC}%
+ \rlap{\copy0}%
+ \pdfliteral page{EMC/OC/OCView BDC}%
+ \begingroup
+ \expandafter\HyColor@UseColor\Hy@ocgcolor
+ \box0 %
+ \endgroup
+ \pdfliteral page{EMC}%
+ }%
+ \fi
+ \endgroup
+ }%
+ }%
+\else
+ \Hy@DisableOption{ocgcolorlinks}%
+\fi
% \end{macrocode}
%
% First, allow for some changes and additions to pdftex syntax:
@@ -10128,7 +10281,8 @@
}{%
\edef\CurrentBorderColor{\csname @#1bordercolor\endcsname}%
}%
- \find@pdflink{#1}{#2}#3\close@pdflink
+ \find@pdflink{#1}{#2}#3%
+ \close@pdflink
}
\let\CurrentBorderColor\@linkbordercolor
\def\hyper@linkurl#1#2{%
@@ -10635,7 +10789,8 @@
>>%
}%
\relax
- \Hy@colorlink\@menucolor#2\close@pdflink
+ \Hy@colorlink\@menucolor#2%
+ \close@pdflink
}%
}
%</pdftex>
@@ -11101,6 +11256,115 @@
\def\hyper@anchorend{%
\Hy@activeanchorfalse
}
+% \end{macrocode}
+% \begin{macrocode}
+\ifHy@ocgcolorlinks
+ \def\OBJ@OCG@view{@OCG@view}%
+ \@pdfm@mark{%
+ obj \OBJ@OCG@view <<%
+ /Type/OCG%
+ /Name(View)%
+ /Usage<<%
+ /Print<<%
+ /PrintState/OFF%
+ >>%
+ /View<<%
+ /ViewState/ON%
+ >>%
+ >>%
+ >>%
+ }%
+ \@pdfm@mark{close \OBJ@OCG@view}%
+ \def\OBJ@OCG@print{@OCG@print}%
+ \@pdfm@mark{%
+ obj \OBJ@OCG@print <<%
+ /Type/OCG%
+ /Name(Print)%
+ /Usage<<%
+ /Print<<%
+ /PrintState/ON%
+ >>%
+ /View<<%
+ /ViewState/OFF%
+ >>%
+ >>%
+ >>%
+ }%
+ \@pdfm@mark{close \OBJ@OCG@print}%
+ \def\OBJ@OCGs{@OCGs}%
+ \@pdfm@mark{%
+ obj \OBJ@OCGs [%
+ \OBJ@OCG@view\space\OBJ@OCG@print
+ ]%
+ }%
+ \@pdfm@mark{close \OBJ@OCGs}%
+ \@pdfm@mark{%
+ put @catalog <<%
+ /OCProperties<<%
+ /OCGs \OBJ@OCGs
+ /D<<%
+ /OFF[\OBJ@OCG@print]%
+ /AS[%
+ <<%
+ /Event/View%
+ /OCGs \OBJ@OCGs
+ /Category[/View]%
+ >>%
+ <<%
+ /Event/Print%
+ /OCGs \OBJ@OCGs
+ /Category[/Print]%
+ >>%
+ <<%
+ /Event/Export%
+ /OCGs \OBJ@OCGs
+ /Category[/Print]%
+ >>%
+ ]%
+ >>%
+ >>%
+ >>%
+ }%
+ \@pdfm@mark{%
+ put @resources <<%
+ /Properties<<%
+ /OCView \OBJ@OCG@view
+ /OCPrint \OBJ@OCG@print
+ >>%
+ >>%
+ }%
+ \AtBeginDocument{%
+ \def\Hy@colorlink#1{%
+ \begingroup
+ \ifHy@ocgcolorlinks
+ \def\Hy@ocgcolor{#1}%
+ \setbox0=\color@hbox
+ \else
+ \HyColor@UseColor#1%
+ \fi
+ }%
+ \def\Hy@endcolorlink{%
+ \ifHy@ocgcolorlinks
+ \color@endbox
+ \mbox{%
+ \@pdfm@mark{content /OC/OCPrint BDC}%
+ \rlap{\copy0}%
+ \@pdfm@mark{content EMC/OC/OCView BDC}%
+ \begingroup
+ \expandafter\HyColor@UseColor\Hy@ocgcolor
+ \box0 %
+ \endgroup
+ \@pdfm@mark{content EMC}%
+ }%
+ \fi
+ \endgroup
+ }%
+ }%
+\else
+ \Hy@DisableOption{ocgcolorlinks}%
+\fi
+% \end{macrocode}
+% \begin{macrocode}
\def\Hy@undefinedname{UNDEFINED}
\def\hyper@linkstart#1#2{%
\protected@edef\Hy@testname{#2}%
@@ -12891,12 +13155,12 @@
% definitions in a moment.
% \begin{macrocode}
%<*dvips>
+\def\literalps@out#1{\special{ps:SDict begin #1 end}}%
+\def\headerps@out#1{\special{! #1}}%
\input{pdfmark.def}%
\ifx\@pdfproducer\relax
\def\@pdfproducer{dvips + Distiller}%
\fi
-\def\literalps@out#1{\special{ps:SDict begin #1 end}}%
-\def\headerps@out#1{\special{! #1}}%
\providecommand*\@pdfborder{0 0 1}
\providecommand*\@pdfborderstyle{}
\providecommand*\@pdfview{XYZ}
@@ -17046,6 +17310,23 @@
\DeclareTextCommand{\guilsinglleft}{PU}{\9040\071} % guilsinglleft
\DeclareTextCommand{\guilsinglright}{PU}{\9040\072} % guilsinglright
\DeclareTextCommand{\textfractionmark}{PU}{\9040\104} % fraction slash
+\DeclareTextCommand{\textzerosuperior}{PU}{\9040\160} % superscript zero
+\DeclareTextCommand{\textfoursuperior}{PU}{\9040\164} % superscript four
+\DeclareTextCommand{\textfivesuperior}{PU}{\9040\165} % superscript five
+\DeclareTextCommand{\textsixsuperior}{PU}{\9040\166} % superscript six
+\DeclareTextCommand{\textsevensuperior}{PU}{\9040\167} % superscript seven
+\DeclareTextCommand{\texteightsuperior}{PU}{\9040\170} % superscript eight
+\DeclareTextCommand{\textninesuperior}{PU}{\9040\171} % superscript nine
+\DeclareTextCommand{\textzeroinferior}{PU}{\9040\200} % subscript zero
+\DeclareTextCommand{\textoneinferior}{PU}{\9040\201} % subscript one
+\DeclareTextCommand{\texttwoinferior}{PU}{\9040\202} % subscript two
+\DeclareTextCommand{\textthreeinferior}{PU}{\9040\203} % subscript three
+\DeclareTextCommand{\textfourinferior}{PU}{\9040\204} % subscript four
+\DeclareTextCommand{\textfiveinferior}{PU}{\9040\205} % subscript five
+\DeclareTextCommand{\textsixinferior}{PU}{\9040\206} % subscript six
+\DeclareTextCommand{\textseveninferior}{PU}{\9040\207} % subscript seven
+\DeclareTextCommand{\texteightinferior}{PU}{\9040\210} % subscript eight
+\DeclareTextCommand{\textnineinferior}{PU}{\9040\211} % subscript nine
\DeclareTextCommand{\texteuro}{PU}{\9040\254} % Euro
\DeclareTextCommand{\textcelsius}{PU}{\9041\003}
\DeclareTextCommand{\textnumero}{PU}{\9041\026}