diff options
author | Karl Berry <karl@freefriends.org> | 2007-06-01 16:58:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-06-01 16:58:52 +0000 |
commit | 4d027ddb699c57025992eccbdd3cef0ec2836ee1 (patch) | |
tree | 7c9a8e252aa5133aa4c986aa37af12b8484ec44b /Master/texmf-dist/source/latex/hyperref | |
parent | ab8a652a0280de02179bbbdd79296f2bbd4073f7 (diff) |
hyperref update (30may07)
git-svn-id: svn://tug.org/texlive/trunk@4399 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/hyperref')
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/backref.dtx | 16 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/bmhydoc.sty | 59 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/doc/manual.tex | 45 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/doc/options.tex | 3 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/hyperref.dtx | 3178 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/nameref.dtx | 261 |
6 files changed, 2242 insertions, 1320 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/backref.dtx b/Master/texmf-dist/source/latex/hyperref/backref.dtx index b53ca5ea692..61b93a4f782 100644 --- a/Master/texmf-dist/source/latex/hyperref/backref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/backref.dtx @@ -22,36 +22,36 @@ %<driver>\ProvidesFile{backref.drv} % \fi % \ProvidesFile{backref.dtx} - [2006/10/06 v1.27 Bibliographical back referencing] + [2006/10/06 v1.27 Bibliographical back referencing]% % % \CheckSum{550} % % \iffalse %<*driver> \documentclass{ltxdoc} -\IfFileExists{bmhydoc.sty}{\usepackage{bmhydoc}}{} \usepackage[numbered]{hypdoc} +\usepackage{bmhydoc} \usepackage{backref} \EnableCrossrefs \CodelineIndex \begin{document} - \GetFileInfo{backref.sty} + \GetFileInfo{backref.sty}% \title{% Back referencing from bibliographical citations% \thanks{% - This file has version number \fileversion, + This file has version number \fileversion, % last revised \filedate.% }% - } - \author{David Carlisle and Sebastian Rahtz} - \date{\filedate} + }% + \author{David Carlisle and Sebastian Rahtz}% + \date{\filedate}% \maketitle \makeatletter \@ifundefined{HyperrefOverview}{}{% \HyperrefOverview*% }% \tableofcontents - \DocInput{backref.dtx} + \DocInput{backref.dtx}% \PrintIndex \end{document} %</driver> diff --git a/Master/texmf-dist/source/latex/hyperref/bmhydoc.sty b/Master/texmf-dist/source/latex/hyperref/bmhydoc.sty index 15f183128b0..dc9d5d847fa 100644 --- a/Master/texmf-dist/source/latex/hyperref/bmhydoc.sty +++ b/Master/texmf-dist/source/latex/hyperref/bmhydoc.sty @@ -1,6 +1,6 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{bmhydoc} - [2006/02/08 Bookmark section with hyperref documentation (HO)] + [2007/03/19 Bookmark section with hyperref documentation (HO)] % This package adds bookmark entries that are added at the end % and lists and links the PDF files of the hyperref documentation. @@ -13,36 +13,41 @@ % 2006/02/08 % * Comments added % * \HyperrefOverview +% 2007/03/19 +% * Use package bookmark that also support other drivers +% than pdfTeX. -\RequirePackage{ifpdf} -\ifpdf -\else - \expandafter\endinput -\fi +\RequirePackage[atend]{bookmark}[2007/04/04] -\newcommand*{\@bmhydoc}[3][0]{% - \pdfoutline - attr {/C[0 0 1]} - user {% - <<% - /S/GoToR% - /F(#2)% - /D[0/XYZ null null null]% - >>% - } - count #1 - {#3}\relax +\BookmarkAtEnd{% + \bookmarksetup{% + startatroot,% + open,% + openlevel=2% + }% +} + +\newcommand*{\@bmhydoc}[4][]{% + \BookmarkAtEnd{% + \bookmark[% + gotor={#3},% + color={[rgb]{0,0,1}},% + level={#2},% + view={XYZ null null null},% + #1,% + ]{#4}% + }% } \AtEndDocument{% - \@bmhydoc[-8]{manual.pdf}{Hyperref manual} - \@bmhydoc{README.pdf}{README} - \@bmhydoc{ChangeLog.pdf}{ChangeLog} - \@bmhydoc{options.pdf}{Options} - \@bmhydoc[1]{slides.pdf}{Bookmark talk, slides} - \@bmhydoc{paper.pdf}{Bookmark talk, paper} - \@bmhydoc[2]{hyperref.pdf}{Sources: hyperref.dtx} - \@bmhydoc{backref.pdf}{backref.dtx} - \@bmhydoc{nameref.pdf}{nameref.dtx} + \@bmhydoc[open=false]{0}{manual.pdf}{Hyperref manual} + \@bmhydoc{1}{README.pdf}{README} + \@bmhydoc{1}{ChangeLog.pdf}{ChangeLog} + \@bmhydoc{1}{options.pdf}{Options} + \@bmhydoc{1}{slides.pdf}{Bookmark talk, slides} + \@bmhydoc{2}{paper.pdf}{Bookmark talk, paper} + \@bmhydoc{1}{hyperref.pdf}{Sources: hyperref.dtx} + \@bmhydoc{2}{backref.pdf}{backref.dtx} + \@bmhydoc{2}{nameref.pdf}{nameref.dtx} } \newcommand*{\HyperrefOverview}{% diff --git a/Master/texmf-dist/source/latex/hyperref/doc/manual.tex b/Master/texmf-dist/source/latex/hyperref/doc/manual.tex index 6144a7dc3b2..604a4feb0a0 100644 --- a/Master/texmf-dist/source/latex/hyperref/doc/manual.tex +++ b/Master/texmf-dist/source/latex/hyperref/doc/manual.tex @@ -94,6 +94,7 @@ \usepackage{array,longtable} \usepackage[T1]{fontenc} +\usepackage{lmodern} \newcommand*{\Quote}[1]{\textquotedblleft#1\textquotedblright} @@ -399,8 +400,7 @@ anchorcolor & color & black & Color for anchor text. \\ citecolor & color & green & Color for bibliographical citations in text. \\ filecolor & color & magenta & Color for URLs which open local files. \\ menucolor & color & red & Color for Acrobat menu items. \\ -pagecolor & color & red & Color for links to other pages, but - currently unused. \\ +runcolor & color & filecolor & Color for run links (launch annotations). \\ urlcolor & color & cyan & Color for linked URLs. \\ frenchlinks & boolean & false & use small caps instead of color for links \end{longtable} \smallskip @@ -428,7 +428,7 @@ CJKbookmarks & boolean & false & during the creation of bookmarks, it simply replaces CJK's macros with special versions which expand to the corresponding character codes. Note that without the `unicode' option of hyperref you get - PDF files which actually violate the PDF specification because + PDF files which actually violate the PDF specification because non-Unicode character codes are used -- some PDF readers localized for CJK languages (most notably Acroread itself) support this. Also note that option `CJKbookmarks' cannot be used together @@ -444,7 +444,6 @@ citebordercolor & RGB color & 0 1 0 & The color of the box around citations filebordercolor & RGB color & 0 .5 .5 & The color of the box around links to files \\ linkbordercolor & RGB color & 1 0 0 & The color of the box around normal links \\ menubordercolor & RGB color & 1 0 0 & The color of the box around Acrobat menu links \\ -pagebordercolor & RGB color & 1 1 0 & The color of the box around links to pages \\ urlbordercolor & RGB color & 0 1 1 & The color of the box around links to URLs \\ runbordercolor & RGB color & 0 .7 .7 & color of border around `run' links \\ pdfborder & & 0 0 1 & The style of box around links; defaults to a box with lines of 1pt thickness, @@ -621,9 +620,6 @@ naturalnames & \textit{false} & use \LaTeX-computed names for link nesting & \textit{false} & allow nesting of links \\ pageanchor & \textit{true} & put an anchor on every page \\ pagebackref & \textit{false} & backreference by page number \\ -pagebordercolor & \textit{1 1 0} & color of border around page links \\ -pagecolor & \textit{red} & color of page links, but - currently unused \\ pdfauthor & \textit{empty} & text for PDF Author field \\ pdfborder & \textit{0 0 1} & width of PDF link border \\ & \textit{0 0 0} & (\texttt{colorlinks)} \\ @@ -674,6 +670,7 @@ plainpages & \textit{false} & do page number anchors as plain ar ps2pdf & & use \textsf{ps2pdf} backend \\ raiselinks & \textit{false} & raise up links (for \textsf{Hyper\TeX} backend) \\ runbordercolor & \textit{0 .7 .7} & color of border around `run' links \\ +runcolor & \textit{filecolor} & color of `run' links\\ setpagesize & \textit{true} & set page size by special driver commands \\ tex4ht & & use \textsf{\TeX4ht} backend \\ textures & & use \textsf{Textures} backend \\ @@ -830,11 +827,31 @@ For each macro below, \textsf{hyperref} checks \ci{*autorefname} before \ci{paragraphname} & paragraph \\ \ci{Hfootnotename} & footnote \\ \ci{AMSname} & Equation \\ -\ci{theoremname} & Theorem +\ci{theoremname} & Theorem\\ +\ci{page} & page\\ \end{longtable} +Example for a redefinition if \textsf{babel} is used: +\begin{quote} +\begin{verbatim} +\usepackage[ngerman]{babel} +\addto\extrasngerman{% + \def\subsectionautorefname{Unterkapitel}% +} +\end{verbatim} +\end{quote} + +\begin{cmdsyntax} +\ci{autopageref}\verb|{|\emph{label}\verb|}| +\end{cmdsyntax} + +\noindent +It replaces \verb|\pageref| and adds the name for page in front of +the page reference. First \ci{pageautorefname} is checked before +\ci{pagename}. + For instances where you want a reference to use the correct counter, but -not to create a link, there are two starred forms: +not to create a link, there are starred forms: \begin{cmdsyntax} \ci{ref*}\verb|{|\emph{label}\verb|}| @@ -844,6 +861,14 @@ not to create a link, there are two starred forms: \ci{pageref*}\verb|{|\emph{label}\verb|}| \end{cmdsyntax} +\begin{cmdsyntax} +\ci{autoref*}\verb|{|\emph{label}\verb|}| +\end{cmdsyntax} + +\begin{cmdsyntax} +\ci{autopageref*}\verb|{|\emph{label}\verb|}| +\end{cmdsyntax} + A typical use would be to write \begin{verbatim} \hyperref[other]{that nice section (\ref*{other}) we read before} @@ -1132,6 +1157,8 @@ password & boolean & false & text field is `password' style \\ popdown & boolean & false & choice list is `popdown' style \\ radio & boolean & false & choice list is `radio' style \\ readonly & boolean & false & field is readonly \\ +rotation & number & 0 & rotation of the widget annotation + (degree, counterclockwise, multiple of 90)\\ tabkey & & & (as per HTML) \\ validate & & & JavaScript code to validate the entry \\ value & & & initial value \\ diff --git a/Master/texmf-dist/source/latex/hyperref/doc/options.tex b/Master/texmf-dist/source/latex/hyperref/doc/options.tex index 833752a10fe..f70d862be48 100644 --- a/Master/texmf-dist/source/latex/hyperref/doc/options.tex +++ b/Master/texmf-dist/source/latex/hyperref/doc/options.tex @@ -68,8 +68,6 @@ naturalnames &use \LaTeX-computed names for links&false\\ nesting &allow nesting of links&false\\ pageanchor &put an anchor on every page&true\\ pagebackref &backreference by page number&false\\ -pagebordercolor &color of border around page links& 1 1 0\\ -pagecolor &color of page links&red\\ pdfauthor &text for PDF Author field&\optempty\\ pdfborder &width of PDF link border&0 0 1\\ &&0 0 0 \for{colorlinks}\\ @@ -111,6 +109,7 @@ plainpages &do page number anchors as plain arabic&true\\ ps2pdf &use ps2pdf backend\\ raiselinks &raise up links (for HyperTeX backend)&false\\ runbordercolor &color of border around `run' links& 0 .7 .7\\ +runcolor & color of `run' links& filecolor\\ setpagesize &set page size by special driver commands&true\\ tex4ht &use \TeX4ht backend\\ textures &use Textures backend\\ diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx index 5b2e8553914..858d82ba132 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> [2007/02/27 v6.75t +%<!none> [2007/05/29 v6.76g %<package> Hypertext links for LaTeX] %<nohyperref> Dummy hyperref (SR)] %<driver> Hyperref documentation driver file] @@ -64,16 +64,16 @@ %<puarenc> Hyperref: Additions to puenc.def for Arabi] %<*driver> \documentclass{ltxdoc} -\IfFileExists{bmhydoc.sty}{\usepackage{bmhydoc}}{} \usepackage{array,times} \def\ttdefault{cmtt} -\usepackage[ - colorlinks, +\usepackage[% + colorlinks,% hyperindex=false,% done by hypdoc - pdfusetitle, - pdfpagelabels + pdfusetitle,% + pdfpagelabels% ]{hyperref} \usepackage[numbered]{hypdoc} +\usepackage{bmhydoc} \pdfstringdefDisableCommands{\let\\\textbackslash}% \EnableCrossrefs \CodelineIndex @@ -81,13 +81,13 @@ % % title % - \GetFileInfo{hyperref.sty} - \title{Hypertext marks in \LaTeX} - \author{Sebastian Rahtz\\ - Email: \texttt{sebastian.rahtz@oucs.ox.ac.uk}\\[1.5ex] - Heiko Oberdiek\\ - Email: \texttt{oberdiek@uni-freiburg.de}} - \date{processed \today} + \GetFileInfo{hyperref.sty}% + \title{Hypertext marks in \LaTeX}% + \author{Sebastian Rahtz\\% + Email: \texttt{sebastian.rahtz@oucs.ox.ac.uk}\\[1.5ex]% + Heiko Oberdiek\\% + Email: \texttt{oberdiek@uni-freiburg.de}}% + \date{processed \today}% \maketitle % % overview @@ -96,19 +96,19 @@ \@ifundefined{HyperrefOverview}{}{% \HyperrefOverview\relax \newpage - } + }% % % table of contents % - \section{\contentsname} + \section{\contentsname}% \makeatletter - \@starttoc{toc} + \@starttoc{toc}% \newpage % % source code documentation % \let\Email\texttt - \DocInput{hyperref.dtx} + \DocInput{hyperref.dtx}% % % index % @@ -116,7 +116,7 @@ \end{document} %</driver> % \fi -% \CheckSum{19909} +% \CheckSum{20970} % % \MakeShortVerb{|} % \StopEventually{} @@ -185,7 +185,7 @@ % \begin{macro}{\HyC@checkPackage} % \begin{macrocode} \def\HyC@checkPackage{% - \typeout{} + \typeout{}% \begingroup \edef\x{\endgroup \noexpand\RequirePackage{\HyC@package}% @@ -423,7 +423,8 @@ % The result, if the check succeeds. % \begin{macrocode} \def\HyC@checkOk#1{% - \typeout{\space\space`\HyC@string#1' ok.}} + \typeout{\space\space`\HyC@string#1' ok.}% +} % \end{macrocode} % \end{macro} % \begin{macro}{\HyC@checkFailed} @@ -476,10 +477,10 @@ \def\Hy@SetCatcodes{% \@makeother\`% \@makeother\=% - \catcode`\$=3 - \catcode`\&=4 - \catcode`\^=7 - \catcode`\_=8 + \catcode`\$=3 % + \catcode`\&=4 % + \catcode`\^=7 % + \catcode`\_=8 % \@makeother\|% \@makeother\:% \@makeother\(% @@ -539,6 +540,7 @@ % with the later releases! % \begin{macrocode} \RequirePackage{keyval}[1997/11/10] +\RequirePackage{hycolor} \def\Hy@Warning#1{\PackageWarning{hyperref}{#1}} \def\Hy@WarningNoLine#1{\PackageWarningNoLine{hyperref}{#1}} \def\Hy@Info#1{\PackageInfo{hyperref}{#1}} @@ -682,6 +684,11 @@ % \end{macrocode} % \end{macro} % \end{macro} +% \begin{macrocode} +\let\Hy@ReturnEnd\@empty +\long\def\Hy@ReturnAfterFiFiEnd#1\fi#2\Hy@ReturnEnd{\fi\fi#1} +\long\def\Hy@ReturnAfterElseFiFiEnd#1\else#2\Hy@ReturnEnd{\fi\fi#1} +% \end{macrocode} % % \subsection{Babel's protection of shorthand characters} % @@ -749,7 +756,7 @@ \HyCal@scan#2\hypercalcbp\@nil \expandafter\endgroup \expandafter\def\expandafter#1\expandafter{\the\toks@}% - } + }% \def\HyCal@scan#1\hypercalcbp#2\@nil{% \toks@\expandafter{\the\toks@ #1}% \ifx\\#2\\% @@ -758,7 +765,7 @@ \HyCal@do#2\@nil }% \fi - } + }% \def\HyCal@do#1#2\@nil{% \@ifpackageloaded{calc}{}{% \Hy@Warning{% @@ -775,12 +782,12 @@ }% }\x \HyCal@scan#2\@nil - } + }% \else \def\hypercalcbp#1{% \strip@pt\dimexpr 0.99626401\dimexpr #1\relax\relax - } - \def\hypercalcbpdef{\def} + }% + \def\hypercalcbpdef{\def}% \fi % \end{macrocode} % \end{macro} @@ -1042,6 +1049,7 @@ \@ifundefined{language@group}{}{% \csname HyPsd@babel@\language@group\endcsname }% + \HyPsd@GreekPatch % \end{macrocode} % % \begin{macrocode} @@ -1704,109 +1712,234 @@ % % Nothing to do for english. % \begin{macrocode} -\@ifpackagewith{babel}{danish}{% +\@ifundefined{danish@sh@"@sel}{}{% \def\HyPsd@babel@danish{% \declare@shorthand{danish}{"|}{}% \declare@shorthand{danish}{"~}{-}% }% -}{} -\Hy@nextfalse -\@ifpackagewith{babel}{dutch}{\Hy@nexttrue}{}% -\@ifpackagewith{babel}{afrikaans}{\Hy@nexttrue}{}% -\ifHy@next +} +\@ifundefined{dutch@sh@"@sel}{}{% \def\HyPsd@babel@dutch{% \declare@shorthand{dutch}{"|}{}% \declare@shorthand{dutch}{"~}{-}% }% -\fi -\@ifpackagewith{babel}{finnish}{% +} +\@ifundefined{finnish@sh@"@sel}{}{% \def\HyPsd@babel@finnish{% \declare@shorthand{finnish}{"|}{}% }% -}{} -\Hy@nextfalse -\@ifpackagewith{babel}{frenchb}{\Hy@nexttrue}{} -\@ifpackagewith{babel}{francais}{\Hy@nexttrue}{} -\ifHy@next +} +\@ifundefined{french@sh@:@sel}{}{% \def\HyPsd@babel@frenchb{% \def\guill@spacing{ }% }% -\fi -\Hy@nextfalse -\@ifpackagewith{babel}{german}{\Hy@nexttrue}{}% -\@ifpackagewith{babel}{germanb}{\Hy@nexttrue}{}% -\@ifpackagewith{babel}{austrian}{\Hy@nexttrue}{}% -\ifHy@next +} +\@ifundefined{german@sh@"@sel}{}{% \def\HyPsd@babel@german{% \declare@shorthand{german}{"f}{f}% \declare@shorthand{german}{"|}{}% \declare@shorthand{german}{"~}{-}% }% -\fi -\Hy@nextfalse -\@ifpackagewith{babel}{ngerman}{\Hy@nexttrue}{}% -\@ifpackagewith{babel}{ngermanb}{\Hy@nexttrue}{}% -\@ifpackagewith{babel}{naustrian}{\Hy@nexttrue}{}% -\ifHy@next - \def\HyPsd@babel@ngerman{% - \declare@shorthand{german}{"|}{}% - \declare@shorthand{german}{"~}{-}% +} +\@ifundefined{macedonian@sh@"@sel}{}{% + \def\HyPsd@babel@macedonian{% + \declare@shorthand{macedonian}{"|}{}% + \declare@shorthand{macedonian}{"~}{-}% }% -\fi -\Hy@nextfalse -\@ifpackagewith{babel}{usorbian}{\Hy@nexttrue}{}% -\@ifpackagewith{babel}{uppersorbian}{\Hy@nexttrue}{}% -\ifHy@next - \def\HyPsd@babel@usorbian{% - \declare@shorthand{usorbian}{"f}{f}% - \declare@shorthand{usorbian}{"|}{}% +}{} +\@ifundefined{ngerman@sh@"@sel}{}{% + \def\HyPsd@babel@ngerman{% + \declare@shorthand{ngerman}{"|}{}% + \declare@shorthand{ngerman}{"~}{-}% }% -\fi -\Hy@nextfalse -\@ifpackagewith{babel}{brazil}{\Hy@nexttrue}{}% -\@ifpackagewith{babel}{brazilian}{\Hy@nexttrue}{}% -\@ifpackagewith{babel}{portuges}{\Hy@nexttrue}{}% -\@ifpackagewith{babel}{portuguese}{\Hy@nexttrue}{}% -\ifHy@next +} +\@ifundefined{portuges@sh@"@sel}{}{% \def\HyPsd@babel@portuges{% \declare@shorthand{portuges}{"|}{}% }% -\fi -\Hy@nextfalse -\@ifpackagewith{babel}{russian}{\Hy@nexttrue}{} -\@ifpackagewith{babel}{russianb}{\Hy@nexttrue}{} -\ifHy@next +} +\@ifundefined{russian@sh@"@sel}{}{% \def\HyPsd@babel@russian{% \declare@shorthand{russian}{"|}{}% \declare@shorthand{russian}{"~}{-}% }% -\fi -\Hy@nextfalse -\@ifpackagewith{babel}{ukrainian}{\Hy@nexttrue}{} -\@ifpackagewith{babel}{ukraineb}{\Hy@nexttrue}{} -\ifHy@next - \def\HyPsd@babel@ukrainian{% - \declare@shorthand{ukrainian}{"|}{}% - \declare@shorthand{ukrainian}{"~}{-}% - }% -\fi -\@ifpackagewith{babel}{macedonian}{% - \def\HyPsd@babel@macedonian{% - \declare@shorthand{macedonian}{"|}{}% - \declare@shorthand{macedonian}{"~}{-}% - }% -}{} -\@ifpackagewith{babel}{slovene}{% +} +\@ifundefined{slovene@sh@"@sel}{}{% \def\HyPsd@babel@slovene{% \declare@shorthand{slovene}{"|}{}% }% -}{} -\@ifpackagewith{babel}{swedish}{% +} +% \end{macrocode} +% Nested quoting environments are not supported (|<<|, |>>|). +% \begin{macrocode} +\@ifundefined{spanish@sh@>@sel}{}{% + \def\HyPsd@babel@spanish{% + \declare@shorthand{spanish}{<<}{\guillemotleft}% + \declare@shorthand{spanish}{>>}{\guillemotright}% + \declare@shorthand{spanish}{"=}{-}% + \declare@shorthand{spanish}{"~}{-}% + \declare@shorthand{spanish}{"!}{\textexclamdown}% + \declare@shorthand{spanish}{"?}{\textquestiondown}% + }% +} +\@ifundefined{swedish@sh@"@sel}{}{% \def\HyPsd@babel@swedish{% \declare@shorthand{swedish}{"|}{}% \declare@shorthand{swedish}{"~}{-}% }% -}{} +} +\@ifundefined{ukrainian@sh@"@sel}{}{% + \def\HyPsd@babel@ukrainian{% + \declare@shorthand{ukrainian}{"|}{}% + \declare@shorthand{ukrainian}{"~}{-}% + }% +} +\@ifundefined{usorbian@sh@"@sel}{}{% + \def\HyPsd@babel@usorbian{% + \declare@shorthand{usorbian}{"f}{f}% + \declare@shorthand{usorbian}{"|}{}% + }% +} +% \end{macrocode} +% \begin{macrocode} +\@ifundefined{greek@sh@\string~@sel}{% + \let\HyPsd@GreekPatch\@empty +}{% + \def\HyPsd@GreekPatch{% + \let\greeknumeral\HyPsd@greeknumeral + \let\Greeknumeral\HyPsd@Greeknumeral + }% +} +\def\HyPsd@greeknumeral#1{% + \HyPsd@GreekNum\@firstoftwo{#1}% +} +\def\HyPsd@Greeknumeral#1{% + \HyPsd@GreekNum\@secondoftwo{#1}% +} +\def\HyPsd@GreekNum#1#2{% + \ifHy@unicode + \ifnum#2<\@ne + \@arabic{#2}% + \else + \ifnum#2<1000000 % + \HyPsd@@GreekNum#1{#2}% + \else + \@arabic{#2}% + \fi + \fi + \else + \@arabic{#2}% + \fi +} +\def\HyPsd@@GreekNum#1#2{% + \ifnum#2<\@m + \ifnum#2<10 % + \expandafter\HyPsd@GreekNumI + \expandafter\@gobble\expandafter#1\number#2% + \else + \ifnum#2<100 % + \expandafter\HyPsd@GreekNumII + \expandafter\@gobble\expandafter#1\number#2% + \else + \expandafter\HyPsd@GreekNumIII + \expandafter\@gobble\expandafter#1\number#2% + \fi + \fi + \ifnum#2>\z@ + \textnumeralsigngreek + \fi + \else + \ifnum#2<\@M + \expandafter\HyPsd@GreekNumIV\expandafter#1\number#2% + \else + \ifnum#2<100000 % + \expandafter\HyPsd@GreekNumV\expandafter#1\number#2% + \else + \expandafter\HyPsd@GreekNumVI\expandafter#1\number#2% + \fi + \fi + \fi +} +\def\HyPsd@GreekNumI#1#2#3{% + #1{% + \ifnum#3>\z@ + \textnumeralsignlowergreek + \fi + }% + \expandafter#2% + \ifcase#3 % + {}{}% + \or\textalpha\textAlpha + \or\textbeta\textBeta + \or\textgamma\textGamma + \or\textdelta\textDelta + \or\textepsilon\textEpsilon + \or\textstigmagreek\textStigmagreek + \or\textzeta\textZeta + \or\texteta\textEta + \or\texttheta\textTheta + \else + {}{}% + \fi +} +\def\HyPsd@GreekNumII#1#2#3#4{% + #1{% + \ifnum#3>\z@ + \textnumeralsignlowergreek + \fi + }% + \expandafter#2% + \ifcase#3 % + {}{}% + \or\textiota\textIota + \or\textkappa\textKappa + \or\textlambda\textLambda + \or\textmu\textMu + \or\textnu\textNu + \or\textxi\textXi + \or\textomicron\textOmicron + \or\textpi\textPi + \or\textkoppagreek\textKoppagreek + \else + {}{}% + \fi + \HyPsd@GreekNumI#1#2#4% +} +\def\HyPsd@GreekNumIII#1#2#3#4#5{% + #1{% + \ifnum#3>\z@ + \textnumeralsignlowergreek + \fi + }% + \expandafter#2% + \ifcase#3 % + {}{}% + \or\textrho\textRho + \or\textsigma\textSigma + \or\texttau\textTau + \or\textupsilon\textUpsilon + \or\textphi\textPhi + \or\textchi\textChi + \or\textpsi\textPsi + \or\textomega\textOmega + \or\textsampigreek\textSampigreek + \else + {}{}% + \fi + \HyPsd@GreekNumII#1#2#4#5% +} +\def\HyPsd@GreekNumIV#1#2#3#4#5{% + \HyPsd@GreekNumI\@firstofone#1#2% + \HyPsd@@GreekNum#1{#3#4#5}% +} +\def\HyPsd@GreekNumV#1#2#3#4#5#6{% + \HyPsd@GreekNumII\@firstofone#1#2#3% + \HyPsd@@GreekNum#1{#4#5#6}% +} +\def\HyPsd@GreekNumVI#1#2#3#4#5#6#7{% + \HyPsd@GreekNumIII\@firstofone#1#2#3#4% + \HyPsd@@GreekNum#1{#5#6#7}% +} % \end{macrocode} % % \subsubsection{CJK bookmarks} @@ -1847,9 +1980,9 @@ \fi \HyPsd@CJKActiveChars }% - \count@=127 + \count@=127 % \@whilenum\count@<255 \do{% - \advance\count@ by 1 + \advance\count@ by 1 % \lccode`\~=\count@ \lowercase{% \toks@\expandafter{\the\toks@ ~}% @@ -2379,50 +2512,88 @@ % \end{macro} % % \subsubsection{Protecting spaces} +% +% \begin{macrocode} +\RequirePackage{etexcmds} +\ifetex@unexpanded + \expandafter\@secondoftwo +\else + \expandafter\@firstoftwo +\fi +{% +% \end{macrocode} +% % \begin{macro}{\HyPsd@ProtectSpaces} % \cs{HyPsd@ProtectSpaces} calls with the expanded -% string \cs{HyPsd@@ProtectSpaces}. The expanded string is +% string \cs{HyPsd@@ProtectSpacesFi}. The expanded string is % protected by \verb+|+ at the beginning and end of % the expanded string. Because of this there can be no group % at the beginning or end of the string and grouping characters -% are not removed by the call of \cs{HyPsd@@ProtectSpaces}. +% are not removed by the call of \cs{HyPsd@@ProtectSpacesFi}. % \begin{macrocode} -\def\HyPsd@ProtectSpaces#1{% - \expandafter\HyPsd@@ProtectSpaces - \expandafter|\expandafter\@empty#1| \HyPsd@End#1% -} + \def\HyPsd@ProtectSpaces#1{% + \iftrue + \expandafter\HyPsd@@ProtectSpacesFi + \expandafter|\expandafter\@empty#1| \HyPsd@End#1% + \fi + }% % \end{macrocode} % \end{macro} -% \begin{macro}{\HyPsd@@ProtectSpaces} +% \begin{macro}{\HyPsd@@ProtectSpacesFi} % The string can contain command tokens, so it is better % to use an \cs{def} instead of an \cs{edef}. % \begin{macrocode} -\def\HyPsd@@ProtectSpaces#1 #2\HyPsd@End#3{% - \ifx\scrollmode#2\scrollmode - \HyPsd@RemoveMask#1\HyPsd@End#3% - \else - \gdef#3{#1\HyPsd@UnexpandableSpace#2}% - \Hy@ReturnAfterFi{% - \expandafter\HyPsd@@ProtectSpaces#3\HyPsd@End#3% - }% - \fi -} + \def\HyPsd@@ProtectSpacesFi#1 #2\HyPsd@End#3\fi{% + \fi + \ifx\scrollmode#2\scrollmode + \HyPsd@RemoveMask#1\HyPsd@End#3% + \else + \gdef#3{#1\HyPsd@UnexpandableSpace#2}% + \expandafter\HyPsd@@ProtectSpacesFi#3\HyPsd@End#3% + \fi + }% % \end{macrocode} % \end{macro} % % \paragraph{Remove mask.} % \begin{macro}{\HyPsd@RemoveMask} % \cs{HyPsd@RemoveMask} removes the protecting \verb+|+. -% It is used by \cs{HyPsd@@ProtectSpaces} and by the code in +% It is used by \cs{HyPsd@@ProtectSpacesFi} and by the code in % \cs{pdfstringdef} that removes the grouping chararcters. % \begin{macrocode} -\def\HyPsd@RemoveMask|#1|\HyPsd@End#2{% - \toks@\expandafter{#1}% - \xdef#2{\the\toks@}% -} + \def\HyPsd@RemoveMask|#1|\HyPsd@End#2{% + \toks@\expandafter{#1}% + \xdef#2{\the\toks@}% + }% % \end{macrocode} % \end{macro} % +% \begin{macrocode} +}{% + \let\HyPsd@fi\fi + \def\HyPsd@ProtectSpaces#1{% + \xdef#1{% + \iftrue + \expandafter\HyPsd@@ProtectSpacesFi + \expandafter|\expandafter\@empty#1| % + \HyPsd@fi + }% + \expandafter\HyPsd@RemoveMask#1\HyPsd@End#1% + }% + \def\HyPsd@@ProtectSpacesFi#1 #2\HyPsd@fi{% + \fi + \etex@unexpanded{#1}% + \ifx\scrollmode#2\scrollmode + \else + \HyPsd@@ProtectSpacesFi\HyPsd@UnexpandableSpace#2% + \HyPsd@fi + }% + \def\HyPsd@RemoveMask|#1|\HyPsd@End#2{% + \xdef#2{\etex@unexpanded\expandafter{#1}}% + }% +} +% \end{macrocode} +% % \subsubsection{Remove grouping braces} % \begin{macro}{\HyPsd@RemoveBraces} % |#1| contains the expanded string, the result will @@ -2431,9 +2602,7 @@ \def\HyPsd@RemoveBraces#1{% \ifx\scrollmode#1\scrollmode \else - \Hy@ReturnAfterFi{% - \HyPsd@@RemoveBraces#1\HyPsd@End{#1}% - }% + \HyPsd@@RemoveBracesFi#1\HyPsd@End{#1}% \fi } % \end{macrocode} @@ -2456,39 +2625,37 @@ % should disappeared. So we can move some parts out % of the argument of \cs{Hy@ReturnAfterFi}. % \begin{macrocode} -\def\HyPsd@@RemoveBraces#1#2\HyPsd@End#3{% +\def\HyPsd@@RemoveBracesFi#1#2\HyPsd@End#3\fi{% + \fi \def\Hy@temp@A{#1#2}% \def\Hy@temp@B{#3}% \ifx\Hy@temp@A\Hy@temp@B \expandafter\def\expandafter\HyPsd@String\expandafter{% \HyPsd@String#1% }% - \Hy@ReturnAfterElseFi{% - \ifx\scrollmode#2\scrollmode - \else - \Hy@ReturnAfterFi{% - \HyPsd@RemoveBraces{#2}% - }% - \fi - }% + \ifx\scrollmode#2\scrollmode + \else + \Hy@ReturnAfterFiFiEnd{% + \HyPsd@RemoveBraces{#2}% + }% + \fi \else \def\Hy@temp@A{#1}% \HyPsd@AppendItalcorr\HyPsd@String - \Hy@ReturnAfterFi{% - \ifx\Hy@temp@A\@empty - \Hy@ReturnAfterElseFi{% - \HyPsd@RemoveBraces{#2}% - }% - \else - \Hy@ReturnAfterFi{% - \HyPsd@ProtectSpaces\Hy@temp@A - \HyPsd@AppendItalcorr\Hy@temp@A - \expandafter\HyPsd@RemoveBraces\expandafter - {\Hy@temp@A#2}% - }% - \fi - }% + \ifx\Hy@temp@A\@empty + \Hy@ReturnAfterElseFiFiEnd{% + \HyPsd@RemoveBraces{#2}% + }% + \else + \HyPsd@ProtectSpaces\Hy@temp@A + \HyPsd@AppendItalcorr\Hy@temp@A + \Hy@ReturnAfterFiFiEnd{% + \expandafter\HyPsd@RemoveBraces\expandafter + {\Hy@temp@A#2}% + }% + \fi \fi + \Hy@ReturnEnd } % \end{macrocode} % \end{macro} @@ -2557,26 +2724,32 @@ \fi \fi \else - \ifcat#1 %SPACE + \ifcat#1A% letter \expandafter\def\expandafter\HyPsd@String\expandafter{% - \HyPsd@String\HyPsd@SPACEOPTI + \HyPsd@String#1% }% \else - \ifcat$#1% - \HyPsd@CatcodeWarning{math shift}% + \ifcat#1 % SPACE + \expandafter\def\expandafter\HyPsd@String\expandafter{% + \HyPsd@String\HyPsd@SPACEOPTI + }% \else - \ifcat% - \HyPsd@CatcodeWarning{alignment tab}% + \ifcat$#1% + \HyPsd@CatcodeWarning{math shift}% \else - \ifcat^#1% - \HyPsd@CatcodeWarning{superscript}% + \ifcat% + \HyPsd@CatcodeWarning{alignment tab}% \else - \ifcat_#1% - \HyPsd@CatcodeWarning{subscript}% + \ifcat^#1% + \HyPsd@CatcodeWarning{superscript}% \else - \expandafter\def\expandafter\HyPsd@String\expandafter{% - \HyPsd@String#1% - }% + \ifcat_#1% + \HyPsd@CatcodeWarning{subscript}% + \else + \expandafter\def\expandafter\HyPsd@String\expandafter{% + \HyPsd@String#1% + }% + \fi \fi \fi \fi @@ -2584,22 +2757,21 @@ \fi \fi \ifx\HyPsd@Rest\relax - \Hy@ReturnAfterElseFi{% - \ifx\scrollmode#2\scrollmode - \else - \Hy@ReturnAfterFi{% - \HyPsd@CheckCatcodes#2\HyPsd@End - }% - \fi - }% + \ifx\scrollmode#2\scrollmode + \else + \Hy@ReturnAfterFiFiEnd{% + \HyPsd@CheckCatcodes#2\HyPsd@End + }% + \fi \else - \Hy@ReturnAfterFi{% - \ifx\HyPsd@Rest\@empty - \else + \ifx\HyPsd@Rest\@empty + \else + \Hy@ReturnAfterFiFiEnd{% \expandafter\HyPsd@CheckCatcodes\HyPsd@Rest\HyPsd@End - \fi - }% + }% + \fi \fi + \Hy@ReturnEnd } % \end{macrocode} % \end{macro} @@ -2622,7 +2794,7 @@ % |1ex| with a space and removes them else. % \begin{macrocode} \def\HyPsd@AfterDimenRemove#1\HyPsd@End{% - \ifdim\ifx\HyPsd@String\@empty\z@\else\dimen@\fi>1ex + \ifdim\ifx\HyPsd@String\@empty\z@\else\dimen@\fi>1ex % \HyPsd@ReplaceSpaceWarning{\string\kern\space\the\dimen@}% \gdef\HyPsd@Rest{\HyPsd@UnexpandableSpace #1}% \else @@ -2641,7 +2813,7 @@ % interpreting problems like dimens (see above). % \begin{macrocode} \def\HyPsd@AfterSkipRemove#1\HyPsd@End{% - \ifdim\ifx\HyPsd@String\@empty\z@\else\skip@\fi>1ex + \ifdim\ifx\HyPsd@String\@empty\z@\else\skip@\fi>1ex % \HyPsd@ReplaceSpaceWarning{\string\hskip\space\the\skip@}% \gdef\HyPsd@Rest{\HyPsd@UnexpandableSpace #1}% \else @@ -2666,8 +2838,8 @@ }% } \begingroup - \catcode`\|=0 - \catcode`\\=12 + \catcode`\|=0 % + \catcode`\\=12 % % \end{macrocode} % \SpecialEscapechar{\|} % \vspace{-2\MacrocodeTopsep} @@ -2763,18 +2935,19 @@ % \end{tabular} % \begin{macrocode} \def\HyPsd@Subst#1#2#3{% - \def\HyPsd@@Replace##1#1##2\END{% + \def\HyPsd@@ReplaceFi##1#1##2\END\fi{% + \fi ##1% - \ifx\\##2\\% + \ifx\scrollmode##2\scrollmode \else #2% - \Hy@ReturnAfterFi{% - \HyPsd@@Replace##2\END - }% + \HyPsd@@ReplaceFi##2\END \fi }% \xdef#3{% - \expandafter\HyPsd@@Replace#3#1\END + \iftrue + \expandafter\HyPsd@@ReplaceFi#3#1\END + \fi }% } % \end{macrocode} @@ -2831,8 +3004,8 @@ % Unicode marker at the beginning. % \begin{macrocode} \begingroup - \catcode`\|=0 - \catcode`\\=12 + \catcode`\|=0 % + \catcode`\\=12 % % \end{macrocode} % \SpecialEscapechar{\|} % \begin{macro}{\HyPsd@ConvertToUnicode} @@ -2841,14 +3014,14 @@ |xdef#1{% |expandafter|HyPsd@DoConvert#1|@empty|@empty|@empty }% - |xdef#1{% - |ifx#1|@empty - |else + |ifx#1|@empty + |else + |xdef#1{% \376\377% #1% - |fi - }% - } + }% + |fi + }% % \end{macrocode} % \end{macro} % \begin{macro}{\HyPsd@DoConvert} @@ -2857,8 +3030,8 @@ |ifx#1|@empty |else |Hy@ReturnAfterFi{% - |ifx#1\% - \% + |ifx#1\%% + \%% |expandafter|HyPsd@DoEscape |else \000#1% @@ -2866,7 +3039,7 @@ |fi }% |fi - } + }% % \end{macrocode} % \end{macro} % \begin{macro}{\HyPsd@DoEscape} @@ -2885,7 +3058,7 @@ |fi }% |fi - } + }% % \end{macrocode} % \end{macro} % \begin{macro}{\HyPsd@GetTwoBytes} @@ -2893,7 +3066,7 @@ |gdef|HyPsd@GetTwoBytes#1\#2#3#4{% #1\#2#3#4% |HyPsd@DoConvert - } + }% % \end{macrocode} % \end{macro} % \begin{macro}{\HyPsd@GetOneBye} @@ -2901,7 +3074,7 @@ |gdef|HyPsd@GetOneByte#1#2{% #1#2% |HyPsd@DoConvert - } + }% |endgroup % \end{macrocode} % \end{macro} @@ -3046,7 +3219,7 @@ }% \def\HyPsd@UTFviii@@four#1|#2#3#4{% \expandafter\HyPsd@UTFviii@@@four\number#1\expandafter|% - \number`#2\expandafter| + \number`#2\expandafter|% \number\dimexpr.03125\dimexpr`#2sp\expandafter|% \number`#3\expandafter|% \number\dimexpr.03125\dimexpr`#3sp\expandafter|% @@ -3111,7 +3284,7 @@ .% unsupported (Unicode -> PDF Doc Encoding) \fi }% - \def\HyPsd@UnicodeReplacementCharacter{\9377\375} + \def\HyPsd@UnicodeReplacementCharacter{\9377\375}% \def\HyPsd@unichar@first@byte#1{% \number\dimexpr.015625\dimexpr#1sp\relax\relax \expandafter\HyPsd@unichar@octtwo\expandafter{% @@ -3338,7 +3511,7 @@ Unexpected value `#1'\MessageBreak of option `#2' instead of\MessageBreak #3% - } + }% } % \end{macrocode} % \end{macro} @@ -3602,6 +3775,14 @@ \def\XR@ext{pdf}% \Hy@breaklinkstrue } +\define@key{Hyp}{dvipdfmx-outline-open}[true]{% + \expandafter\ifx\csname if#1\expandafter\endcsname + \csname iftrue\endcsname + \chardef\SpecialDvipdfmxOutlineOpen\@ne + \else + \chardef\SpecialDvipdfmxOutlineOpen\z@ + \fi +} \define@key{Hyp}{xetex}[true]{% \def\Hy@driver{hdvipdfm}% \def\XR@ext{pdf}% @@ -3781,6 +3962,24 @@ % % The \cmd{\autoref} feature depends on the language. % \begin{macrocode} +\def\HyLang@afrikaans{% + \def\equationautorefname{Vergelyking}% + \def\footnoteautorefname{Voetnota}% + \def\itemautorefname{Item}% + \def\figureautorefname{Figuur}% + \def\tableautorefname{Tabel}% + \def\partautorefname{Deel}% + \def\appendixautorefname{Bylae}% + \def\chapterautorefname{Hoofstuk}% + \def\sectionautorefname{Afdeling}% + \def\subsectionautorefname{Subafdeling}% + \def\subsubsectionautorefname{Subsubafdeling}% + \def\paragraphautorefname{Paragraaf}% + \def\subparagraphautorefname{Subparagraaf}% + \def\FancyVerbLineautorefname{Lyn}% + \def\theoremautorefname{Teorema}% + \def\pageautorefname{Bladsy}% +} \def\HyLang@english{% \def\equationautorefname{Equation}% \def\footnoteautorefname{footnote}% @@ -3797,6 +3996,25 @@ \def\subparagraphautorefname{subparagraph}% \def\FancyVerbLineautorefname{line}% \def\theoremautorefname{Theorem}% + \def\pageautorefname{page}% +} +\def\HyLang@french{% + \def\equationautorefname{\'Equation}% + \def\footnoteautorefname{note}% + \def\itemautorefname{item}% + \def\figureautorefname{Figure}% + \def\tableautorefname{Tableau}% + \def\partautorefname{Partie}% + \def\appendixautorefname{Appendice}% + \def\chapterautorefname{chapitre}% + \def\sectionautorefname{section}% + \def\subsectionautorefname{sous-section}% + \def\subsubsectionautorefname{sous-sous-section}% + \def\paragraphautorefname{paragraphe}% + \def\subparagraphautorefname{sous-paragraphe}% + \def\FancyVerbLineautorefname{ligne}% + \def\theoremautorefname{Th\'eor\`eme}% + \def\pageautorefname{page}% } \def\HyLang@german{% \def\equationautorefname{Gleichung}% @@ -3814,6 +4032,25 @@ \def\subparagraphautorefname{Unterabsatz}% \def\FancyVerbLineautorefname{Zeile}% \def\theoremautorefname{Theorem}% + \def\pageautorefname{Seite}% +} +\def\HyLang@italian{% + \def\equationautorefname{Equazione}% + \def\footnoteautorefname{nota}% + \def\itemautorefname{punto}% + \def\figureautorefname{Figura}% + \def\tableautorefname{Tabella}% + \def\partautorefname{Parte}% + \def\appendixautorefname{Appendice}% + \def\chapterautorefname{Capitolo}% + \def\sectionautorefname{sezione}% + \def\subsectionautorefname{sottosezione}% + \def\subsubsectionautorefname{sottosottosezione}% + \def\paragraphautorefname{paragrafo}% + \def\subparagraphautorefname{sottoparagrafo}% + \def\FancyVerbLineautorefname{linea}% + \def\theoremautorefname{Teorema}% + \def\pageautorefname{Pag.\@}% } \def\HyLang@portuges{% \def\equationautorefname{Equa\c c\~ao}% @@ -3831,6 +4068,7 @@ \def\subparagraphautorefname{subpar\'agrafo}% \def\FancyVerbLineautorefname{linha}% \def\theoremautorefname{Teorema}% + \def\pageautorefname{P\'agina}% } \def\HyLang@spanish{% \def\equationautorefname{Ecuaci\'on}% @@ -3848,40 +4086,7 @@ \def\subparagraphautorefname{Subp\'arrafo}% \def\FancyVerbLineautorefname{L\'inea}% \def\theoremautorefname{Teorema}% -} -\def\HyLang@afrikaans{% - \def\equationautorefname{Vergelyking}% - \def\footnoteautorefname{Voetnota}% - \def\itemautorefname{Item}% - \def\figureautorefname{Figuur}% - \def\tableautorefname{Tabel}% - \def\partautorefname{Deel}% - \def\appendixautorefname{Bylae}% - \def\chapterautorefname{Hoofstuk}% - \def\sectionautorefname{Afdeling}% - \def\subsectionautorefname{Subafdeling}% - \def\subsubsectionautorefname{Subsubafdeling}% - \def\paragraphautorefname{Paragraaf}% - \def\subparagraphautorefname{Subparagraaf}% - \def\FancyVerbLineautorefname{Lyn}% - \def\theoremautorefname{Teorema}% -} -\def\HyLang@french{% - \def\equationautorefname{\'Equation}% - \def\footnoteautorefname{note}% - \def\itemautorefname{item}% - \def\figureautorefname{Figure}% - \def\tableautorefname{Tableau}% - \def\partautorefname{Partie}% - \def\appendixautorefname{Appendice}% - \def\chapterautorefname{chapitre}% - \def\sectionautorefname{section}% - \def\subsectionautorefname{sous-section}% - \def\subsubsectionautorefname{sous-sous-section}% - \def\paragraphautorefname{paragraphe}% - \def\subparagraphautorefname{sous-paragraphe}% - \def\FancyVerbLineautorefname{ligne}% - \def\theoremautorefname{Th\'eor\`eme}% + \def\pageautorefname{P\'agina}% } \def\HyLang@vietnamese{% \def\equationautorefname{Ph\uhorn{}\ohorn{}ng tr\`inh}% @@ -3899,6 +4104,7 @@ \def\subparagraphautorefname{\dj{}o\d{a}n}% \def\FancyVerbLineautorefname{d\`ong}% \def\theoremautorefname{\DJ{}\d{i}nh l\'y}% + \def\pageautorefname{Trang}% } % \end{macrocode} % @@ -3956,6 +4162,7 @@ \HyLang@DeclareLang{francais}{french} \HyLang@DeclareLang{acadian}{french} \HyLang@DeclareLang{canadien}{french} +\HyLang@DeclareLang{italian}{italian} % \end{macrocode} % More work is needed in case of options |vietnamese| and |vietnam|. % \begin{macrocode} @@ -4089,23 +4296,32 @@ % \end{macrocode} % % \begin{macrocode} -\define@key{Hyp}{linkcolor}{\def\@linkcolor{#1}} -\define@key{Hyp}{anchorcolor}{\def\@anchorcolor{#1}} -\define@key{Hyp}{citecolor}{\def\@citecolor{#1}} -\define@key{Hyp}{urlcolor}{\def\@urlcolor{#1}} -\define@key{Hyp}{menucolor}{\def\@menucolor{#1}} -\define@key{Hyp}{filecolor}{\def\@filecolor{#1}} -\define@key{Hyp}{pagecolor}{\def\@pagecolor{#1}} +\def\Hy@temp#1{% + \expandafter\Hy@@temp\csname @#1color\endcsname{#1}% +} +\def\Hy@@temp#1#2#3{% + \define@key{Hyp}{#2color}{% + \HyColor@HyperrefColor{##1}#1% + }% + \def#1{#3}% +} +\Hy@temp{link}{red} +\Hy@temp{anchor}{black} +\Hy@temp{cite}{green} +\Hy@temp{file}{cyan} +\Hy@temp{url}{magenta} +\Hy@temp{menu}{red} +\Hy@temp{run}{\@filecolor} +\define@key{Hyp}{pagecolor}{% + \Hy@WarningPageColor +} +\def\Hy@WarningPageColor{% + \Hy@WarningNoLine{Option `pagecolor' is not available anymore}% + \global\let\Hy@WarningPageColor\relax +} % \end{macrocode} -% Default values: +% % \begin{macrocode} -\def\@linkcolor{red} -\def\@anchorcolor{black} -\def\@citecolor{green} -\def\@filecolor{cyan} -\def\@urlcolor{magenta} -\def\@menucolor{red} -\def\@pagecolor{red} \def\hyperbaseurl#1{\def\@baseurl{#1}} \define@key{Hyp}{baseurl}{\hyperbaseurl{#1}} \let\@baseurl\@empty @@ -4167,38 +4383,25 @@ % 2006/11/28 v2.10 do not work because of a bug that is % fixed in 2007/01/21 v2.11). % \begin{macrocode} -\def\Hy@ColorList{cite,file,link,menu,page,run,url} +\def\Hy@ColorList{cite,file,link,menu,run,url} \@for\Hy@temp:=\Hy@ColorList\do{% \edef\Hy@temp{% \noexpand\define@key{Hyp}{\Hy@temp bordercolor}{% - \noexpand\Hy@bordercolor{\Hy@temp}{##1}{ }% + \noexpand\HyColor@HyperrefBorderColor + {##1}% + \expandafter\noexpand\csname @\Hy@temp bordercolor\endcsname + {hyperref}% + {\Hy@temp bordercolor}% }% }% \Hy@temp } -\def\Hy@bordercolor#1#2#3{% - \begingroup - \Hy@safe@activestrue - \@ifundefined{XC@edef}{\edef}{\XC@edef}\x{#2}% - \expandafter\Hy@CheckColorSpec\x#3#3\@nil{#1}{#2}% +\define@key{Hyp}{pagebordercolor}{% + \Hy@WarningPageBorderColor } -\def\Hy@CheckColorSpec#1 #2 #3\@nil#4#5{% - \ifx\\#3\\% - \@ifundefined{XC@bordercolor}{% - \Hy@Warning{% - Unsupported color specification (#4bordercolor).\MessageBreak - Load package `xcolor' (version >= 2.11) first.\MessageBreak - Ignoring color specification% - }% - \endgroup - }{% - \endgroup - \XC@bordercolor{#4}{#5}% - }% - \else - \endgroup - \@namedef{@#4bordercolor}{#5}% - \fi +\def\Hy@WarningPageBorderColor{% + \Hy@WarningNoLine{Option `pagebordercolor' is not available anymore}% + \global\let\Hy@WarningPageBorderColor\relax } % \end{macrocode} % @@ -4370,7 +4573,6 @@ \def\@filebordercolor{0 .5 .5} \def\@runbordercolor{0 .7 .7} \def\@citebordercolor{0 1 0} -\def\@pagebordercolor{1 1 0} \def\@pdfhighlight{/I} \def\@pdftitle{} \def\@pdfauthor{} @@ -4389,14 +4591,14 @@ \let\PDF@FinishDoc\@empty \let\phantomsection\@empty \@ifundefined{stockwidth}{% - \edef\special@paper{\the\paperwidth,\the\paperheight} + \edef\special@paper{\the\paperwidth,\the\paperheight}% }{% - \edef\special@paper{\the\stockwidth,\the\stockheight} + \edef\special@paper{\the\stockwidth,\the\stockheight}% } \begingroup \dimen@=\@ifundefined{stockheight}{\paperheight}{\stockheight}\relax \dimen@=0.99626401\dimen@ - \xdef\Hy@pageheight{\strip@pt\dimen@} + \xdef\Hy@pageheight{\strip@pt\dimen@}% \endgroup \def\HyInd@EncapChar{\|} % \end{macrocode} @@ -4480,7 +4682,7 @@ \ifx\HyPsd@InitUnicode\relax \define@key{Hyp}{unicode}[true]{% \Hy@boolkey{unicode}{#1}% - } + }% \else \define@key{Hyp}{unicode}[true]{% \Hy@boolkey{unicode}{#1}% @@ -4490,7 +4692,7 @@ }% \Hy@unicodefalse \fi - } + }% \fi % \end{macrocode} % The macro \cs{HyPsd@InitUnicode} is no longer needed. @@ -4506,9 +4708,9 @@ % in babel manner. % \begin{macrocode} \Hy@nextfalse -\@ifpackagewith{babel}{spanish}{\Hy@nexttrue}{} -\@ifpackagewith{babel}{galician}{\Hy@nexttrue}{} -\@ifpackagewith{babel}{estonian}{\Hy@nexttrue}{} +\@ifundefined{spanish@sh@"@sel}{}{\Hy@nexttrue} +\@ifundefined{galician@sh@"@sel}{}{\Hy@nexttrue} +\@ifundefined{estonian@sh@"@sel}{}{\Hy@nexttrue} \ifHy@next \let\texttilde\~% \fi @@ -4516,32 +4718,35 @@ % % \begin{macrocode} \ifHy@figures - \Hy@Info{Hyper figures ON} + \Hy@Info{Hyper figures ON}% \else - \Hy@Info{Hyper figures OFF} + \Hy@Info{Hyper figures OFF}% \fi \ifHy@nesting - \Hy@Info{Link nesting ON} + \Hy@Info{Link nesting ON}% \else - \Hy@Info{Link nesting OFF} + \Hy@Info{Link nesting OFF}% \fi \ifHy@hyperindex - \Hy@Info{Hyper index ON} + \Hy@Info{Hyper index ON}% \else - \Hy@Info{Hyper index OFF} + \Hy@Info{Hyper index OFF}% \fi \ifHy@plainpages - \Hy@Info{Plain pages ON} + \Hy@Info{Plain pages ON}% \else - \Hy@Info{Plain pages OFF} + \Hy@Info{Plain pages OFF}% \fi \ifHy@backref - \Hy@Info{Backreferencing ON} + \Hy@Info{Backreferencing ON}% \else - \Hy@Info{Backreferencing OFF} + \Hy@Info{Backreferencing OFF}% \fi \ifHy@typexml - \AtEndOfPackage{\RequirePackage{color}\RequirePackage{nameref}} + \AtEndOfPackage{% + \RequirePackage{color}% + \RequirePackage{nameref}% + }% \fi \Hy@DisableOption{typexml} \ifHy@implicit @@ -4555,6 +4760,7 @@ }% \AtBeginDocument{% \let\autoref\ref + \let\autopageref\pageref \ifx\@pdfpagemode\@empty \gdef\@pdfpagemode{UseNone}% \fi @@ -4650,11 +4856,21 @@ \let\@unprocessedoptions\relax \Hy@RestoreCatcodes } +\newif\ifHy@DvipdfmxOutlineOpen +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname SpecialDvipdfmxOutlineOpen\endcsname\relax +\else + \ifnum\SpecialDvipdfmxOutlineOpen>\z@ + \Hy@DvipdfmxOutlineOpentrue + \fi +\fi \Hy@DisableOption{tex4ht} \Hy@DisableOption{pdftex} \Hy@DisableOption{dvipdf} \Hy@DisableOption{nativepdf} \Hy@DisableOption{dvipdfm} +\Hy@DisableOption{dvipdfmx} +\Hy@DisableOption{dvipdfmx-outline-open} \Hy@DisableOption{pdfmark} \Hy@DisableOption{dvips} \Hy@DisableOption{hypertex} @@ -4697,7 +4913,7 @@ \AtEndOfPackage{% \global\let\ReadBookmarks\relax \global\let\WriteBookmarks\relax - } + }% \ifx\@pdfpagemode\@empty \def\@pdfpagemode{UseNone}% \fi @@ -4705,25 +4921,19 @@ \Hy@DisableOption{bookmarks} % \end{macrocode} % -% |\Hy@colorlink| expects a macro as argument. It contains +% |\HyColor@UseColor| expects a macro as argument. It contains % the color specification. % \begin{macrocode} \AtBeginDocument{% \ifHy@colorlinks - \ifHy@typexml\else\RequirePackage{color}\fi + \ifHy@typexml + \else + \RequirePackage{color}% + \fi \def\Hy@colorlink#1{% \begingroup - \expandafter\Hy@colorscan\expandafter#1#1\@nil% - }% - \def\Hy@colorscan#1{% - \@ifnextchar[% ] - {% - \Hy@@colorscan - }{% - \expandafter\color\expandafter#1\@car{}% - }% + \HyColor@UseColor#1% }% - \def\Hy@@colorscan#1\@nil{\color#1}% \def\Hy@endcolorlink{\endgroup}% \Hy@Info{Link coloring ON}% \else @@ -4777,7 +4987,7 @@ % \end{macrocode} % \begin{macrocode} \ifHy@backref - \RequirePackage{backref} + \RequirePackage{backref}% \else \let\Hy@backout\@gobble \fi @@ -4800,24 +5010,25 @@ % as |#| locally while making |\special|s. % \begin{macrocode} \begingroup - \endlinechar=-1 + \endlinechar=-1 % + \catcode`\^^A=14 % \catcode`\^^M\active \catcode`\%\active \catcode`\#\active \catcode`\_\active \catcode`\$\active - \gdef\hyper@normalise{ + \gdef\hyper@normalise{^^A \begingroup \catcode`\^^M\active - \def^^M{ } + \def^^M{ }^^A \catcode`\%\active \let%\@percentchar \let\%\@percentchar \catcode`\#\active - \def#{\hyper@hash} - \def\#{\hyper@hash} - \@makeother\& - \edef\textunderscore{\string_} + \def#{\hyper@hash}^^A + \def\#{\hyper@hash}^^A + \@makeother\&^^A + \edef\textunderscore{\string_}^^A \let\_\textunderscore \catcode`\_\active \let_\textunderscore @@ -4825,27 +5036,40 @@ \let\~\hyper@tilde \let\textasciitilde\hyper@tilde \let\\\@backslashchar - \edef${\string$} + \edef${\string$}^^A \Hy@safe@activestrue \hyper@n@rmalise - } - \catcode`\#=6 - \gdef\hyper@n@rmalise#1#2{ - \edef\Hy@tempa{ + }^^A + \catcode`\#=6 ^^A + \gdef\Hy@ActiveCarriageReturn{^^M}^^A + \gdef\hyper@n@rmalise#1#2{^^A + \def\Hy@tempa{#2}^^A + \ifx\Hy@tempa\Hy@ActiveCarriageReturn + \Hy@ReturnAfterElseFi{^^A + \hyper@@normalise{#1}^^A + }^^A + \else + \Hy@ReturnAfterFi{^^A + \hyper@@normalise{#1}{#2}^^A + }^^A + \fi + }^^A + \gdef\hyper@@normalise#1#2{^^A + \edef\Hy@tempa{^^A \endgroup - \noexpand#1{\Hy@RemovePercentCr#2%^^M\@nil} - } + \noexpand#1{\Hy@RemovePercentCr#2%^^M\@nil}^^A + }^^A \Hy@tempa - } - \gdef\Hy@RemovePercentCr#1%^^M#2\@nil{ - #1 + }^^A + \gdef\Hy@RemovePercentCr#1%^^M#2\@nil{^^A + #1^^A \ifx\limits#2\limits \else - \Hy@ReturnAfterFi{ + \Hy@ReturnAfterFi{^^A \Hy@RemovePercentCr #2\@nil - } + }^^A \fi - } + }^^A \endgroup \providecommand*\hyper@chars{% \let\#\hyper@hash @@ -4860,14 +5084,19 @@ % \end{macrocode} % % \begin{macrocode} -\DeclareRobustCommand*{\href}{\hyper@normalise\href@} +\DeclareRobustCommand*{\href}{% + \@ifnextchar\bgroup\Hy@href{\hyper@normalise\href@}% +} +\def\Hy@href#{% + \hyper@normalise\href@ +} \begingroup - \catcode`\$=6 - \catcode`\#=12 - \gdef\href@$1{\expandafter\href@split$1##\\} + \catcode`\$=6 % + \catcode`\#=12 % + \gdef\href@$1{\expandafter\href@split$1##\\}% \gdef\href@split$1#$2#$3\\{% \hyper@@link{$1}{$2}% - } + }% \endgroup % \end{macrocode} % Load package |url.sty| and save the meaning of @@ -5219,13 +5448,14 @@ \Fld@charsize=10\p@ \def\Fld@maxlen{0} \def\Fld@align{0} -\def\Fld@color{0 0 0} +\def\Fld@color{0 0 0 rg} \def\Fld@bcolor{1 1 1} \def\Fld@bordercolor{1 0 0} \def\Fld@bordersep{1\p@} \def\Fld@borderwidth{1} \def\Fld@borderstyle{S} \def\Fld@cbsymbol{4} +\def\Fld@rotation{0} \newtoks\Choice@toks \def\Form{\@ifnextchar[{\@Form}{\@Form[]}} \def\endForm{\@endForm} @@ -5326,9 +5556,6 @@ \define@key{Field}{charsize}{% \Fld@charsize#1% } -\define@key{Field}{fillcolor}{% - \def\Fld@fillcolor{#1}% -} \define@key{Field}{borderwidth}{% \def\Fld@borderwidth{#1}% } @@ -5352,39 +5579,19 @@ } % \end{macrocode} % \begin{macrocode} +\define@key{Field}{rotation}{% + \def\Fld@rotation{#1}% +} +% \end{macrocode} +% \begin{macrocode} \define@key{Field}{backgroundcolor}{% - \Hy@fieldcolor{bcolor}{#1}{ }{backgroundcolor}% + \HyColor@FieldBColor{#1}\Fld@bcolor{hyperref}{backgroundcolor}% } \define@key{Field}{bordercolor}{% - \Hy@fieldcolor{bordercolor}{#1}{ }{bordercolor}% + \HyColor@FieldBColor{#1}\Fld@bordercolor{hyperref}{bordercolor}% } \define@key{Field}{color}{% - \Hy@fieldcolor{color}{#1}{ }{color}% -} -\def\Hy@fieldcolor#1#2#3#4{% - \begingroup - \Hy@safe@activestrue - \@ifundefined{XC@edef}{\edef}{\XC@edef}\x{#2}% - \expandafter\Hy@FieldCheckColorSpec\x#3#3\@nil{#1}{#2}{#4}% -} -\def\Hy@FieldCheckColorSpec#1 #2 #3\@nil#4#5#6{% - \ifx\\#3\\% - \@ifundefined{XC@bordercolor}{% - \Hy@Warning{% - Unsupported color specification (#6).\MessageBreak - Load package `xcolor' (version >= 2.11) first.\MessageBreak - Ignoring color specification% - }% - \endgroup - }{% - \endgroup - \XC@bordercolor{temp}{#5}% - \expandafter\let\csname Fld@#4\endcsname\@tempbordercolor - }% - \else - \endgroup - \@namedef{Fld@#4}{#5}% - \fi + \HyColor@FieldColor{#1}\Fld@color{hyperref}{color}% } % \end{macrocode} % \begin{macrocode} @@ -5501,13 +5708,13 @@ \sbox0{% \hskip\Fld@borderwidth bp#1\hskip\Fld@borderwidth bp% }% - \@tempdima\ht0 - \advance\@tempdima by \Fld@borderwidth bp - \advance\@tempdima by \Fld@borderwidth bp + \@tempdima\ht0 % + \advance\@tempdima by \Fld@borderwidth bp % + \advance\@tempdima by \Fld@borderwidth bp % \ht0\@tempdima - \@tempdima\dp0 - \advance\@tempdima by \Fld@borderwidth bp - \advance\@tempdima by \Fld@borderwidth bp + \@tempdima\dp0 % + \advance\@tempdima by \Fld@borderwidth bp % + \advance\@tempdima by \Fld@borderwidth bp % \dp0\@tempdima \box0\relax } @@ -5526,29 +5733,29 @@ % \section{Setup} % \begin{macrocode} \ifHy@figures - \Hy@Info{Hyper figures ON} + \Hy@Info{Hyper figures ON}% \else - \Hy@Info{Hyper figures OFF} + \Hy@Info{Hyper figures OFF}% \fi \ifHy@nesting - \Hy@Info{Link nesting ON} + \Hy@Info{Link nesting ON}% \else - \Hy@Info{Link nesting OFF} + \Hy@Info{Link nesting OFF}% \fi \ifHy@hyperindex - \Hy@Info{Hyper index ON} + \Hy@Info{Hyper index ON}% \else - \Hy@Info{Hyper index OFF} + \Hy@Info{Hyper index OFF}% \fi \ifHy@backref - \Hy@Info{backreferencing ON} + \Hy@Info{backreferencing ON}% \else - \Hy@Info{backreferencing OFF} + \Hy@Info{backreferencing OFF}% \fi \ifHy@colorlinks - \Hy@Info{Link coloring ON} + \Hy@Info{Link coloring ON}% \else - \Hy@Info{Link coloring OFF} + \Hy@Info{Link coloring OFF}% \fi % \end{macrocode} % \section{Low-level utility macros} @@ -5699,7 +5906,7 @@ \if@filesw \ifHy@typexml \immediate\closeout\@mainaux - \immediate\openout\@mainaux\jobname.aux + \immediate\openout\@mainaux\jobname.aux\relax \immediate\write\@auxout{<relaxxml>\relax}% \fi \immediate\write\@auxout{% @@ -5787,7 +5994,7 @@ \def\Hy@scantitle#1{% \gdef\Hy@title{#1}% \HyOrg@title{#1}% - } + }% \def\author{\@ifnextchar[{\Hy@scanoptauthor}{\Hy@scanauthor}}% \def\Hy@scanoptauthor[#1]{% \gdef\Hy@author{#1}% @@ -5796,7 +6003,7 @@ \def\Hy@scanauthor#1{% \gdef\Hy@author{#1}% \HyOrg@author{#1}% - } + }% % \end{macrocode} % % The case, that \title, or \author are given before @@ -5892,7 +6099,7 @@ % \begin{macrocode} \def\thispdfpagelabel#1{% \gdef\HyPL@thisLabel{#1}% - } + }% \global\let\HyPL@thisLabel\relax % \end{macrocode} % \end{macro} @@ -5901,7 +6108,7 @@ % The page labels are collected in \cmd{\HyPL@Labels} and % set at the end of the document. % \begin{macrocode} - \def\HyPL@Labels{} + \def\HyPL@Labels{}% % \end{macrocode} % \end{macro} % \begin{macro}{\Hy@abspage} @@ -5909,7 +6116,7 @@ % a new counter for that. % \begin{macrocode} \newcount\Hy@abspage - \Hy@abspage=0 + \Hy@abspage=0 % % \end{macrocode} % \end{macro} % For comparisons with the values of the previous page, some @@ -5942,7 +6149,7 @@ \global\let\HyPL@thisLabel\relax \fi \let\HyPL@Type\relax - \ifnum\the\c@page>0 + \ifnum\the\c@page>0 % \expandafter\HyPL@CheckThePage\HyPL@page\@nil \fi \let\Hy@temp Y% @@ -5960,7 +6167,7 @@ \let\Hy@temp N% \fi \if Y\Hy@temp - \advance\c@page by -1 + \advance\c@page by -1 % \ifnum\HyPL@LastNumber=\the\c@page\relax \else \let\Hy@temp N% @@ -5969,15 +6176,15 @@ \fi \if N\Hy@temp \ifx\HyPL@Type\relax - \HyPL@StorePageLabel{/P (\HyPL@Prefix)}% + \HyPL@StorePageLabel{/P(\HyPL@Prefix)}% \else \HyPL@StorePageLabel{% \ifx\HyPL@Prefix\@empty \else - /P (\HyPL@Prefix) + /P(\HyPL@Prefix)% \fi - /S /\csname HyPL\HyPL@Type\endcsname - \ifnum\the\c@page=1 + /S/\csname HyPL\HyPL@Type\endcsname + \ifnum\the\c@page=1 % \else \space/St \the\c@page \fi @@ -5989,7 +6196,7 @@ \global\let\HyPL@LastPrefix\HyPL@Prefix \endgroup \Hy@GlobalStepCount\Hy@abspage - } + }% % \end{macrocode} % \end{macro} % @@ -5999,7 +6206,7 @@ % \begin{macrocode} \def\HyPL@CheckThePage#1\@nil{% \HyPL@@CheckThePage{#1}#1\csname\endcsname\c@page\@nil - } + }% % \end{macrocode} % \end{macro} % \begin{macro}{\HyPL@@CheckThePage} @@ -6039,7 +6246,7 @@ \fi \Hy@next \fi - } + }% % \end{macrocode} % \end{macro} % @@ -6061,7 +6268,7 @@ \else \expandafter\noexpand\csname#1\endcsname{#2}% \fi - } + }% % \end{macrocode} % \end{macro} % @@ -6077,14 +6284,14 @@ \def\HyPL@Type{@#2}% \def\HyPL@Prefix{#1}% \fi - } + }% % \end{macrocode} % \end{macro} % % \begin{macro}{\HyPL@StorePageLabel} % Dummy for drivers that does not support /PageLabel. % \begin{macrocode} - \providecommand*{\HyPL@StorePageLabel}[1]{} + \providecommand*{\HyPL@StorePageLabel}[1]{}% % \end{macrocode} % \end{macro} % @@ -6093,7 +6300,7 @@ % if the absolute page numbers and the page labels are the % same. Then \cmd{\HyPL@Labels} has the meaning of \cmd{\HyPL@Useless}. % \begin{macrocode} - \def\HyPL@Useless{0 << /S /D >> }% + \def\HyPL@Useless{0<</S/D>>}% \@onelevel@sanitize\HyPL@Useless % \end{macrocode} % \end{macro} @@ -6109,10 +6316,10 @@ \else \ifx\HyPL@Labels\HyPL@Useless \else - \Hy@PutCatalog{/PageLabels << /Nums [\HyPL@Labels] >>}% + \Hy@PutCatalog{/PageLabels<</Nums[\HyPL@Labels]>>}% \fi \fi - } + }% % \end{macrocode} % \end{macro} % @@ -6172,17 +6379,17 @@ \Hy@WarningNoLine{% VTeX 6.59g or above required for pdfpagelabels% }% - } + }% \else \gdef\Hy@PutCatalog#1{% - \Hy@vt@PutCatalog#1/PageLabels <<>>\@nil - } - \gdef\Hy@vt@PutCatalog#1/PageLabels <<#2>>#3\@nil{% + \Hy@vt@PutCatalog#1/PageLabels<<>>\@nil + }% + \gdef\Hy@vt@PutCatalog#1/PageLabels<<#2>>#3\@nil{% \ifx\\#2\\% \else \immediate\special{!pdfpagelabels #2}% \fi - } + }% \fi \endgroup %</vtex> @@ -6201,9 +6408,9 @@ \toks@\expandafter{\HyPL@Labels}% \xdef\HyPL@Labels{% \the\toks@ - \the\Hy@abspage\space<< #1 >> % + \the\Hy@abspage<<#1>>% }% - } + }% % \end{macrocode} % \end{macro} % @@ -6211,7 +6418,7 @@ % to make sure, that no further pages will follow. % Then the PDF catalog entry for |\PageLabels| is set. % \begin{macrocode} - \AtEndDocument{\clearpage\HyPL@SetPageLabels} + \AtEndDocument{\clearpage\HyPL@SetPageLabels}% % \end{macrocode} % % \begin{macrocode} @@ -6243,13 +6450,13 @@ \def\HyPL@StorePageLabel#1{% \if@filesw \begingroup - \edef\Hy@tempa{\the\Hy@abspage\space<< #1 >> }% + \edef\Hy@tempa{\the\Hy@abspage<<#1>>}% \immediate\write\@mainaux{% \string\HyPL@Entry{\Hy@tempa}% }% \endgroup \fi - } + }% % \end{macrocode} % \end{macro} % @@ -6280,7 +6487,7 @@ \HyPL@Labels #1% }% - } + }% % \end{macrocode} % \end{macro} % @@ -6328,14 +6535,14 @@ \newcommand\theHequation{\theHsection.\arabic{equation}} \@ifundefined{thepart}{}{\newcommand\theHpart{\arabic{part}}} \@ifundefined{thechapter}{% - \newcommand\theHsection {\arabic{section}} - \newcommand\theHfigure {\arabic{figure}} - \newcommand\theHtable {\arabic{table}} + \newcommand\theHsection {\arabic{section}}% + \newcommand\theHfigure {\arabic{figure}}% + \newcommand\theHtable {\arabic{table}}% }{% - \newcommand\theHchapter {\arabic{chapter}} - \newcommand\theHfigure {\theHchapter.\arabic{figure}} - \newcommand\theHtable {\theHchapter.\arabic{table}} - \newcommand\theHsection {\theHchapter.\arabic{section}} + \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}} @@ -6418,8 +6625,10 @@ \def\hyper@refstepcounter#1{% \edef\This@name{#1}% \ifx\This@name\name@of@eq - \make@stripped@name{\theequation}% - \let\theHequation\newname + \@ifundefined{theHequation}{% + \make@stripped@name{\theequation}% + \let\theHequation\newname + }{}% \fi \@ifundefined{theH#1}{% \expandafter\def\csname theH#1\endcsname{\arabic{#1}}% @@ -6474,6 +6683,11 @@ \fi \ifHy@hypertexnames \let\@number\@firstofone + \@ifundefined{latin@Alph}{}{% + \ifx\@Alph\greek@Alph + \def\@Alph{Alph\@arabic}% + \fi + }% \ifHy@naturalnames \let\textlatin\@firstofone \xdef\@currentHlabel{\csname the#1\endcsname}% @@ -6615,7 +6829,7 @@ % Package nameref uses five arguments for the ref system. % Fix provided by Felix Neubauer (\Email{felix.neubauer@gmx.net}). % \begin{macrocode} -\def\Hy@varioref@undefined{{???}{??}{}{}{}} +\def\Hy@varioref@undefined{{??}{??}{}{}{}} \@ifpackageloaded{varioref}{% \def\vref@pagenum#1#2{% \@ifundefined{r@#2}{% @@ -6706,8 +6920,10 @@ \def\equation{% \let\refstepcounter\H@refstepcounter \H@equation - \make@stripped@name{\theequation}% - \let\theHequation\newname + \@ifundefined{theHequation}{% + \make@stripped@name{\theequation}% + \let\theHequation\newname + }{}% \hyper@makecurrent{equation}% \Hy@raisedlink{\hyper@anchorstart{\@currentHref}}% \let\refstepcounter\new@refstepcounter @@ -6735,8 +6951,10 @@ \else \ifx\\\@currentHref\\% \else - \make@stripped@name{\theequation}% - \let\theHequation\newname + \@ifundefined{theHequation}{% + \make@stripped@name{\theequation}% + \let\theHequation\newname + }{}% \hyper@makecurrent{equation}% \hyper@anchorstart{\@currentHref}{}\hyper@anchorend \fi @@ -6766,8 +6984,10 @@ \def\subeqnarray{% \let\Hy@reserved@a\relax \H@subeqnarray - \make@stripped@name{\theequation}% - \let\theHequation\newname + \@ifundefined{theHequation}{% + \make@stripped@name{\theequation}% + \let\theHequation\newname + }{}% \hyper@makecurrent{equation}% \hyper@anchorstart{\@currentHref}{}\hyper@anchorend }% @@ -6800,6 +7020,25 @@ } % \end{macrocode} % +% Support for amsmath's \texttt{subequations}: +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname subequations\endcsname\relax +\else + \let\HyOrg@subequations\subequations + \def\subequations{% + \stepcounter{equation}% + \protected@edef\theHparentequation{% + \@ifundefined{theHequation}\theequation\theHequation + }% + \addtocounter{equation}{-1}% + \HyOrg@subequations + \def\theHequation{\theHparentequation\alph{equation}}% + \ignorespaces + }% +\fi +% \end{macrocode} +% % \section{Footnotes}\label{footnotes} % The footnote mark is a hypertext link, and the text is a target. % We separately number the footnotes sequentially through the @@ -6811,7 +7050,7 @@ % \begin{macrocode} \@ifpackageloaded{tabularx}{\Hy@hyperfootnotesfalse}{} \ifHy@hyperfootnotes - \newcounter{Hfootnote} + \newcounter{Hfootnote}% \let\H@@footnotetext\@footnotetext \let\H@@footnotemark\@footnotemark \def\@xfootnotenext[#1]{% @@ -7037,7 +7276,12 @@ {\@dblarg{\Hy@tempa\@captype}}% } \long\def\@caption#1[#2]#3{% - \hyper@makecurrent{\@captype}% + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\let\@currentHref\hc@currentHref + \else + \hyper@makecurrent{\@captype}% + \fi \def\@currentlabelname{#2}% \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% @@ -7048,17 +7292,23 @@ \@setminipage \fi \normalsize - \@makecaption{\csname fnum@#1\endcsname}{% - \ignorespaces + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\@capstartfalse + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}% + \else + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces % \end{macrocode} % If we cannot have nesting, the anchor is empty. % \begin{macrocode} - \ifHy@nesting - \hyper@@anchor{\@currentHref}{#3}% - \else - \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3% - \fi - }% + \ifHy@nesting + \hyper@@anchor{\@currentHref}{#3}% + \else + \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3% + \fi + }% + \fi \par \endgroup } @@ -7073,7 +7323,7 @@ \def\Hy@float@caption{% \hyper@makecurrent{\@captype}% \float@caption - } + }% \let\HyOrg@float@makebox\float@makebox \renewcommand{\float@makebox}[1]{% \HyOrg@float@makebox{% @@ -7124,7 +7374,7 @@ % adding the hyperref call explicitly into the .aux file. % Now we redefine |\bibcite|; this still breaks some citation packages % so we have to work around them. But this remains extremely dangerous. -% Any or all of \emph{achemso}, \emph{chapterbib}, +% Any or all of \emph{achemso} % and \emph{drftcite} may break. % % However, lets make an attempt to get \emph{natbib} right, because @@ -7149,11 +7399,18 @@ \def\hyper@natanchorend{\hyper@anchorend} % \end{macrocode} % Do not play games if we have natbib support. -% Macro \@extra@binfo added for chapterbib support. +% Macro \@extra@binfo added for chapterbib support. Chapterbib also +% wants \cs{@extra@binfo} in the hyper-link, but since the link tag is +% not expanded immediately, we use \cs{@extra@b@citeb}, so cites in a +% chapter will link to the bibliography in that chapter. % \begin{macrocode} \@ifundefined{NAT@parse}{% + \providecommand*\@extra@binfo{}% + \providecommand*\@extra@b@citeb{}% \def\bibcite#1#2{% - \@newl@bel{b}{#1\@extra@binfo}{\hyper@@link[cite]{}{cite.#1}{#2}}% + \@newl@bel{b}{#1\@extra@binfo}{% + \hyper@@link[cite]{}{cite.#1\@extra@b@citeb}{#2}% + }% }% \gdef\@extra@binfo{}% % \end{macrocode} @@ -7177,9 +7434,13 @@ \@skiphyperreftrue \H@item[% \ifx\Hy@raisedlink\@empty - \hyper@anchorstart{cite.#2}\@BIBLABEL{#1}\hyper@anchorend + \hyper@anchorstart{cite.#2\@extra@b@citeb}% + \@BIBLABEL{#1}% + \hyper@anchorend \else - \Hy@raisedlink{\hyper@anchorstart{cite.#2}\hyper@anchorend}% + \Hy@raisedlink{% + \hyper@anchorstart{cite.#2\@extra@b@citeb}\hyper@anchorend + }% \@BIBLABEL{#1}% \fi \hfill @@ -7201,7 +7462,9 @@ % \begin{macrocode} \def\@bibitem#1{% \@skiphyperreftrue\H@item\@skiphyperreffalse - \Hy@raisedlink{\hyper@anchorstart{cite.#1}\relax\hyper@anchorend}% + \Hy@raisedlink{% + \hyper@anchorstart{cite.#1\@extra@b@citeb}\relax\hyper@anchorend + }% \if@filesw \begingroup \let\protect\noexpand @@ -7466,7 +7729,7 @@ \def\@citedatax@opt[#1]{% \def\@cite@opt{, #1}% \@citedatax[{#1}]% - } + }% % \end{macrocode} % \end{macro} % \begin{macrocode} @@ -7474,6 +7737,7 @@ % \end{macrocode} % % \section{Page numbers}\label{pagenum} +% % Give every page an automatic number anchor. This involves, sigh, % overloading \LaTeX's output bits and pieces, which must be dangerous. % This used to be |\@shipoutsetup|, now |\@begindvi|. We cannot even @@ -7575,6 +7839,127 @@ % \end{macrocode} % \end{macro} % +% \subsection{Package \textsf{fancybox}} +% +% Fix for fancybox 2000/09/19 v1.3. +% Several commands are redefined to get \cs{@begindvi} at a better +% place and putting page anchor and transition macros in +% \cs{fb@outputpage}. +% \begin{macrocode} +\@ifpackageloaded{fancybox}{% + \def\fb@outputpage{% + \begingroup + \catcode`\ =10 % + \let\-\@dischyph + \let\'\@acci + \let\`\@accii + \let\=\@acciii + \if@specialpage + \global\@specialpagefalse\@nameuse{ps@\@specialstyle}% + \fi + \if@twoside + \ifodd\count\z@ + \let\@thehead\@oddhead + \let\@thefoot\@oddfoot + \let\@themargin\oddsidemargin + \else + \let\@thehead\@evenhead + \let\@thefoot\@evenfoot + \let\@themargin\evensidemargin + \fi + \fi + \csname reset@font\endcsname + \normalsize + \baselineskip\z@ + \lineskip\z@ + \let\par\@@par + \ifx\this@fancypage\@empty\else + \this@fancypage + \gdef\this@fancypage{}% + \fi + \ifx\the@fancypage\@empty\else + \setbox\@outputbox\hbox{\the@fancypage{\box\@outputbox}}% + \fi + \ifx\fb@@rotatepage\@empty\else + \setbox\@outputbox\hbox{\fb@@rotatepage{\box\@outputbox}}% + \fi + \setbox\@outputbox\vbox{% + \@tempdima=\wd\@outputbox + \setbox\@tempboxa=\hbox to\@tempdima{% + \let\label\@gobble + \let\index\@gobble + \let\glossary\@gobble + \@thehead + }% + \ht\@tempboxa\headheight + \dp\@tempboxa\z@ + \box\@tempboxa + \vskip\headsep + \box\@outputbox + \baselineskip\footskip + \hbox to\@tempdima{% + \let\label\@gobble + \let\index\@gobble + \let\glossary\@gobble + \@thefoot + }% + }% + \ifx\the@@fancypage\@empty\else + \setbox\@outputbox\hbox{\the@@fancypage{\box\@outputbox}}% + \fi + \setbox\@outputbox\vbox{% + \ifnum\fancyput@flag>-1 \do@fancyput\fi + \@begindvi + \Hy@TempPageAnchor\relax + \hyper@pagetransition + \hyper@pageduration + \hyper@pagehidden + \vskip\topmargin + \moveright\@themargin\box\@outputbox + }% + \ifx\fb@rotatepage\@empty\else + \setbox\@outputbox\hbox{\lower\ht\@outputbox\box\@outputbox}% + \dp\@outputbox\z@ + \wd\@outputbox\z@ + \setbox\@outputbox\hbox{\fb@rotatepage{\box\@outputbox}}% + \expandafter\fb@setoffsets\fb@theoffsets + \fi + \let\protect\noexpand + \shipout\box\@outputbox + \global\@colht\textheight + \endgroup + \stepcounter{page}% + \let\firstmark\botmark + }% + \def\fancypage#1#2{% + \def\the@fancypage{#1}% + \def\the@@fancypage{#2}% + \def\@outputpage{\fb@outputpage}% + }% + \def\thisfancypage#1#2{% + \gdef\@outputpage{\fb@outputpage}% + \gdef\this@fancypage{\def\the@fancypage{#1}\def\the@@fancypage{#2}}% + }% + \def\fancyput{% + \def\@outputpage{\fb@outputpage}% + \@ifstar{\@testtrue\@fancyput}{\@testfalse\@fancyput}% + }% + \def\thisfancyput{% + \gdef\@outputpage{\fb@outputpage}% + \@ifstar{\@testtrue\@thisfancyput}{\@testfalse\@thisfancyput}% + }% + \def\LandScape#1{% + \clearpage + \def\fb@@rotatepage{#1}% + \def\@outputpage{\fb@outputpage}% + \@tempdima\textheight + \textheight\textwidth + \textwidth\@tempdima + \UsePageParameters + }% +}{} +% \end{macrocode} +% %\section{Table of contents}\label{toc} % TV Raman noticed that people who add arbitrary material into the TOC % generate a bad or null link. We avoid that by checking if the current @@ -7583,9 +7968,9 @@ % \begin{macrocode} \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname chapter\endcsname\relax - \def\toclevel@part{0} + \def\toclevel@part{0}% \else - \def\toclevel@part{-1} + \def\toclevel@part{-1}% \fi \def\toclevel@chapter{0} \def\toclevel@section{1} @@ -7634,9 +8019,9 @@ \ifHy@verbose \def\Hy@tempa{#3}% \@onelevel@sanitize\Hy@tempa - \typeout{pdftex: bookmark at \the\inputlineno: - {\csname the#2\endcsname} - {\Hy@tempa} + \typeout{pdftex: bookmark at \the\inputlineno: % + {\csname the#2\endcsname}% + {\Hy@tempa}% {\@currentHref}% {\Hy@toclevel}% {#1}% @@ -7803,11 +8188,11 @@ }% }{% \Hy@WarningNoLine{% - \string\numberwithin\space of package `amsmath' + \string\numberwithin\space of package `amsmath' % only fixed\MessageBreak for version 2000/06/06 v2.12 or newer% }% - } + }% }{} % \end{macrocode} % \end{macro} @@ -7819,7 +8204,7 @@ \let\Hy@Gin@setfile\Gin@setfile \def\Gin@setfile#1#2#3{% \hyperimage{#3}{\Hy@Gin@setfile{#1}{#2}{#3}}% - } + }% \fi \Hy@DisableOption{hyperfigures} % \end{macrocode} @@ -7865,7 +8250,7 @@ \fi }% \else - \def\@wrindex#1{\@@wrindex#1||\\} + \def\@wrindex#1{\@@wrindex#1||\\}% \def\@@wrindex#1|#2|#3\\{% \if@filesw \ifx\\#2\\% @@ -8138,7 +8523,7 @@ \fi }% \def\l@subslide##1##2##3##4{% - \ifnum\lslide@flag=1 + \ifnum\lslide@flag=1 % \@undottedtocline{2}{3.8em}{3.2em}{\hyperlink{##4}{##2}}{}% \fi }% @@ -8220,17 +8605,83 @@ % Now some extended referencing. |\ref*| and |\pageref*| are not linked, % and |\autoref| prefixes with a tag based on the type. % \begin{macrocode} +\def\HyRef@StarSetRef#1{% + \begingroup + \Hy@safe@activestrue + \edef\x{#1}% + \@onelevel@sanitize\x + \edef\x{\endgroup + \noexpand\HyRef@@StarSetRef + \expandafter\noexpand\csname r@\x\endcsname{\x}% + }% + \x +} +\def\HyRef@@StarSetRef#1#2#3{% + \ifx#1\@undefined + \let#1\relax + \fi + \real@setref#1#3{#2}% +} \def\@refstar#1{% - \Hy@safe@activestrue - \expandafter\real@setref\csname r@#1\endcsname\@firstoffive{#1}% - \Hy@safe@activesfalse + \HyRef@StarSetRef{#1}\@firstoffive } \def\@pagerefstar#1{% - \Hy@safe@activestrue - \expandafter\real@setref\csname r@#1\endcsname\@secondoffive{#1}% - \Hy@safe@activesfalse + \HyRef@StarSetRef{#1}\@secondoffive } -\DeclareRobustCommand\autoref{% +\AtBeginDocument{% + \@ifpackageloaded{varioref}{% + \def\@Refstar#1{% + \HyRef@StarSetRef{#1}\HyRef@MakeUppercaseFirstOfFive + }% + \def\HyRef@MakeUppercaseFirstOfFive#1#2#3#4#5{% + \MakeUppercase#1% + }% + \DeclareRobustCommand*{\Ref}{% + \@ifstar\@Refstar\HyRef@Ref + }% + \def\HyRef@Ref#1{% + \hyperref[{#1}]{\Ref*{#1}}% + }% + \def\Vr@f#1{% + \leavevmode\unskip\vref@space + \hyperref[{#1}]{% + \Ref*{#1}% + \let\vref@space\nobreakspace + \@vpageref[\unskip]{#1}% + }% + }% + \def\vr@f#1{% + \leavevmode\unskip\vref@space + \begingroup + \let\T@pageref\@pagerefstar + \hyperref[{#1}]{% + \ref*{#1}% + \vpageref[\unskip]{#1}% + }% + \endgroup + }% + }{}% +} +\DeclareRobustCommand*{\autopageref}{% + \@ifstar{% + \HyRef@autopagerefname\pageref*% + }\HyRef@autopageref +} +\def\HyRef@autopageref#1{% + \hyperref[{#1}]{\HyRef@autopagerefname\pageref*{#1}}% +} +\def\HyRef@autopagerefname{% + \@ifundefined{pageautorefname}{% + \@ifundefined{pagename}{% + \Hy@Warning{No autoref name for `page'}% + }{% + \pagename\nobreakspace + }% + }{% + \pageautorefname\nobreakspace + }% +} +\DeclareRobustCommand*{\autoref}{% \@ifstar{\HyRef@autoref\@gobbletwo}{\HyRef@autoref\hyper@@link}% } \def\HyRef@autoref#1#2{% @@ -8240,12 +8691,13 @@ \endgroup } \def\HyRef@autosetref#1#2#3{% link command, csname, refname + \HyRef@ShowKeysRef{#2}% \ifcase 0\ifx#1\relax 1\fi\ifx#1\Hy@varioref@undefined 1\fi\relax \edef\HyRef@thisref{\expandafter\@fourthoffive#1\@empty\@empty\@empty}% - \expandafter\HyRef@testreftype\HyRef@thisref\\% + \expandafter\HyRef@testreftype\HyRef@thisref.\\% \Hy@safe@activesfalse #3{% - \expandafter\@fifthoffive#1% + \expandafter\@fifthoffive#1\@empty\@empty\@empty }{% \expandafter\@fourthoffive#1\@empty\@empty\@empty }{% @@ -8264,8 +8716,23 @@ \def\HyRef@testreftype#1.#2\\{% \@ifundefined{#1autorefname}{% \@ifundefined{#1name}{% - \def\HyRef@currentHtag{}% - \@latex@warning{no tag name for #1 at \the\inputlineno}% + \HyRef@StripStar#1\\*\\\@nil{#1}% + \@ifundefined{\HyRef@name autorefname}{% + \@ifundefined{\HyRef@name name}{% + \def\HyRef@currentHtag{}% + \Hy@Warning{No autoref name for `#1'}% + }{% + \edef\HyRef@currentHtag{% + \expandafter\noexpand\csname\HyRef@name name\endcsname + \noexpand~% + }% + }% + }{% + \edef\HyRef@currentHtag{% + \expandafter\noexpand\csname\HyRef@name autorefname\endcsname + \noexpand~% + }% + }% }{% \edef\HyRef@currentHtag{% \expandafter\noexpand\csname#1name\endcsname @@ -8279,9 +8746,46 @@ }% }% } +\def\HyRef@StripStar#1*\\#2\@nil#3{% + \def\HyRef@name{#2}% + \ifx\HyRef@name\HyRef@CaseStar + \def\HyRef@name{#1}% + \else + \def\HyRef@name{#3}% + \fi +} +\def\HyRef@CaseStar{*\\} \def\HyRef@currentHtag{} % \end{macrocode} % +% Support for package |showkeys|. +% \begin{macro}{\HyRef@ShowKeysRef} +% \begin{macrocode} +\let\HyRef@ShowKeysRef\@gobble +\def\HyRef@ShowKeysInit{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname SK@@label\endcsname\relax + \else + \ifx\SK@ref\@empty + \else + \def\HyRef@ShowKeysRef{% + \SK@\SK@@ref + }% + \fi + \fi +} +\@ifpackageloaded{showkeys}{% + \HyRef@ShowKeysInit +}{% + \AtBeginDocument{% + \@ifpackageloaded{showkeys}{% + \HyRef@ShowKeysInit + }{}% + }% +} +% \end{macrocode} +% \end{macro} +% % Defaults for the names that \cmd{\autoref} uses. % \begin{macrocode} \providecommand*\AMSautorefname{\equationautorefname} @@ -8303,6 +8807,7 @@ \providecommand*\subparagraphautorefname{subparagraph} \providecommand*\FancyVerbLineautorefname{line} \providecommand*\theoremautorefname{Theorem} +\providecommand*\pageautorefname{page} % \end{macrocode} % % \begin{macrocode} @@ -8340,7 +8845,7 @@ }% |def|Hy@ExchangeBackslash#1\#2|@nil{% #1% - |ifx|\#2|\% + |ifx|\#2|\%% |else \\% |Hy@ReturnAfterFi{% @@ -8348,7 +8853,7 @@ }% |fi }% - } + }% \def\Hy@ExchangeLeftParenthesis#1(#2\@nil{% #1% \ifx\\#2\\% @@ -8358,7 +8863,7 @@ \Hy@ExchangeLeftParenthesis#2\@nil }% \fi - } + }% \def\Hy@ExchangeRightParenthesis#1)#2\@nil{% #1% \ifx\\#2\\% @@ -8368,7 +8873,7 @@ \Hy@ExchangeRightParenthesis#2\@nil }% \fi - } + }% \else \def\Hy@pstringdef#1#2{% \edef#1{\pdfescapestring{#2}}% @@ -8399,7 +8904,7 @@ \let\pdflastxform\pdflastform \let\pdfrefxform\pdfrefform \else - \pdflinkmargin1pt + \pdflinkmargin1pt % \fi % \end{macrocode} % First set up the default linking @@ -8452,7 +8957,10 @@ \else /H\@pdfhighlight \fi - /C[\CurrentBorderColor]% + \ifx\CurrentBorderColor\relax + \else + /C[\CurrentBorderColor]% + \fi }\Hy@testname \expandafter\Hy@colorlink\csname @#1color\endcsname } @@ -8464,14 +8972,23 @@ \def\hyper@anchorstart#1{\new@pdflink{#1}\Hy@activeanchortrue} \def\hyper@anchorend{\pdf@endanchor\Hy@activeanchorfalse} \def\hyper@linkstart#1#2{% - \edef\CurrentBorderColor{\csname @#1bordercolor\endcsname}% - \find@pdflink{#1}{#2}} + \@ifundefined{@#1bordercolor}{% + \let\CurrentBorderColor\relax + }{% + \edef\CurrentBorderColor{\csname @#1bordercolor\endcsname}% + }% + \find@pdflink{#1}{#2}% +} \def\hyper@linkend{\close@pdflink} \def\hyper@link#1#2#3{% - \edef\CurrentBorderColor{\csname @#1bordercolor\endcsname}% + \@ifundefined{@#1bordercolor}{% + \let\CurrentBorderColor\relax + }{% + \edef\CurrentBorderColor{\csname @#1bordercolor\endcsname}% + }% \find@pdflink{#1}{#2}#3\close@pdflink } -\def\CurrentBorderColor{\@linkbordercolor} +\let\CurrentBorderColor\@linkbordercolor \def\hyper@linkurl#1#2{% \begingroup \Hy@pstringdef\Hy@pstringURI{#2}% @@ -8484,7 +9001,10 @@ \else /H\@pdfhighlight \fi - /C[\@urlbordercolor]% + \ifx\@urlbordercolor\relax + \else + /C[\@urlbordercolor]% + \fi }% user{% /Subtype/Link% @@ -8511,7 +9031,10 @@ \else /H\@pdfhighlight \fi - /C[\@filebordercolor]% + \ifx\@filebordercolor\relax + \else + /C[\@filebordercolor]% + \fi }% user {% /Subtype/Link% @@ -8557,7 +9080,10 @@ \else /H\@pdfhighlight \fi - /C[\@runbordercolor]% + \ifx\@runbordercolor\relax + \else + /C[\@runbordercolor]% + \fi }% user {% /Subtype/Link% @@ -8572,7 +9098,7 @@ >>% }% \relax - \Hy@colorlink\@filecolor#2% + \Hy@colorlink\@runcolor#2% \close@pdflink \endgroup } @@ -8580,13 +9106,13 @@ % \begin{macro}{\@pdfproducer} % \begin{macrocode} \ifx\@pdfproducer\relax - \def\@pdfproducer{pdfTeX} + \def\@pdfproducer{pdfTeX}% \ifx\eTeXversion\@undefined \else \ifx\eTeXversion\relax \else \ifnum\eTeXversion>0 % - \def\@pdfproducer{pdfeTeX} + \def\@pdfproducer{pdfeTeX}% \fi \fi \fi @@ -8596,7 +9122,7 @@ \edef\@pdfproducer{% \@pdfproducer \the\pdftexversion.\pdftexrevision - } + }% \else \ifnum\pdftexversion<130 % \edef\@pdfproducer{% @@ -8604,7 +9130,7 @@ \expandafter\@car\the\pdftexversion\@empty\@nil.% \expandafter\@cdr\the\pdftexversion\@empty\@nil \pdftexrevision - } + }% \else \ifnum\pdftexversion<140 % \else @@ -8922,10 +9448,13 @@ \else /H\@pdfhighlight \fi - /C[\@menubordercolor]% + \ifx\@menubordercolor\relax + \else + /C[\@menubordercolor]% + \fi }% - user{ - /Subtype /Link + user{% + /Subtype/Link% /A<<% /S/Named/N/#1% >>% @@ -9121,8 +9650,8 @@ } \def\hyper@linkstart#1#2{% \expandafter\Hy@colorlink\csname @#1color\endcsname - \special{button: - 10000000 + \special{button: % + 10000000 % \number\baselineskip\space #2% }% @@ -9136,7 +9665,7 @@ \ifHy@raiselinks \@linkdim\dp\@tempboxa \lower\@linkdim\hbox{% - \special{button: + \special{button: % \number\wd\@tempboxa\space \number\ht\@tempboxa\space #2% @@ -9148,7 +9677,7 @@ \advance\@linkdim by -6.5\p@ \raise\@linkdim\hbox{}% \else - \special{button: + \special{button: % \number\wd\@tempboxa\space \number\ht\@tempboxa\space #2% @@ -9164,7 +9693,7 @@ \ifHy@raiselinks \@linkdim\dp\@tempboxa \lower\@linkdim\hbox{% - \special{button: + \special{button: % \number\wd\@tempboxa\space \number\ht\@tempboxa\space launch: \wwwbrowser\space @@ -9176,7 +9705,7 @@ \advance\@linkdim by -6.5\p@ \raise\@linkdim\hbox{}% \else - \special{button: + \special{button: % \number\wd\@tempboxa\space \number\ht\@tempboxa\space launch: \wwwbrowser\space @@ -9194,10 +9723,10 @@ \ifHy@raiselinks \@linkdim\dp\@tempboxa \lower\@linkdim\hbox{% - \special{button: + \special{button: % \number\wd\@tempboxa\space \number\ht\@tempboxa\space - #3, + #3,% file: #2% }% \Hy@colorlink\@filecolor#1\Hy@endcolorlink @@ -9206,18 +9735,18 @@ \advance\@linkdim by -6.5\p@ \raise\@linkdim\hbox{}% \else - \special{button: + \special{button: % \number\wd\@tempboxa\space \number\ht\@tempboxa\space - #3, - file: #2 + #3,% + file: #2% }% \Hy@colorlink\@filecolor#1\Hy@endcolorlink \fi \endgroup } \ifx\@pdfproducer\relax - \def\@pdfproducer{dviwindo + Distiller} + \def\@pdfproducer{dviwindo + Distiller}% \fi \def\PDF@FinishDoc{% \Hy@UseMaketitleInfos @@ -9255,9 +9784,9 @@ \ifx\@pdfpagescrop\@empty\else \special{PDF: BBox \@pdfpagescrop}% \fi - \pdfmark{pdfmark=/DOCVIEW, - Page=\@pdfstartpage, - View=\@pdfstartview, + \pdfmark{pdfmark=/DOCVIEW,% + Page=\@pdfstartpage,% + View=\@pdfstartview,% PageMode=/\@pdfpagemode }% \ifx\@pdfpagescrop\@empty @@ -9292,9 +9821,9 @@ /NumCopies \@pdfnumcopies \fi }% - \pdfmark{pdfmark=/PUT, + \pdfmark{pdfmark=/PUT,% Raw={% - \string{Catalog\string} << + \string{Catalog\string}<<% \ifx\Hy@temp\@empty \else /ViewerPreferences<<\Hy@temp>>% @@ -9390,16 +9919,19 @@ \Hy@pstringdef\Hy@testname\Hy@testname \fi \@pdfm@mark{% - bann << - /Type /Annot - /Subtype /Link + bann<<% + /Type/Annot% + /Subtype/Link% \Hy@setpdfborder - /C [\csname @#1bordercolor\endcsname] - /A << - /S /GoTo - /D (\Hy@testname) - >> - >> + \expandafter\ifx\csname @#1bordercolor\endcsname\relax + \else + /C[\csname @#1bordercolor\endcsname]% + \fi + /A<<% + /S/GoTo% + /D(\Hy@testname)% + >>% + >>% }% \expandafter\Hy@colorlink\csname @#1color\endcsname } @@ -9415,17 +9947,20 @@ \Hy@pstringdef\Hy@pstringD{#3}% \leavevmode \@pdfm@mark{% - bann << - /Type /Annot - /Subtype /Link + bann<<% + /Type/Annot% + /Subtype/Link% \Hy@setpdfborder - /C [\@filebordercolor] - /A << - /S /GoToR - /F (\Hy@pstringF) - /D \ifx\\#3\\[0 \@pdfstartview]\else(\Hy@pstringD)\fi\space - \ifHy@newwindow /NewWindow true \fi - >> + \ifx\@filebordercolor\relax + \else + /C[\@filebordercolor]% + \fi + /A<<% + /S/GoToR% + /F(\Hy@pstringF)% + /D\ifx\\#3\\[0 \@pdfstartview]\else(\Hy@pstringD)\fi + \ifHy@newwindow /NewWindow true\fi + >>% >>% }% \Hy@colorlink\@filecolor#1\Hy@endcolorlink @@ -9436,38 +9971,44 @@ \Hy@pstringdef\Hy@pstringP{#3}% \leavevmode \@pdfm@mark{% - bann << - /Type /Annot - /Subtype /Link + bann<<% + /Type/Annot% + /Subtype/Link% \Hy@setpdfborder - /C [\@filebordercolor] - /A << - /S /Launch - /F (\Hy@pstringF) - \ifHy@newwindow /NewWindow true \fi + \ifx\@runbordercolor\relax + \else + /C[\@runbordercolor]% + \fi + /A<<% + /S/Launch% + /F(\Hy@pstringF)% + \ifHy@newwindow /NewWindow true\fi \ifx\\#3\\% \else - /Win << /P (\Hy@pstringP) /F (\Hy@pstringF) >> + /Win<</P(\Hy@pstringP)/F(\Hy@pstringF)>>% \fi - >> + >>% >>% }% - \Hy@colorlink\@filecolor#2\Hy@endcolorlink + \Hy@colorlink\@runcolor#2\Hy@endcolorlink \@pdfm@mark{eann}% } \def\hyper@linkurl#1#2{% \Hy@pstringdef\Hy@pstringURI{#2}% \leavevmode \@pdfm@mark{% - bann << - /Type /Annot - /Subtype /Link + bann<<% + /Type/Annot% + /Subtype/Link% \Hy@setpdfborder - /C [\@urlbordercolor] - /A << - /S /URI - /URI (\Hy@pstringURI) - >> + \ifx\@urlbordercolor\relax + \else + /C[\@urlbordercolor]% + \fi + /A<<% + /S/URI% + /URI(\Hy@pstringURI)% + >>% >>% }% \Hy@colorlink\@urlcolor#1\Hy@endcolorlink @@ -9476,44 +10017,47 @@ \def\Acrobatmenu#1#2{% \leavevmode \@pdfm@mark{% - bann << - /Type /Annot - /Subtype /Link - /A << - /S /Named - /N /#1 - >> + bann<<% + /Type/Annot% + /Subtype/Link% + /A<<% + /S/Named% + /N/#1% + >>% \Hy@setpdfborder - /C [\@menubordercolor] + \ifx\@menubordercolor\relax + \relax + /C[\@menubordercolor]% + \fi >>% }% \Hy@colorlink\@menucolor#2\Hy@endcolorlink \@pdfm@mark{eann}% } \ifx\@pdfproducer\relax - \def\@pdfproducer{dvipdfm} + \def\@pdfproducer{dvipdfm}% \fi \def\PDF@FinishDoc{% \Hy@UseMaketitleInfos \@pdfm@mark{% - docinfo << - /Title (\@pdftitle) - /Subject (\@pdfsubject) - /Creator (\@pdfcreator) + docinfo<<% + /Title(\@pdftitle)% + /Subject(\@pdfsubject)% + /Creator(\@pdfcreator)% \ifx\@pdfcreationdate\@empty \else - /CreationDate(\@pdfcreationdate) % + /CreationDate(\@pdfcreationdate)% \fi \ifx\@pdfmoddate\@empty \else - /ModDate(\@pdfmoddate) % + /ModDate(\@pdfmoddate)% \fi - /Author (\@pdfauthor) + /Author(\@pdfauthor)% \ifx\@pdfproducer\relax \else - /Producer (\@pdfproducer) + /Producer(\@pdfproducer)% \fi - /Keywords (\@pdfkeywords) + /Keywords(\@pdfkeywords)% >>% }% \Hy@DisableOption{pdfauthor}% @@ -9558,7 +10102,7 @@ }% \Hy@pstringdef\Hy@pstringB{\@baseurl}% \@pdfm@mark{% - docview <<% + docview<<% \ifx\@pdfstartview\@empty \else /OpenAction[@page\@pdfstartpage\@pdfstartview]% @@ -9581,7 +10125,7 @@ }% \ifx\@pdfpagescrop\@empty \else - \@pdfm@mark{put @pages <</CropBox[\@pdfpagescrop]>>} + \@pdfm@mark{put @pages <</CropBox[\@pdfpagescrop]>>}% \fi } %</dvipdfm> @@ -9678,10 +10222,10 @@ } \def\@TextField[#1]#2{% parameters, label \typeout{Sorry, TeXpider does not yet support FORM text fields}% - } +} \def\@CheckBox[#1]#2{% parameters, label \typeout{Sorry, TeXpider does not yet support FORM checkboxes}% - } +} \def\@ChoiceMenu[#1]#2#3{% parameters, label, choices \typeout{Sorry, TeXpider does not yet support FORM choice menus}% } @@ -9733,7 +10277,7 @@ \providecommand*\@pdfview{xyz} \providecommand*\@pdfborder{0 0 1} \providecommand*\@pdfborderstyle{} -\def\CurrentBorderColor{\@linkbordercolor} +\let\CurrentBorderColor\@linkbordercolor \def\hyper@anchor#1{% \Hy@SaveLastskip \begingroup @@ -9763,12 +10307,22 @@ \def\hyper@linkstart#1#2{% \Hy@pstringdef\Hy@pstringURI{#2}% \expandafter\Hy@colorlink\csname @#1color\endcsname - \edef\CurrentBorderColor{\csname @#1bordercolor\endcsname}% + \@ifundefined{@#1bordercolor}{% + \let\CurrentBorderColor\relax + }{% + \edef\CurrentBorderColor{\csname @#1bordercolor\endcsname}% + }% \def\Hy@tempa{#1}% \ifx\Hy@tempa\@urltype \special{!% aref <u=/Type /Action /S /URI /URI (\Hy@pstringURI)>;% - a=<\Hy@setpdfborder /C [\CurrentBorderColor]>% + a=<% + \Hy@setpdfborder + \ifx\CurrentBorderColor\relax + \else + /C [\CurrentBorderColor]% + \fi + >% }% \else \protected@edef\Hy@testname{#2}% @@ -9777,7 +10331,13 @@ \fi \special{!% aref \Hy@testname;% - a=<\Hy@setpdfborder /C [\CurrentBorderColor]>% + a=<% + \Hy@setpdfborder + \ifx\CurrentBorderColor\relax + \else + /C [\CurrentBorderColor]% + \fi + >% }% \fi } @@ -9791,7 +10351,13 @@ aref <% \ifnum\Hy@VTeXversion>753 \ifHy@newwindow n\fi\fi f=#2>#3;% - a=<\Hy@setpdfborder /C [\@filebordercolor]>% + a=<% + \Hy@setpdfborder + \ifx\@filebordercolor\relax + \else + /C [\@filebordercolor]% + \fi + >% }% \Hy@colorlink\@filecolor#1\Hy@endcolorlink \special{!endaref}% @@ -9803,14 +10369,24 @@ \leavevmode \special{!% aref <u=/Type /Action /S /URI /URI (\Hy@pstringURI)>;% - a=<\Hy@setpdfborder /C [\@urlbordercolor]>% + a=<% + \Hy@setpdfborder + \ifx\@urlbordercolor\relax + \else + /C [\@urlbordercolor]% + \fi + >% }% \Hy@colorlink\@urlcolor#1\Hy@endcolorlink \special{!endaref}% \endgroup } \def\hyper@link#1#2#3{% - \edef\CurrentBorderColor{\csname @#1bordercolor\endcsname}% + \@ifundefined{@#1bordercolor}{% + \let\CurrentBorderColor\relax + }{% + \edef\CurrentBorderColor{\csname @#1bordercolor\endcsname}% + }% \leavevmode \protected@edef\Hy@testname{#2}% \ifx\Hy@testname\@empty @@ -9818,7 +10394,13 @@ \fi \special{!% aref \Hy@testname;% - a=<\Hy@setpdfborder /C [\CurrentBorderColor]>% + a=<% + \Hy@setpdfborder + \ifx\CurrentBorderColor\relax + \else + /C [\CurrentBorderColor]% + \fi + >% }% \expandafter\Hy@colorlink\csname @#1color\endcsname#3\Hy@endcolorlink \special{!endaref}% @@ -9830,24 +10412,36 @@ \Hy@pstringdef\Hy@pstringF{#1}% \Hy@pstringdef\Hy@pstringP{#3}% \leavevmode - \special{!aref + \special{!aref % <u=% - /Type /Action - /S /Launch - /F (\Hy@pstringF) + /Type/Action% + /S/Launch% + /F(\Hy@pstringF)% \ifHy@newwindow /NewWindow true \fi - \ifx\\#3\\\else /Win << /F (\Hy@pstringF) /P (\Hy@pstringP) >> \fi% + \ifx\\#3\\\else /Win<</F(\Hy@pstringF)/P(\Hy@pstringP)>>\fi% >;% - a=<\Hy@setpdfborder /C [\@runbordercolor]>% + a=<% + \Hy@setpdfborder + \ifx\@runbordercolor\relax + \else + /C[\@runbordercolor]% + \fi + >% }% - \Hy@colorlink\@filecolor#2\Hy@endcolorlink + \Hy@colorlink\@runcolor#2\Hy@endcolorlink \special{!endaref}% } \def\Acrobatmenu#1#2{% \leavevmode \special{!% aref <u=/S /Named /N /#1>;% - a=<\Hy@setpdfborder /C [\@menubordercolor]>% + a=<% + \Hy@setpdfborder + \ifx\@menubordercolor\relax + \else + /C[\@menubordercolor]% + \fi + >% }% \Hy@colorlink\@menucolor#2\Hy@endcolorlink \special{!endaref}% @@ -9878,7 +10472,7 @@ \hvtex@parse@trans\@pdfpagetransition \fi \fi - } + }% % \end{macrocode} % % I have to write an ``honest'' parser to convert raw PDF code @@ -9905,26 +10499,26 @@ % % Transition codes: % \begin{macrocode} - \def\hvtex@trans@effect@Blinds{\def\hvtex@trans@code{B}} - \def\hvtex@trans@effect@Box{\def\hvtex@trans@code{X}} - \def\hvtex@trans@effect@Dissolve{\def\hvtex@trans@code{D}} - \def\hvtex@trans@effect@Glitter{\def\hvtex@trans@code{G}} - \def\hvtex@trans@effect@Split{\def\hvtex@trans@code{S}} - \def\hvtex@trans@effect@Wipe{\def\hvtex@trans@code{W}} - \def\hvtex@trans@effect@R{\def\hvtex@trans@code{R}} + \def\hvtex@trans@effect@Blinds{\def\hvtex@trans@code{B}}% + \def\hvtex@trans@effect@Box{\def\hvtex@trans@code{X}}% + \def\hvtex@trans@effect@Dissolve{\def\hvtex@trans@code{D}}% + \def\hvtex@trans@effect@Glitter{\def\hvtex@trans@code{G}}% + \def\hvtex@trans@effect@Split{\def\hvtex@trans@code{S}}% + \def\hvtex@trans@effect@Wipe{\def\hvtex@trans@code{W}}% + \def\hvtex@trans@effect@R{\def\hvtex@trans@code{R}}% % \end{macrocode} % % Optional parameters: % \begin{macrocode} - \def\hvtex@par@dimension{/Dm} - \def\hvtex@par@direction{/Di} - \def\hvtex@par@duration{/D} - \def\hvtex@par@motion{/M} + \def\hvtex@par@dimension{/Dm}% + \def\hvtex@par@direction{/Di}% + \def\hvtex@par@duration{/D}% + \def\hvtex@par@motion{/M}% % \end{macrocode} % % Tokenizer: % \begin{macrocode} - \def\hvtex@gettoken{\expandafter\hvtex@gettoken@\hvtex@buffer\@nil} + \def\hvtex@gettoken{\expandafter\hvtex@gettoken@\hvtex@buffer\@nil}% % \end{macrocode} % % Notice that tokens in the input buffer must be space delimited. @@ -9932,7 +10526,7 @@ \def\hvtex@gettoken@#1 #2\@nil{% \edef\hvtex@token{#1}% \edef\hvtex@buffer{#2}% - } + }% \def\hvtex@parse@trans#1{% % \end{macrocode} % @@ -9965,7 +10559,7 @@ % Now is time to parse optional parameters. % \begin{macrocode} \hvtex@trans@params - } + }% % \end{macrocode} % % Reentrable macro to parse optional parameters. @@ -10012,7 +10606,7 @@ \let\next\hvtex@trans@params \fi \next - } + }% % \end{macrocode} % % Merge |<transition_effect>| and issue the special when possible. @@ -10054,7 +10648,7 @@ % \begin{macrocode} \special{!trans \vtex@trans@special}% \fi - } + }% % \end{macrocode} % \begin{macrocode} \def\hyper@pageduration{% @@ -10066,12 +10660,12 @@ \special{!duration \@pdfpageduration}% \fi \fi - } + }% \def\hyper@pagehidden{% \ifHy@useHidKey \special{!hidden\ifHy@pdfpagehidden +\else -\fi}% \fi - } + }% \fi % \end{macrocode} % @@ -10092,12 +10686,12 @@ % \end{tabular} % \begin{macrocode} \ifx\@pdfproducer\relax - \def\@pdfproducer{VTeX} + \def\@pdfproducer{VTeX}% \ifnum\Hy@VTeXversion>\z@ \count@\VTeXversion - \divide\count@ 100 - \edef\@pdfproducer{\@pdfproducer\space v\the\count@} - \multiply\count@ -100 + \divide\count@ 100 % + \edef\@pdfproducer{\@pdfproducer\space v\the\count@}% + \multiply\count@ -100 % \advance\count@\VTeXversion \edef\@pdfproducer{% \@pdfproducer @@ -10119,7 +10713,7 @@ \ifx\gexmode\@undefined\else \ifnum\gexmode>\z@\space with GeX\fi \fi - } + }% \fi \fi % \end{macrocode} @@ -10332,7 +10926,6 @@ linktype=anchor,% View=/\@pdfview \@pdfviewparams,% DestAnchor=\hyper@currentanchor,% - Raw=H.B% }% \Hy@activeanchorfalse \Hy@RestoreLastskip @@ -10349,7 +10942,11 @@ } \def\hyper@linkend{% \literalps@out{\strip@pt@and@otherjunk\baselineskip\space H.L}% - \edef\Hy@tempcolor{\csname @\hyper@currentlinktype bordercolor\endcsname}% + \@ifundefined{@\hyper@currentlinktype bordercolor}{% + \let\Hy@tempcolor\relax + }{% + \edef\Hy@tempcolor{\csname @\hyper@currentlinktype bordercolor\endcsname}% + }% \pdfmark{% pdfmark=/ANN,% linktype=link,% @@ -10378,8 +10975,8 @@ % wrote this bit of code. % \begin{macrocode} \begingroup - \catcode`P=12 - \catcode`T=12 + \catcode`P=12 % + \catcode`T=12 % \lowercase{\endgroup \gdef\rem@ptetc#1.#2PT#3!{#1\ifnum#2>\z@.#2\fi}% } @@ -10447,10 +11044,15 @@ % \begin{macrocode} %</pdfmark> \def\hyper@image#1#2{% - \hyper@linkurl{#2}{#1}} + \hyper@linkurl{#2}{#1}% +} \def\Hy@undefinedname{UNDEFINED} \def\hyper@link#1#2#3{% - \edef\Hy@tempcolor{\csname @#1bordercolor\endcsname}% + \@ifundefined{@#1bordercolor}{% + \let\Hy@tempcolor\relax + }{% + \edef\Hy@tempcolor{\csname @#1bordercolor\endcsname}% + }% \begingroup \protected@edef\Hy@testname{#2}% \ifx\Hy@testname\@empty @@ -10566,7 +11168,7 @@ \pdfmark{% pdfmark=/PUT,% Raw={% - \string{Catalog\string} << + \string{Catalog\string}<<% \ifx\Hy@temp\@empty \else /ViewerPreferences<<\Hy@temp>>% @@ -10578,7 +11180,7 @@ \fi \ifx\@baseurl\@empty \else - /URI << /Base (\Hy@pstringB) >>% + /URI<</Base(\Hy@pstringB)>>% \fi >>% }% @@ -10649,6 +11251,7 @@ \newsavebox{\pdf@box} \providecommand*{\Hy@setouterhbox}{\sbox} \providecommand*{\Hy@breaklinksunhbox}{\unhbox} +\def\Hy@DEST{/DEST} \def\pdf@rect#1{% %<dvipdf> \literalps@out{/ANN \pdf@type\space\the\pdf@toks\space <<}#1% \leavevmode @@ -10687,7 +11290,10 @@ \else \raise\dimen@\hbox{\literalps@out{H.R}}% \fi - \pdf@addtoksx{H.B}% + \ifx\pdf@type\Hy@DEST + \else + \pdf@addtoksx{H.B}% + \fi } % \end{macrocode} % All the supplied material is stored in a token list; since I do not @@ -10726,9 +11332,10 @@ \edef\Hy@temp{#1}% \ifx\Hy@temp\@empty \else - \pdf@addtoks{[#1]}{Border}% + \pdf@addtoks{[#1]\Hy@BorderArrayPatch}{Border}% \fi } +\let\Hy@BorderArrayPatch\@empty % parameter is a dictionary \define@key{PDF}{BorderStyle}{% \edef\Hy@temp{#1}% @@ -10738,7 +11345,12 @@ \fi } % parameter is a array -\define@key{PDF}{Color}{\pdf@addtoks{[#1]}{Color}} +\define@key{PDF}{Color}{% + \ifx\relax#1\relax + \else + \pdf@addtoks{[#1]}{Color}% + \fi +} % parameter is a string \define@key{PDF}{Contents}{\pdf@addtoks{(#1)}{Contents}} % parameter is a integer @@ -10851,7 +11463,7 @@ #1,% Border=\@pdfborder,% BorderStyle=\@pdfborderstyle,% - Color=.2 .1 .5, + Color=.2 .1 .5,% pdfmark=/ANN,% Subtype=/Link,% Page=/Next% @@ -10875,35 +11487,6 @@ \pdfmark{#1,pdfmark=/DOCVIEW}% } % \end{macrocode} -% This is not as simple as it looks; if we make the argument of -% this macro eg |\pageref{foo}| and expect it to expand to `3', -% we need a special version of |\pageref| -% which does \emph{not} produce -% `3 \hbox{}'\ldots. David Carlisle looked at this bit and provided -% the solution, as ever! -% \begin{macrocode} -\def\PDFPage{\@ifnextchar[{\PDFPage@}{\PDFPage@[]}} -\def\PDFPage@[#1]#2#3{% - \let\pageref\simple@pageref - \pdfmark[{#3}]{% - #1,% - Page={#2},% - AcroHighlight=\@pdfhighlight,% - Border=\@pdfborder,% - BorderStyle=\@pdfborderstyle,% - Color=\@pagebordercolor,% - pdfmark=/ANN,% - Subtype=/Link% - }% -} -\def\simple@pageref#1{% - \expandafter\ifx\csname r@#1\endcsname\relax - 0% - \else - \expandafter\expandafter\expandafter - \@secondoffive\csname r@#1\endcsname - \fi} -% \end{macrocode} % This will only work if you use Distiller 2.1 or higher. % \begin{macrocode} \def\hyper@linkurl#1#2{% @@ -10944,34 +11527,38 @@ %<*pdfmark> \pdfmark[{#1}]{% pdfmark=/ANN,% - Subtype=/Link, + Subtype=/Link,% AcroHighlight=\@pdfhighlight,% Border=\@pdfborder,% BorderStyle=\@pdfborderstyle,% linktype=file,% Color=\@filebordercolor,% - Action={<< - /S /GoToR - \ifHy@newwindow /NewWindow true \fi - /F (\Hy@pstringF) - /D \ifx\\#3\\[0 \@pdfstartview]\else(\Hy@pstringD) cvn\fi - >>}% + Action={% + <<% + /S/GoToR% + \ifHy@newwindow /NewWindow true\fi + /F(\Hy@pstringF)% + /D\ifx\\#3\\[0 \@pdfstartview]\else(\Hy@pstringD)cvn\fi + >>% + }% }% %</pdfmark> %<*dvipdf> \pdfmark[{#1}]{% pdfmark=/LNK,% - linktype=file, + linktype=file,% AcroHighlight=\@pdfhighlight,% Border=\@pdfborder,% BorderStyle=\@pdfborderstyle,% Color=\@filebordercolor,% - Action={<< - /S /GoToR - \ifHy@newwindow /NewWindow true \fi - /F (\Hy@pstringF) - /D \ifx\\#3\\[0 \@pdfstartview]\else(\Hy@pstringD) cvn\fi - >>}% + Action={% + <<% + /S/GoToR% + \ifHy@newwindow /NewWindow true\fi + /F(\Hy@pstringF)% + /D\ifx\\#3\\[0 \@pdfstartview]\else(\Hy@pstringD)cvn\fi + >>% + }% }% %</dvipdf> \endgroup @@ -10988,17 +11575,19 @@ AcroHighlight=\@pdfhighlight,% Border=\@pdfborder,% BorderStyle=\@pdfborderstyle,% - linktype=file,% - Color=\@filebordercolor,% - Action={<< - /S /Launch - \ifHy@newwindow /NewWindow true \fi - /F (\Hy@pstringF) - \ifx\\#3\\% - \else - /Win << /P (\Hy@pstringP) /F (\Hy@pstringF) >> - \fi - >>}% + linktype=run,% + Color=\@runbordercolor,% + Action={% + <<% + /S/Launch% + \ifHy@newwindow /NewWindow true\fi + /F(\Hy@pstringF)% + \ifx\\#3\\% + \else + /Win<</P(\Hy@pstringP)/F(\Hy@pstringF)>>% + \fi + >>% + }% }% %</pdfmark> %<*dvipdf> @@ -11009,15 +11598,17 @@ Border=\@pdfborder,% BorderStyle=\@pdfborderstyle,% Color=\@filebordercolor,% - Action={<< - /S /GoToR - \ifHy@newwindow /NewWindow true \fi - /F (\Hy@pstringF) - \ifx\\#3\\% - \else - /Win << /P (\Hy@pstringP) /F (\Hy@pstringF) >> - \fi - >>}% + Action={% + <<% + /S/GoToR% + \ifHy@newwindow /NewWindow true\fi + /F(\Hy@pstringF)% + \ifx\\#3\\% + \else + /Win<</P(\Hy@pstringP)/F(\Hy@pstringF)>>% + \fi + >>% + }% }% %</dvipdf> \endgroup @@ -11040,14 +11631,15 @@ %<*dvips> \input{pdfmark.def}% \ifx\@pdfproducer\relax - \def\@pdfproducer{dvips + Distiller} + \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 12} +\providecommand*\@pdfborder{0 0 1} \providecommand*\@pdfborderstyle{} \providecommand*\@pdfview{XYZ} \providecommand*\@pdfviewparams{ H.V} +\def\Hy@BorderArrayPatch{BorderArrayPatch} % \end{macrocode} % % \begin{macrocode} @@ -11068,26 +11660,38 @@ % understandable (and exact) if 0.013 div would be replaced by 72.27 mul, % so here we go. If this isn't right, I'll revert it. % \begin{macrocode} - /DvipsToPDF { 72.27 mul Resolution div } def - /PDFToDvips { 72.27 div Resolution mul } def + /DvipsToPDF{72.27 mul Resolution div} def% + /PDFToDvips{72.27 div Resolution mul} def% + /BPToDvips{72 div Resolution mul}def% +% \end{macrocode} +% The values inside the /Boder array are not taken literally, but +% interpreted by ghostscript using the resolution of the dvi driver. +% I don't know how other distiller programs behaves in this manner. +% \begin{macrocode} + /BorderArrayPatch{% + [exch{% + dup dup type/integertype eq exch type/realtype eq or% + {BPToDvips}if% + }forall]% + }def% % \end{macrocode} % The rectangle around the links starts off % \emph{exactly} the size of the box; % we will to make it slightly bigger, 1 point on all sides. % \begin{macrocode} - /HyperBorder { 1 PDFToDvips } def - /H.V {pdf@hoff pdf@voff null} def - /H.B {/Rect[pdf@llx pdf@lly pdf@urx pdf@ury]} def + /HyperBorder {1 PDFToDvips} def% + /H.V {pdf@hoff pdf@voff null} def% + /H.B {/Rect[pdf@llx pdf@lly pdf@urx pdf@ury]} def% % \end{macrocode} % |H.S| (start of anchor, link, or rect) stores % the $x$ and $y$ coordinates of the current point, in PDF coordinates % \begin{macrocode} - /H.S { - currentpoint - HyperBorder add /pdf@lly exch def - dup DvipsToPDF /pdf@hoff exch def - HyperBorder sub /pdf@llx exch def - } def + /H.S {% + currentpoint % + HyperBorder add /pdf@lly exch def % + dup DvipsToPDF 72 add /pdf@hoff exch def % + HyperBorder sub /pdf@llx exch def% + } def% % \end{macrocode} % % The calculation of upper left $y$ is done without @@ -11101,40 +11705,40 @@ % Argument: baselineskip in pt. % The $x$ and $y$ coordinates of the current point, minus the baselineskip % \begin{macrocode} - /H.L { - 2 sub dup - /HyperBasePt exch def - PDFToDvips /HyperBaseDvips exch def - currentpoint - HyperBaseDvips sub /pdf@ury exch def - /pdf@urx exch def - } def - /H.A { - H.L + /H.L {% + 2 sub dup% + /HyperBasePt exch def % + PDFToDvips /HyperBaseDvips exch def % + currentpoint % + HyperBaseDvips sub /pdf@ury exch def% + /pdf@urx exch def% + } def% + /H.A {% + H.L % % |/pdf@voff| = the distance from the top of the page to a point % |\baselineskip| above the current point in PDF coordinates - currentpoint exch pop - vsize 72 sub exch DvipsToPDF + currentpoint exch pop % + vsize 72 sub exch DvipsToPDF % HyperBasePt sub % baseline skip - sub /pdf@voff exch def - } def - /H.R { - currentpoint - HyperBorder sub /pdf@ury exch def - HyperBorder add /pdf@urx exch def + sub /pdf@voff exch def% + } def% + /H.R {% + currentpoint % + HyperBorder sub /pdf@ury exch def % + HyperBorder add /pdf@urx exch def % % |/pdf@voff| = the distance from the top of the page to the current point, in % PDF coordinates - currentpoint exch pop vsize 72 sub - exch DvipsToPDF sub /pdf@voff exch def - } def - systemdict /pdfmark known - { - userdict /?pdfmark systemdict /exec get put - }{ - userdict /?pdfmark systemdict /pop get put - userdict /pdfmark systemdict /cleartomark get put - } - ifelse + currentpoint exch pop vsize 72 sub % + exch DvipsToPDF sub /pdf@voff exch def% + } def % + systemdict /pdfmark known% + {% + userdict /?pdfmark systemdict /exec get put% + }{% + userdict /?pdfmark systemdict /pop get put % + userdict /pdfmark systemdict /cleartomark get put% + }% + ifelse% }% } \AfterBeginDocument{% @@ -11164,9 +11768,9 @@ \input{pdfmark.def}% \ifx\@pdfproducer\relax \ifnum\OpMode=\@ne - \def\@pdfproducer{VTeX} + \def\@pdfproducer{VTeX}% \else - \def\@pdfproducer{VTeX + Distiller} + \def\@pdfproducer{VTeX + Distiller}% \fi \fi \def\literalps@out#1{\special{pS:#1}}% @@ -11180,15 +11784,15 @@ % \begin{macrocode} \AtBeginDvi{% \headerps@out{% - /vsize {\Hy@pageheight} def + /vsize {\Hy@pageheight} def% % \end{macrocode} % The rectangle around the links starts off % \emph{exactly} the size of the box; % we will to make it slightly bigger, 1 point on all sides. % \begin{macrocode} - /HyperBorder {1} def - /H.V {pdf@hoff pdf@voff null} def - /H.B {/Rect[pdf@llx pdf@lly pdf@urx pdf@ury]} def + /HyperBorder {1} def% + /H.V {pdf@hoff pdf@voff null} def% + /H.B {/Rect[pdf@llx pdf@lly pdf@urx pdf@ury]} def% % \end{macrocode} % % |H.S| (start of anchor, link, or rect) stores @@ -11197,57 +11801,57 @@ % $\mathtt{pdf@hoff} = X_c + 72$, % $\mathtt{pdf@llx} = X_c - \mathtt{HyperBorder}$ % \begin{macrocode} - /H.S { - currentpoint - HyperBorder sub - /pdf@lly exch def - dup 72 add /pdf@hoff exch def - HyperBorder sub - /pdf@llx exch def - } def + /H.S {% + currentpoint % + HyperBorder sub% + /pdf@lly exch def % + dup 72 add /pdf@hoff exch def % + HyperBorder sub% + /pdf@llx exch def% + } def% % \end{macrocode} % The $x$ and $y$ coordinates of the current point, minus the % |\baselineskip|: % $\mathtt{pdf@ury} = Y_c + \mathtt{HyperBasePt} + \mathtt{HyperBorder}$, % $\mathtt{pdf@urx} = X_c + \mathtt{HyperBorder}$ % \begin{macrocode} - /H.L { - 2 sub - /HyperBasePt exch def - currentpoint - HyperBasePt add HyperBorder add - /pdf@ury exch def - HyperBorder add - /pdf@urx exch def - } def - /H.A { - H.L - currentpoint exch pop - vsize 72 sub exch - HyperBasePt add add - /pdf@voff exch def - } def + /H.L {% + 2 sub% + /HyperBasePt exch def % + currentpoint % + HyperBasePt add HyperBorder add% + /pdf@ury exch def % + HyperBorder add% + /pdf@urx exch def% + } def% + /H.A {% + H.L % + currentpoint exch pop % + vsize 72 sub exch % + HyperBasePt add add% + /pdf@voff exch def% + } def% % \end{macrocode} % $\mathtt{pdf@ury} = Y_c + \mathtt{HyperBorder}$, % $\mathtt{pdf@urx} = X_c + \mathtt{HyperBorder}$ % \begin{macrocode} - /H.R { - currentpoint - HyperBorder add - /pdf@ury exch def - HyperBorder add - /pdf@urx exch def - currentpoint exch pop vsize 72 sub add - /pdf@voff exch def - } def - systemdict /pdfmark known - { - userdict /?pdfmark systemdict /exec get put - }{ - userdict /?pdfmark systemdict /pop get put - userdict /pdfmark systemdict /cleartomark get put - } - ifelse + /H.R {% + currentpoint % + HyperBorder add% + /pdf@ury exch def % + HyperBorder add% + /pdf@urx exch def % + currentpoint exch pop vsize 72 sub add% + /pdf@voff exch def% + } def % + systemdict /pdfmark known% + {% + userdict /?pdfmark systemdict /exec get put% + }{% + userdict /?pdfmark systemdict /pop get put % + userdict /pdfmark systemdict /cleartomark get put% + }% + ifelse% }% } %</vtexpdfmark> @@ -11324,24 +11928,24 @@ \AtBeginDvi{% \headerps@out{% /betterpdfmark {% - systemdict begin - dup /BP eq - {cleartomark gsave nulldevice [} - {dup /EP eq - {cleartomark cleartomark grestore} - {cleartomark} - ifelse - }ifelse - end + systemdict begin % + dup /BP eq% + {cleartomark gsave nulldevice [}% + {dup /EP eq% + {cleartomark cleartomark grestore}% + {cleartomark}% + ifelse% + }ifelse % + end% }def\Hy@ps@CR - __pdfmark__ not{/pdfmark /betterpdfmark load def}if - systemdict /pdfmark known - { - userdict /?pdfmark systemdict /load get put - }{ - userdict /?pdfmark systemdict /pop get put - } - ifelse + __pdfmark__ not{/pdfmark /betterpdfmark load def}if % + systemdict /pdfmark known% + {% + userdict /?pdfmark systemdict /load get put% + }{% + userdict /?pdfmark systemdict /pop get put% + }% + ifelse% }% end of \headerps@out }% end of \AtBeginDvi % @@ -11370,38 +11974,39 @@ % coordinate system to another involves doing nothing. % % \begin{macrocode} - /vsize {\Hy@pageheight} def - /DvipsToPDF {} def - /PDFToDvips {} def + /vsize {\Hy@pageheight} def% + /DvipsToPDF {} def% + /PDFToDvips {} def% + /BPToDvips {} def% /HyperBorder { 1 PDFToDvips } def\Hy@ps@CR /H.V {pdf@hoff pdf@voff null} def\Hy@ps@CR /H.B {/Rect[pdf@llx pdf@lly pdf@urx pdf@ury]} def\Hy@ps@CR - /H.S { - currentpoint - HyperBorder add /pdf@lly exch def - dup DvipsToPDF /pdf@hoff exch def - HyperBorder sub /pdf@llx exch def + /H.S {% + currentpoint % + HyperBorder add /pdf@lly exch def % + dup DvipsToPDF 72 add /pdf@hoff exch def % + HyperBorder sub /pdf@llx exch def% } def\Hy@ps@CR - /H.L { - 2 sub - PDFToDvips /HyperBase exch def - currentpoint - HyperBase sub /pdf@ury exch def - /pdf@urx exch def + /H.L {% + 2 sub % + PDFToDvips /HyperBase exch def % + currentpoint % + HyperBase sub /pdf@ury exch def% + /pdf@urx exch def% } def\Hy@ps@CR - /H.A { - H.L - currentpoint exch pop - vsize 72 sub exch DvipsToPDF + /H.A {% + H.L % + currentpoint exch pop % + vsize 72 sub exch DvipsToPDF % HyperBase sub % baseline skip - sub /pdf@voff exch def + sub /pdf@voff exch def% } def\Hy@ps@CR - /H.R { - currentpoint - HyperBorder sub /pdf@ury exch def - HyperBorder add /pdf@urx exch def - currentpoint exch pop vsize 72 sub - exch DvipsToPDF sub /pdf@voff exch def + /H.R {% + currentpoint % + HyperBorder sub /pdf@ury exch def % + HyperBorder add /pdf@urx exch def % + currentpoint exch pop vsize 72 sub % + exch DvipsToPDF sub /pdf@voff exch def% } def\Hy@ps@CR } % \end{macrocode} @@ -11511,11 +12116,11 @@ % Over-ride the default setup macro in pdfmark driver to use Y\&Y % |\special| commands. %<*dvipsone> -\providecommand*\@pdfborder{0 0 65781} +\providecommand*\@pdfborder{0 0 1} \providecommand*\@pdfborderstyle{} \input{pdfmark.def}% \ifx\@pdfproducer\relax - \def\@pdfproducer{dvipsone + Distiller} + \def\@pdfproducer{dvipsone + Distiller}% \fi \def\literalps@out#1{\special{ps:#1}}% \def\headerps@out#1{\special{! #1}}% @@ -11549,9 +12154,9 @@ } \def\PDF@SetupDoc{% \pdfmark{% - pdfmark=/DOCVIEW, - Page=\@pdfstartpage, - View=\@pdfstartview, + pdfmark=/DOCVIEW,% + Page=\@pdfstartpage,% + View=\@pdfstartview,% PageMode=/\@pdfpagemode }% \ifx\@pdfpagescrop\@empty @@ -11590,7 +12195,7 @@ \pdfmark{% pdfmark=/PUT,% Raw={% - \string{Catalog\string} << + \string{Catalog\string}<<% \ifx\Hy@temp\@empty \else /ViewerPreferences<<\Hy@temp>>% @@ -11602,7 +12207,7 @@ \fi \ifx\@baseurl\@empty \else - /URI << /Base (\Hy@pstringB) >>% + /URI<</Base(\Hy@pstringB)>>% \fi >>% }% @@ -11610,9 +12215,10 @@ } \providecommand*\@pdfview{XYZ} \providecommand*\@pdfviewparams{ % - gsave revscl currentpoint grestore - 72 add exch pop null exch null + gsave revscl currentpoint grestore % + 72 add exch pop null exch null% } +\def\Hy@BorderArrayPatch{BorderArrayPatch} % \end{macrocode} % These are called at the start and end of unboxed links; % their job is to leave available PS variables called @@ -11623,51 +12229,63 @@ % The Rect pair are called at the LL and UR corners of a box % known to \TeX. % \begin{macrocode} -\special{headertext= +\special{headertext=% % \end{macrocode} % dvipsone lives in scaled points; does this mean 65536 or 65781? % \begin{macrocode} - /DvipsToPDF { 65781 div } def - /PDFToDvips { 65781 mul } def - /HyperBorder { 1 PDFToDvips } def - /H.B {/Rect[pdf@llx pdf@lly pdf@urx pdf@ury]} def -% \end{macrocode} -% -% \begin{macrocode} - /H.S { - currentpoint - HyperBorder add /pdf@lly exch def - dup DvipsToPDF /pdf@hoff exch def - HyperBorder sub /pdf@llx exch def - } def - /H.L { - 2 sub - PDFToDvips /HyperBase exch def - currentpoint - HyperBase sub /pdf@ury exch def - /pdf@urx exch def - } def - /H.A { - H.L - currentpoint exch pop + /DvipsToPDF { 65781 div } def% + /PDFToDvips { 65781 mul } def% + /BPToDvips{65781 mul}def% + /HyperBorder { 1 PDFToDvips } def% + /H.B {/Rect[pdf@llx pdf@lly pdf@urx pdf@ury]} def% +% \end{macrocode} +% The values inside the /Boder array are not taken literally, but +% interpreted by ghostscript using the resolution of the dvi driver. +% I don't know how other distiller programs behaves in this manner. +% \begin{macrocode} + /BorderArrayPatch{% + [exch{% + dup dup type/integertype eq exch type/realtype eq or% + {BPToDvips}if% + }forall]% + }def% +% \end{macrocode} +% +% \begin{macrocode} + /H.S {% + currentpoint % + HyperBorder add /pdf@lly exch def % + dup DvipsToPDF 72 add /pdf@hoff exch def % + HyperBorder sub /pdf@llx exch def% + } def% + /H.L {% + 2 sub % + PDFToDvips /HyperBase exch def % + currentpoint % + HyperBase sub /pdf@ury exch def% + /pdf@urx exch def% + } def% + /H.A {% + H.L % + currentpoint exch pop % HyperBase sub % baseline skip - DvipsToPDF /pdf@voff exch def - } def - /H.R { - currentpoint - HyperBorder sub /pdf@ury exch def - HyperBorder add /pdf@urx exch def - currentpoint exch pop DvipsToPDF /pdf@voff exch def - } def - systemdict - /pdfmark known - { - userdict /?pdfmark /exec load put - }{ - userdict /?pdfmark /pop load put - userdict /pdfmark systemdict /cleartomark get put - } - ifelse + DvipsToPDF /pdf@voff exch def% + } def% + /H.R {% + currentpoint % + HyperBorder sub /pdf@ury exch def % + HyperBorder add /pdf@urx exch def % + currentpoint exch pop DvipsToPDF /pdf@voff exch def% + } def % + systemdict% + /pdfmark known% + {% + userdict /?pdfmark /exec load put% + }{% + userdict /?pdfmark /pop load put % + userdict /pdfmark systemdict /cleartomark get put% + }% + ifelse% } %</dvipsone> %<*dvipdf> @@ -11680,9 +12298,12 @@ % \subsection{TeX4ht} % \begin{macrocode} %<*tex4ht> -\@ifpackageloaded{tex4ht} - {\typeout{hyperref tex4ht: tex4ht already loaded}}% - {\RequirePackage[htex4ht]{tex4ht}} +\@ifpackageloaded{tex4ht}{% + \typeout{hyperref tex4ht: tex4ht already loaded}% +}{% + \RequirePackage[htex4ht]{tex4ht}% +} +\hyperlinkfileprefix{} \def\PDF@FinishDoc{} \def\PDF@SetupDoc{% \ifx\@baseurl\@empty @@ -11772,7 +12393,7 @@ %<*tex4htcfg> \IfFileExists{\jobname.cfg}{\endinput}{} \Preamble{html} - \begin{document} + \begin{document}% \EndPreamble \def\TeX{TeX} \def\OMEGA{Omega} @@ -11791,99 +12412,176 @@ \long\def\@Form[#1]{% \AtBeginDvi{% \headerps@out{% -[ /_objdef {pdfDocEncoding} - /type /dict -/OBJ pdfmark -[ {pdfDocEncoding} - << /Type /Encoding - /Differences [ 24 /breve /caron /circumflex /dotaccent -/hungarumlaut /ogonek /ring /tilde 39 /quotesingle 96 /grave 128 -/bullet /dagger /daggerdbl /ellipsis /emdash /endash /florin /fraction -/guilsinglleft /guilsinglright /minus /perthousand /quotedblbase -/quotedblleft /quotedblright /quoteleft /quoteright /quotesinglbase -/trademark /fi /fl /Lslash /OE /Scaron /Ydieresis /Zcaron /dotlessi -/lslash /oe /scaron /zcaron 164 /currency 166 /brokenbar 168 /dieresis -/copyright /ordfeminine 172 /logicalnot /.notdef /registered /macron -/degree /plusminus /twosuperior /threesuperior /acute /mu 183 -/periodcentered /cedilla /onesuperior /ordmasculine 188 /onequarter -/onehalf /threequarters 192 /Agrave /Aacute /Acircumflex /Atilde -/Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex -/Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde -/Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash -/Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls -/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla -/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex -/idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde -/odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis -/yacute /thorn /ydieresis ] ->> -/PUT pdfmark -[ /_objdef {ZaDb} - /type /dict -/OBJ pdfmark -[ {ZaDb} - << - /Type /Font - /Subtype /Type1 - /Name /ZaDb - /BaseFont /ZapfDingbats - >> -/PUT pdfmark -[ /_objdef {Helv} - /type /dict -/OBJ pdfmark -[ {Helv} - << - /Type /Font - /Subtype /Type1 - /Name /Helv - /BaseFont /Helvetica - /Encoding {pdfDocEncoding} - >> -/PUT pdfmark -[ /_objdef {aform} - /type /dict -/OBJ pdfmark -[ /_objdef {afields} - /type /array -/OBJ pdfmark -{ - [/BBox [0 0 100 100] /_objdef {Check} /BP pdfmark - 1 0 0 setrgbcolor /ZapfDingbats 80 selectfont 20 20 moveto (4) show - [/EP pdfmark - [/BBox [0 0 100 100] /_objdef {Cross} /BP pdfmark - 1 0 0 setrgbcolor /ZapfDingbats 80 selectfont 20 20 moveto (8) show - [/EP pdfmark - [/BBox [0 0 250 100] /_objdef {Submit} /BP pdfmark 0.6 setgray 0 0 250 - 100 rectfill 1 setgray 2 2 moveto 2 98 lineto 248 98 lineto 246 96 - lineto 4 96 lineto 4 4 lineto fill 0.34 setgray 248 98 moveto 248 2 - lineto 2 2 lineto 4 4 lineto 246 4 lineto 246 96 lineto fill - /Helvetica 76 selectfont 0 setgray 8 22.5 moveto (Submit) show - [/EP pdfmark - [/BBox [0 0 250 100] /_objdef {SubmitP} /BP pdfmark 0.6 setgray 0 0 - 250 100 rectfill 0.34 setgray 2 2 moveto 2 98 lineto 248 98 lineto 246 - 96 lineto 4 96 lineto 4 4 lineto fill 1 setgray 248 98 moveto 248 2 - lineto 2 2 lineto 4 4 lineto 246 4 lineto 246 96 lineto fill - /Helvetica 76 selectfont 0 setgray 10 20.5 moveto (Submit) show - [/EP pdfmark -} ?pdfmark -[ {aform} - << - /Fields {afields} - /DR << /Font << /ZaDb {ZaDb} /Helv {Helv} >> >> - /DA (/Helv 10 Tf 0 g ) - /CO {corder} - /NeedAppearances true - >> -/PUT pdfmark -[ \string{Catalog\string} - << - /AcroForm {aform} - >> -/PUT pdfmark -[ /_objdef {corder} /type /array /OBJ pdfmark % dps +[% + /_objdef{pdfDocEncoding}% + /type/dict% +/OBJ pdfmark% +[% + {pdfDocEncoding}% + <<% + /Type/Encoding% + /Differences[% + 24/breve/caron/circumflex/dotaccent/hungarumlaut/ogonek/ring/tilde % + 39/quotesingle % + 96/grave % + 128/bullet/dagger/daggerdbl/ellipsis/emdash/endash/florin/fraction% + /guilsinglleft/guilsinglright/minus/perthousand/quotedblbase% + /quotedblleft/quotedblright/quoteleft/quoteright/quotesinglbase% + /trademark/fi/fl/Lslash/OE/Scaron/Ydieresis/Zcaron/dotlessi% + /lslash/oe/scaron/zcaron164/currency166/brokenbar % + 168/dieresis/copyright/ordfeminine % + 172/logicalnot/.notdef/registered/macron/degree/plusminus% + /twosuperior/threesuperior/acute/mu % + 183/periodcentered/cedilla/onesuperior/ordmasculine % + 188/onequarter/onehalf/threequarters % + 192/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla% + /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex% + /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis% + /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute% + /Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis% + /aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave% + /iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute% + /ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute% + /ucircumflex/udieresis/yacute/thorn/ydieresis% + ]% + >>% +/PUT pdfmark% +[% + /_objdef{ZaDb}% + /type/dict% +/OBJ pdfmark% +[% + {ZaDb}% + <<% + /Type/Font% + /Subtype/Type1% + /Name/ZaDb% + /BaseFont/ZapfDingbats% + >>% +/PUT pdfmark% +[% + /_objdef {Helv}% + /type/dict% +/OBJ pdfmark% +[% + {Helv}% + <<% + /Type/Font% + /Subtype/Type1% + /Name/Helv% + /BaseFont/Helvetica% + /Encoding{pdfDocEncoding}% + >>% +/PUT pdfmark% +[% + /_objdef {aform}% + /type/dict% +/OBJ pdfmark% +[% + /_objdef{afields}% + /type/array% +/OBJ pdfmark% +{% + [% + /BBox[0 0 100 100]% + /_objdef{Check}% + /BP pdfmark % + 1 0 0 setrgbcolor% + /ZapfDingbats 80 selectfont % + 20 20 moveto% + (4)show% + [/EP pdfmark% + [% + /BBox[0 0 100 100]% + /_objdef{Cross}% + /BP pdfmark % + 1 0 0 setrgbcolor% + /ZapfDingbats 80 selectfont % + 20 20 moveto% + (8)show% + [/EP pdfmark% + [% + /BBox[0 0 250 100]% + /_objdef{Submit}% + /BP pdfmark % + 0.6 setgray % + 0 0 250 100 rectfill % + 1 setgray % + 2 2 moveto % + 2 98 lineto % + 248 98 lineto % + 246 96 lineto % + 4 96 lineto % + 4 4 lineto % + fill % + 0.34 setgray % + 248 98 moveto % + 248 2 lineto % + 2 2 lineto % + 4 4 lineto % + 246 4 lineto % + 246 96 lineto % + fill% + /Helvetica 76 selectfont % + 0 setgray % + 8 22.5 moveto% + (Submit)show% + [/EP pdfmark% + [% + /BBox[0 0 250 100]% + /_objdef{SubmitP}% + /BP pdfmark % + 0.6 setgray % + 0 0 250 100 rectfill % + 0.34 setgray % + 2 2 moveto % + 2 98 lineto % + 248 98 lineto % + 246 96 lineto % + 4 96 lineto % + 4 4 lineto % + fill % + 1 setgray % + 248 98 moveto % + 248 2 lineto % + 2 2 lineto % + 4 4 lineto % + 246 4 lineto % + 246 96 lineto % + fill% + /Helvetica 76 selectfont % + 0 setgray % + 10 20.5 moveto% + (Submit)show% + [/EP pdfmark% +} ?pdfmark% +[% + {aform}% + <<% + /Fields{afields}% + /DR<<% + /Font<<% + /ZaDb{ZaDb}% + /Helv{Helv}% + >>% + >>% + /DA(/Helv 10 Tf 0 g)% + /CO{corder}% + /NeedAppearances true% + >>% +/PUT pdfmark% +[% + {Catalog}% + <<% + /AcroForm{aform}% + >>% +/PUT pdfmark% +[% + /_objdef{corder}% + /type/array% +/OBJ pdfmark% dps }}% - \setkeys{Form}{#1}% + \setkeys{Form}{#1}% } \def\@endForm{} \def\@Gauge[#1]#2#3#4{% parameters, label, minimum, maximum @@ -11924,7 +12622,7 @@ \def\Fld@width{\DefaultWidthofChoiceMenu}% \def\Fld@height{\DefaultHeightofChoiceMenu}% \bgroup - \Fld@menulength=0 + \Fld@menulength=0 % \@tempdima\z@ \@for\@curropt:=#3\do{% \expandafter\Fld@checkequals\@curropt==\\% @@ -11936,6 +12634,9 @@ \Field@toks={ }% \setkeys{Field}{#1}% \ifFld@hidden\def\Fld@width{1sp}\fi + \ifx\Fld@value\relax + \let\Fld@value\Fld@default + \fi \LayoutChoiceField{#2}{% \ifFld@radio \@@Radio{#3}% @@ -11950,8 +12651,8 @@ \ifFld@popdown\def\Fld@flags{/Ff 131072}\fi \ifx\Fld@flags\@empty \@tempdima=\the\Fld@menulength\Fld@charsize - \advance\@tempdima by \Fld@borderwidth bp - \advance\@tempdima by \Fld@borderwidth bp + \advance\@tempdima by \Fld@borderwidth bp % + \advance\@tempdima by \Fld@borderwidth bp % \edef\Fld@height{\the\@tempdima}% \fi \@@Listbox{#3}% @@ -11961,7 +12662,7 @@ \egroup } \def\@@Radio#1{% - \Fld@listcount=0 + \Fld@listcount=0 % \@for\@curropt:=#1\do{% \expandafter\Fld@checkequals\@curropt==\\% \Hy@StepCount\Fld@listcount @@ -11976,7 +12677,7 @@ \newcount\Fld@listcount \def\@@Listbox#1{% \Choice@toks={ }% - \Fld@listcount=0 + \Fld@listcount=0 % \@for\@curropt:=#1\do{% \expandafter\Fld@checkequals\@curropt==\\% \Hy@StepCount\Fld@listcount @@ -12127,33 +12828,34 @@ } \def\@@PasswordField{% \HCode{% - <input type="password" - id="\Fld@name" - name="\Fld@name" - \ifFld@hidden type="hidden"\fi - value="\Fld@default" + <input type="password" % + id="\Fld@name" % + name="\Fld@name" % + \ifFld@hidden type="hidden" \fi + value="\Fld@default" % \the\Field@toks >% }% } \def\@@TextField{% \ifFld@multiline - \HCode{<textarea + \HCode{<textarea % \ifFld@readonly readonly \fi - id="\Fld@name" - name="\Fld@name" - \ifFld@hidden type="hidden"\fi + id="\Fld@name" % + name="\Fld@name" % + \ifFld@hidden type="hidden" \fi \the\Field@toks>% }% \Fld@default \HCode{</textarea>}% \else - \HCode{<input type="textbox" + \HCode{<input type="textbox" % \ifFld@readonly readonly \fi - id="\Fld@name" - name="\Fld@name" - \ifFld@hidden type="hidden"\fi - value="\Fld@default" \the\Field@toks> + id="\Fld@name" % + name="\Fld@name" % + \ifFld@hidden type="hidden" \fi + value="\Fld@default" % + \the\Field@toks>% }% \fi } @@ -12174,15 +12876,17 @@ \egroup } \def\Fld@findlength#1\\{% - \Fld@menulength=0 + \Fld@menulength=0 % \@for\@curropt:=#1\do{\Hy@StepCount\Fld@menulength}% } \def\@@Menu#1\\{% - \HCode{<select size="\the\Fld@menulength" - name="\Fld@name" \the\Field@toks>}% + \HCode{<select size="\the\Fld@menulength" % + name="\Fld@name" % + \the\Field@toks>% + }% \@for\@curropt:=#1\do{% \expandafter\Fld@checkequals\@curropt==\\% - \HCode{<option + \HCode{<option % \ifx\@curropt\Fld@default selected \fi value="\@currValue">\@currDisplay</option>% }% @@ -12192,10 +12896,10 @@ \def\@@Radio#1\\{% \@for\@curropt:=#1\do{% \expandafter\Fld@checkequals\@curropt==\\% - \HCode{<input type="radio" + \HCode{<input type="radio" % \ifx\@curropt\Fld@default checked \fi - name="\Fld@name" - value="\@currValue" + name="\Fld@name" % + value="\@currValue" % \the\Field@toks>% }% \@currDisplay @@ -12206,9 +12910,9 @@ \bgroup \Field@toks={ }% \setkeys{Field}{#1}% - \HCode{<input type="button" - name="\Fld@name" - value="#2" + \HCode{<input type="button" % + name="\Fld@name" % + value="#2" % \the\Field@toks>% }% \HCode{</button>}% @@ -12227,13 +12931,13 @@ \bgroup \Field@toks={ }% \setkeys{Field}{#1}% - \HCode{<input type="checkbox" + \HCode{<input type="checkbox" % \ifFld@checked checked \fi \ifFld@disabled disabled \fi \ifFld@readonly readonly \fi - name="\Fld@name" - \ifFld@hidden type="hidden"\fi - value="\Fld@default" + name="\Fld@name" % + \ifFld@hidden type="hidden" \fi + value="\Fld@default" % \the\Field@toks>% #2% }% @@ -12258,7 +12962,7 @@ \def\@Form[#1]{% \@ifundefined{textcolor}{\let\textcolor\@gobble}{}% \setkeys{Form}{#1}% - \ifnum\pdftexversion>13 + \ifnum\pdftexversion>13 % \pdfrefobj\OBJ@pdfdocencoding \pdfrefobj\OBJ@ZaDb \pdfrefobj\OBJ@Helv @@ -12316,7 +13020,7 @@ \def\Fld@width{\DefaultWidthofChoiceMenu}% \def\Fld@height{\DefaultHeightofChoiceMenu}% \bgroup - \Fld@menulength=0 + \Fld@menulength=0 % \@tempdima\z@ \@for\@curropt:=#3\do{% \expandafter\Fld@checkequals\@curropt==\\% @@ -12345,8 +13049,8 @@ \ifFld@popdown\def\Fld@flags{/Ff 131072}\fi \ifx\Fld@flags\@empty \@tempdima=\the\Fld@menulength\Fld@charsize - \advance\@tempdima by \Fld@borderwidth bp - \advance\@tempdima by \Fld@borderwidth bp + \advance\@tempdima by \Fld@borderwidth bp % + \advance\@tempdima by \Fld@borderwidth bp % \edef\Fld@height{\the\@tempdima}% \fi \@@Listbox{#3}% @@ -12356,7 +13060,7 @@ \egroup } \def\@@Radio#1{% - \Fld@listcount=0 + \Fld@listcount=0 % \@for\@curropt:=#1\do{% \expandafter\Fld@checkequals\@curropt==\\% \Hy@StepCount\Fld@listcount @@ -12365,8 +13069,8 @@ \Hy@escapeform\PDFForm@Radio \pdfstartlink user {% \PDFForm@Radio - /AP << - /N << + /AP<<% + /N<<% % \end{macrocode} % Laurent.Guillope@math.univ-nantes.fr (Laurent Guillope) % persuades me that this was wrong: @@ -12374,18 +13078,18 @@ % me that it is untested. % \begin{macrocode} /\@currValue\space \DingObject - >> - >> + >>% + >>% }% \relax \MakeRadioField{\Fld@width}{\Fld@height}\pdfendlink - \space% deliberate space between radio buttons + \space % deliberate space between radio buttons }% } \newcount\Fld@listcount \def\@@Listbox#1{% \Choice@toks={ }% - \Fld@listcount=0 + \Fld@listcount=0 % \@for\@curropt:=#1\do{% \expandafter\Fld@checkequals\@curropt==\\% \Hy@StepCount\Fld@listcount @@ -12426,7 +13130,7 @@ \Hy@escapeform\PDFForm@Submit \pdfstartlink user {% \PDFForm@Submit - /AP << /N \SubmitObject\space /D \SubmitPObject >> + /AP<</N \SubmitObject/D \SubmitPObject>>% }% \relax \MakeButtonField{#2}% @@ -12487,33 +13191,37 @@ /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] >> } \edef\OBJ@pdfdocencoding{\the\pdflastobj} -\pdfobj { - << - /Type /Font - /Subtype /Type1 - /Name /ZaDb - /BaseFont /ZapfDingbats ->> +\pdfobj{% + <<% + /Type/Font% + /Subtype/Type1% + /Name/ZaDb% + /BaseFont/ZapfDingbats% + >>% } \edef\OBJ@ZaDb{\the\pdflastobj} -\pdfobj { << - /Type /Font - /Subtype /Type1 - /Name /Helv - /BaseFont /Helvetica - /Encoding \OBJ@pdfdocencoding\space 0 R - >> +\pdfobj{% + <<% + /Type/Font% + /Subtype/Type1% + /Name/Helv% + /BaseFont/Helvetica% + /Encoding \OBJ@pdfdocencoding\space 0 R% + >>% } \edef\OBJ@Helv{\the\pdflastobj} -\pdfobj { - << - /Fields [] - /DR << - /Font << /ZaDb \OBJ@ZaDb\space 0 R /Helv \OBJ@Helv\space0 R >> - >> - /DA (/Helv 10 Tf 0 g ) - /NeedAppearances true - >> +\pdfobj{% + <<% + /Fields[]% + /DR<<% + /Font<<% + /ZaDb \OBJ@ZaDb\space 0 R% + /Helv \OBJ@Helv\space0 R% + >>% + >>% + /DA(/Helv 10 Tf 0 g)% + /NeedAppearances true% + >>% } \edef\OBJ@acroform{\the\pdflastobj} %</pdftex> @@ -12539,18 +13247,23 @@ \def\@Form[#1]{% \@ifundefined{textcolor}{\let\textcolor\@gobble}{}% \setkeys{Form}{#1}% - \@pdfm@mark{obj @afields [ ]}% - \@pdfm@mark{obj @corder [ ]}% + \@pdfm@mark{obj @afields []}% + \@pdfm@mark{obj @corder []}% \@pdfm@mark{% - obj @aform << - /Fields @afields - /DR << /Font << /ZaDb @OBJZaDb /Helv @OBJHelv >> >> - /DA (/Helv 10 Tf 0 g ) - /CO @corder - /NeedAppearances true + obj @aform <<% + /Fields @afields% + /DR<<% + /Font<<% + /ZaDb @OBJZaDb% + /Helv @OBJHelv% + >>% + >>% + /DA(/Helv 10 Tf 0 g)% + /CO @corder% + /NeedAppearances true% >>% }% - \@pdfm@mark{put @catalog << /AcroForm @aform >>}% + \@pdfm@mark{put @catalog <</AcroForm @aform>>}% } % \end{macrocode} % \end{macro} @@ -12619,7 +13332,7 @@ \def\Fld@width{\DefaultWidthofChoiceMenu}% \def\Fld@height{\DefaultHeightofChoiceMenu}% \bgroup - \Fld@menulength=0 + \Fld@menulength=0 % \@tempdima\z@ \@for\@curropt:=#3\do{% \expandafter\Fld@checkequals\@curropt==\\% @@ -12631,6 +13344,9 @@ \Field@toks={ }% \setkeys{Field}{#1}% \ifFld@hidden\def\Fld@width{1sp}\fi + \ifx\Fld@value\relax + \let\Fld@value\Fld@default + \fi \LayoutChoiceField{#2}{% \ifFld@radio \@@Radio{#3}% @@ -12645,8 +13361,8 @@ \ifFld@popdown\def\Fld@flags{/Ff 131072}\fi \ifx\Fld@flags\@empty \@tempdima=\the\Fld@menulength\Fld@charsize - \advance\@tempdima by \Fld@borderwidth bp - \advance\@tempdima by \Fld@borderwidth bp + \advance\@tempdima by \Fld@borderwidth bp % + \advance\@tempdima by \Fld@borderwidth bp % \edef\Fld@height{\the\@tempdima}% \fi \@@Listbox{#3}% @@ -12661,7 +13377,7 @@ % \begin{macro}{\@@Radio} % \begin{macrocode} \def\@@Radio#1{% - \Fld@listcount=0 + \Fld@listcount=0 % \setbox\pdfm@box=\hbox{\MakeRadioField{\Fld@width}{\Fld@height}}% \@for\@curropt:=#1\do{% \expandafter\Fld@checkequals\@curropt==\\% @@ -12672,9 +13388,9 @@ \@pdfm@mark{% ann \ifnum\Fld@listcount=1 @\Fld@name\space\fi \dvipdfm@setdim - << - \PDFForm@Radio\space - /AP << /N << /\@currValue /null >> >> + <<% + \PDFForm@Radio + /AP<</N<</\@currValue /null>>>>% >>% }% \unhcopy\pdfm@box\space% deliberate space between radio buttons @@ -12693,7 +13409,7 @@ % \begin{macrocode} \def\@@Listbox#1{% \Choice@toks={ }% - \Fld@listcount=0 + \Fld@listcount=0 % \@for\@curropt:=#1\do{% \expandafter\Fld@checkequals\@curropt==\\% \Hy@StepCount\Fld@listcount @@ -12813,51 +13529,54 @@ % \end{macro} % % \begin{macrocode} -\@pdfm@mark{obj @OBJpdfdocencoding << /Type /Encoding /Differences [% - 24 /breve /caron /circumflex /dotaccent /hungarumlaut /ogonek /ring - /tilde - 39 /quotesingle - 96 /grave - 128 /bullet /dagger /daggerdbl /ellipsis /emdash /endash /florin - /fraction /guilsinglleft /guilsinglright /minus /perthousand - /quotedblbase /quotedblleft /quotedblright /quoteleft /quoteright - /quotesinglbase /trademark /fi /fl /Lslash /OE /Scaron /Ydieresis - /Zcaron /dotlessi /lslash /oe /scaron /zcaron - 164 /currency - 166 /brokenbar - 168 /dieresis /copyright /ordfeminine - 172 /logicalnot /.notdef /registered /macron /degree /plusminus - /twosuperior /threesuperior /acute /mu - 183 /periodcentered /cedilla /onesuperior /ordmasculine - 188 /onequarter /onehalf /threequarters - 192 /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE - /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute - /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex - /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex - /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex - /atilde /adieresis /aring /ae /ccedilla /egrave /eacute - /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis - /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis - /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute - /thorn /ydieresis% - ] >> -} -\@pdfm@mark{obj @OBJZaDb - << - /Type /Font - /Subtype /Type1 - /Name /ZaDb - /BaseFont /ZapfDingbats - >> -} -\@pdfm@mark{obj @OBJHelv - << - /Type /Font - /Subtype /Type1 - /Name /Helv - /BaseFont /Helvetica - /Encoding @OBJpdfdocencoding - >> +\@pdfm@mark{obj @OBJpdfdocencoding% + <<% + /Type/Encoding% + /Differences[% + 24/breve/caron/circumflex/dotaccent/hungarumlaut/ogonek/ring/tilde % + 39/quotesingle % + 96/grave % + 128/bullet/dagger/daggerdbl/ellipsis/emdash/endash/florin% + /fraction/guilsinglleft/guilsinglright/minus/perthousand% + /quotedblbase/quotedblleft/quotedblright/quoteleft/quoteright% + /quotesinglbase/trademark/fi/fl/Lslash/OE/Scaron/Ydieresis% + /Zcaron/dotlessi/lslash/oe/scaron/zcaron % + 164/currency % + 166/brokenbar % + 168/dieresis/copyright/ordfeminine % + 172/logicalnot/.notdef/registered/macron/degree/plusminus% + /twosuperior/threesuperior/acute/mu % + 183/periodcentered/cedilla/onesuperior/ordmasculine % + 188/onequarter/onehalf/threequarters % + 192/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE% + /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute% + /Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex% + /Otilde/Odieresis/multiply/Oslash/Ugrave/Uacute/Ucircumflex% + /Udieresis/Yacute/Thorn/germandbls/agrave/aacute/acircumflex% + /atilde/adieresis/aring/ae/ccedilla/egrave/eacute% + /ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis% + /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis% + /divide/oslash/ugrave/uacute/ucircumflex/udieresis/yacute% + /thorn/ydieresis% + ]% + >>% +} +\@pdfm@mark{obj @OBJZaDb% + <<% + /Type/Font% + /Subtype/Type1% + /Name/ZaDb% + /BaseFont/ZapfDingbats% + >>% +} +\@pdfm@mark{obj @OBJHelv% + <<% + /Type/Font% + /Subtype/Type1% + /Name/Helv% + /BaseFont/Helvetica% + /Encoding @OBJpdfdocencoding% + >>% } %</dvipdfm> % \end{macrocode} @@ -12916,38 +13635,53 @@ % \begin{macro}{\PDFForm@Check} % \begin{macrocode} \def\PDFForm@Check{% - /Subtype /Widget - \ifFld@hidden /F 6 \else /F 4 \fi - /T (\Hy@escapestring{\Fld@name}) - /Q \Fld@align\space - /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >> - /MK << - /BC [\Fld@bordercolor] - \ifx\Fld@bcolor\@empty + /Subtype/Widget% + \ifFld@hidden /F 6\else /F 4\fi + /T(\Hy@escapestring{\Fld@name})% + /Q \Fld@align + /BS<</W \Fld@borderwidth /S/\Fld@borderstyle>>% + /MK<<% + \ifnum\Fld@rotation=\z@ \else - /BG [\Fld@bcolor] + /R \Fld@rotation \fi - /CA (\Hy@escapestring{\Fld@cbsymbol}) - >> - /DA (/ZaDb \strip@pt\Fld@charsize\space Tf \Fld@color\space rg) - /FT /Btn - /H /P - \ifFld@checked /V /Yes \else /V /Off \fi + \ifx\Fld@bordercolor\relax + \else + /BC[\Fld@bordercolor]% + \fi + \ifx\Fld@bcolor\relax + \else + /BG[\Fld@bcolor]% + \fi + /CA(\Hy@escapestring{\Fld@cbsymbol})% + >>% + /DA(/ZaDb \strip@pt\Fld@charsize\space Tf% + \ifx\Fld@color\@empty\else\space\Fld@color\fi)% + /FT/Btn% + /H/P% + \ifFld@checked /V/Yes\else /V/Off\fi } % \end{macrocode} % \end{macro} % \begin{macro}{\PDFForm@Push} % \begin{macrocode} \def\PDFForm@Push{% - /Subtype/Widget + /Subtype/Widget% \ifFld@hidden /F 6\else /F 4\fi /T(\Hy@escapestring{\Fld@name})% /FT/Btn% - /Ff 65540 + /Ff 65540% /H/P% /BS<</W \Fld@borderwidth/S/\Fld@borderstyle>>% /MK<<% - /BC[\Fld@bordercolor]% + \ifnum\Fld@rotation=\z@ + \else + /R \Fld@rotation + \fi + \ifx\Fld@bordercolor\relax + \else + /BC[\Fld@bordercolor]% + \fi >>% /A<</S/JavaScript/JS(\Hy@escapestring{\Fld@onclick})>>% } @@ -12956,79 +13690,83 @@ % % \begin{macro}{\Fld@additionalactions} % \begin{macrocode} -\def\Fld@additionalactions{% - /AA << +\def\Fld@@additionalactions{% % \end{macrocode} % K input (keystroke) format % \begin{macrocode} - \ifx\Fld@keystroke@code\@empty - \else - /K<</S/JavaScript/JS(\Hy@escapestring{\Fld@keystroke@code})>>% - \fi + \ifx\Fld@keystroke@code\@empty + \else + /K<</S/JavaScript/JS(\Hy@escapestring{\Fld@keystroke@code})>>% + \fi % \end{macrocode} % F display format % \begin{macrocode} - \ifx\Fld@format@code\@empty - \else - /F<</S/JavaScript/JS(\Hy@escapestring{\Fld@format@code})>>% - \fi + \ifx\Fld@format@code\@empty + \else + /F<</S/JavaScript/JS(\Hy@escapestring{\Fld@format@code})>>% + \fi % \end{macrocode} % V validation % \begin{macrocode} - \ifx\Fld@validate@code\@empty - \else - /V<</S/JavaScript/JS(\Hy@escapestring{\Fld@validate@code})>>% - \fi + \ifx\Fld@validate@code\@empty + \else + /V<</S/JavaScript/JS(\Hy@escapestring{\Fld@validate@code})>>% + \fi % \end{macrocode} % C calculation % \begin{macrocode} - \ifx\Fld@calculate@code\@empty - \else - /C<</S/JavaScript/JS(\Hy@escapestring{\Fld@calculate@code})>>% - \fi + \ifx\Fld@calculate@code\@empty + \else + /C<</S/JavaScript/JS(\Hy@escapestring{\Fld@calculate@code})>>% + \fi % \end{macrocode} % Fo receiving the input focus % \begin{macrocode} - \ifx\Fld@onfocus@code\@empty - \else - /Fo<</S/JavaScript/JS(\Hy@escapestring{\Fld@onfocus@code})>>% - \fi + \ifx\Fld@onfocus@code\@empty + \else + /Fo<</S/JavaScript/JS(\Hy@escapestring{\Fld@onfocus@code})>>% + \fi % \end{macrocode} % Bl loosing the input focus (blurred) % \begin{macrocode} - \ifx\Fld@onblur@code\@empty - \else - /Bl<</S/JavaScript/JS(\Hy@escapestring{\Fld@onblur@code})>>% - \fi + \ifx\Fld@onblur@code\@empty + \else + /Bl<</S/JavaScript/JS(\Hy@escapestring{\Fld@onblur@code})>>% + \fi % \end{macrocode} % D pressing the mouse button (down) % \begin{macrocode} - \ifx\Fld@onmousedown@code\@empty - \else - /D<</S/JavaScript/JS(\Hy@escapestring{\Fld@onmousedown@code})>>% - \fi + \ifx\Fld@onmousedown@code\@empty + \else + /D<</S/JavaScript/JS(\Hy@escapestring{\Fld@onmousedown@code})>>% + \fi % \end{macrocode} % U releasing the mouse button (up) % \begin{macrocode} - \ifx\Fld@onmouseup@code\@empty - \else - /U<</S/JavaScript/JS(\Hy@escapestring{\Fld@onmouseup@code})>>% - \fi + \ifx\Fld@onmouseup@code\@empty + \else + /U<</S/JavaScript/JS(\Hy@escapestring{\Fld@onmouseup@code})>>% + \fi % \end{macrocode} % E cursor enters the annotation's active area. % \begin{macrocode} - \ifx\Fld@onenter@code\@empty - \else - /E<</S/JavaScript/JS(\Hy@escapestring{\Fld@onenter@code})>>% - \fi + \ifx\Fld@onenter@code\@empty + \else + /E<</S/JavaScript/JS(\Hy@escapestring{\Fld@onenter@code})>>% + \fi % \end{macrocode} % X cursor exits the annotation's active area. % \begin{macrocode} - \ifx\Fld@onexit@code\@empty - \else - /X<</S/JavaScript/JS(\Hy@escapestring{\Fld@onexit@code})>>% - \fi - >>% + \ifx\Fld@onexit@code\@empty + \else + /X<</S/JavaScript/JS(\Hy@escapestring{\Fld@onexit@code})>>% + \fi +} +\def\Fld@additionalactions{% + \if-\Fld@@additionalactions-% + \else + /AA<<\Fld@@additionalactions>>% + \fi } % \end{macrocode} % \end{macro} @@ -13043,13 +13781,21 @@ /Q \Fld@align /BS<</W \Fld@borderwidth /S/\Fld@borderstyle>>% /MK<<% - /BC[\Fld@bordercolor]% - \ifx\Fld@bcolor\@empty + \ifnum\Fld@rotation=\z@ + \else + /R \Fld@rotation + \fi + \ifx\Fld@bordercolor\relax + \else + /BC[\Fld@bordercolor]% + \fi + \ifx\Fld@bcolor\relax \else /BG[\Fld@bcolor]% \fi >>% - /DA(/Helv \strip@pt\Fld@charsize\space Tf \Fld@color\space rg)% + /DA(/Helv \strip@pt\Fld@charsize\space Tf% + \ifx\Fld@color\@empty\else\space\Fld@color\fi)% /Opt[\the\Choice@toks]% \ifx\Fld@default\relax \else @@ -13072,17 +13818,25 @@ /T(\Hy@escapestring{\Fld@name})% /FT/Btn% /Ff 49152% - /H/P + /H/P% /BS<</W \Fld@borderwidth/S/\Fld@borderstyle>>% /MK<<% - /BC[\Fld@bordercolor]% - \ifx\Fld@bcolor\@empty + \ifnum\Fld@rotation=\z@ + \else + /R \Fld@rotation + \fi + \ifx\Fld@bordercolor\relax + \else + /BC[\Fld@bordercolor]% + \fi + \ifx\Fld@bcolor\relax \else /BG[\Fld@bcolor]% \fi /CA(H)% >>% - /DA(/ZaDb \strip@pt\Fld@charsize\space Tf \Fld@color\space rg)% + /DA(/ZaDb \strip@pt\Fld@charsize\space Tf% + \ifx\Fld@color\@empty\else\space\Fld@color\fi)% \ifx\@currValue\Fld@default /V/\Fld@default \else @@ -13097,18 +13851,26 @@ \def\PDFForm@Text{% /Subtype/Widget% \ifFld@hidden /F 6\else /F 4\fi - /T(\Hy@escapestring{\Fld@name}) + /T(\Hy@escapestring{\Fld@name})% /Q \Fld@align /FT/Tx% /BS<</W \Fld@borderwidth\space /S /\Fld@borderstyle>>% /MK<<% - /BC[\Fld@bordercolor]% - \ifx\Fld@bcolor\@empty + \ifnum\Fld@rotation=\z@ + \else + /R \Fld@rotation + \fi + \ifx\Fld@bordercolor\relax + \else + /BC[\Fld@bordercolor]% + \fi + \ifx\Fld@bcolor\relax \else /BG[\Fld@bcolor]% \fi >>% - /DA(/Helv \strip@pt\Fld@charsize\space Tf \Fld@color\space rg)% + /DA(/Helv \strip@pt\Fld@charsize\space Tf% + \ifx\Fld@color\@empty\else\space\Fld@color\fi)% /DV(\Hy@escapestring{\Fld@default})% /V(\Hy@escapestring{\Fld@value})% \Fld@additionalactions @@ -13121,7 +13883,7 @@ \ifFld@readonly /Ff 1\fi \fi \fi - \ifnum\Fld@maxlen>0/MaxLen \Fld@maxlen \fi + \ifnum\Fld@maxlen>\z@/MaxLen \Fld@maxlen \fi } % \end{macrocode} % \end{macro} @@ -13136,7 +13898,14 @@ /H/P% /BS<</W \Fld@borderwidth/S/\Fld@borderstyle>>% /MK<<% - /BC[\Fld@bordercolor]% + \ifnum\Fld@rotation=\z@ + \else + /R \Fld@rotation + \fi + \ifx\Fld@bordercolor\relax + \else + /BC[\Fld@bordercolor]% + \fi >>% /A<<% /S/SubmitForm% @@ -13160,7 +13929,14 @@ /DA(/Helv \strip@pt\Fld@charsize\space Tf 0 0 1 rg)% /Ff 65540% /MK<<% - /BC[\Fld@bordercolor]% + \ifnum\Fld@rotation=\z@ + \else + /R \Fld@rotation + \fi + \ifx\Fld@bordercolor\relax + \else + /BC[\Fld@bordercolor]% + \fi % /CA (Clear) % /AC (Done) >>% @@ -13217,7 +13993,8 @@ \else \@@writetorep{#1}{#2}{#3}{#4}{#5}% \fi - \fi} + \fi +} \def\Hy@currentbookmarklevel{0} \def\Hy@numberline#1{#1 } \def\@@writetorep#1#2#3#4#5{% @@ -13227,16 +14004,16 @@ \edef\Hy@level{#4}% \ifx\Hy@levelcheck Y% \@tempcnta\Hy@level\relax - \advance\@tempcnta by -1 + \advance\@tempcnta by -1 % \ifnum\Hy@currentbookmarklevel<\@tempcnta \advance\@tempcnta by -\Hy@currentbookmarklevel\relax - \advance\@tempcnta by 1 + \advance\@tempcnta by 1 % \Hy@Warning{% Difference (\the\@tempcnta) between bookmark levels is % greater \MessageBreak than one, level fixed% }% \@tempcnta\Hy@currentbookmarklevel - \advance\@tempcnta by 1 + \advance\@tempcnta by 1 % \edef\Hy@level{\the\@tempcnta}% \fi \else @@ -13245,7 +14022,7 @@ \global\let\Hy@currentbookmarklevel\Hy@level \@tempcnta\Hy@level\relax \expandafter\xdef\csname Parent\Hy@level\endcsname{#3}% - \advance\@tempcnta by -1 + \advance\@tempcnta by -1 % \edef\Hy@tempa{#3}% \edef\Hy@tempb{\csname Parent\the\@tempcnta\endcsname}% \ifx\Hy@tempa\Hy@tempb @@ -13292,7 +14069,7 @@ \@tempcnta\Hy@currentbookmarklevel \Hy@StepCount\@tempcnta \expandafter\pdfbookmark\expandafter[\the\@tempcnta]{#1}{#2}% - \advance\@tempcnta by -1 + \advance\@tempcnta by -1 % \xdef\Hy@currentbookmarklevel{\the\@tempcnta}% } % \end{macrocode} @@ -13330,12 +14107,12 @@ % large |\ifcase|, but I'm too lazy to sort that out now. % \begin{macrocode} \begingroup - \catcode`\'=12 + \catcode`\'=12 % \ifnum\Hy@VTeXversion<650 % - \catcode`\"=12 + \catcode`\"=12 % \gdef\hv@pdf@char#1#2#3{% \char - \ifcase'#1#2#3 + \ifcase'#1#2#3 % "00\or"01\or"02\or"03\or"04\or"05\or"06\or"07% \or"08\or"09\or"0A\or"0B\or"0C\or"0D\or"0E\or"0F% \or"10\or"11\or"12\or"13\or"14\or"15\or"16\or"17% @@ -13369,9 +14146,9 @@ \or"F0\or"F1\or"F2\or"F3\or"F4\or"F5\or"F6\or"F7% \or"F8\or"F9\or"FA\or"FB\or"FC\or"FD\or"FE\or"FF% \fi - } + }% \else - \gdef\hv@pdf@char{\char'} + \gdef\hv@pdf@char{\char'}% \fi \endgroup % \end{macrocode} @@ -13416,7 +14193,7 @@ o\fi,t=#4}% \else \if@filesw \newwrite\@outlinefile - \immediate\openout\@outlinefile=\jobname.out + \immediate\openout\@outlinefile=\jobname.out\relax \ifHy@typexml \immediate\write\@outlinefile{<relaxxml>\relax}% \fi @@ -13461,13 +14238,21 @@ o\fi,t=#4}% %<*dvipdfm> \Hy@pstringdef\Hy@pstringName{##3}% \@pdfm@mark{% - outline ##1 << - /Title (\expandafter\strip@prefix\meaning\Hy@temp) - /A << - /S /GoTo - /D (\Hy@pstringName) - >> - >> + outline \ifHy@DvipdfmxOutlineOpen + [% + \ifnum##21>\z@ + \else + -% + \fi + ] % + \fi + ##1<<% + /Title(\expandafter\strip@prefix\meaning\Hy@temp)% + /A<<% + /S/GoTo% + /D(\Hy@pstringName)% + >>% + >>% }% %</dvipdfm> }% @@ -13480,7 +14265,7 @@ o\fi,t=#4}% \else \if@filesw \newwrite\@outlinefile - \immediate\openout\@outlinefile=\jobname.out + \immediate\openout\@outlinefile=\jobname.out\relax \ifHy@typexml \immediate\write\@outlinefile{<relaxxml>\relax}% \fi @@ -13502,7 +14287,7 @@ o\fi,t=#4}% } \def\calc@bm@number#1{% \@tempcnta=\check@bm@number{#1}\relax - \advance\@tempcnta by1 + \advance\@tempcnta by 1 % \expandafter\xdef\csname B_#1\endcsname{\the\@tempcnta}% } %</!vtex> @@ -13788,7 +14573,7 @@ o\fi,t=#4}% \DeclareTextCommand{\textemdash}{PD1}{\204} % emdash \DeclareTextCommand{\textendash}{PD1}{\205} % endash \DeclareTextCommand{\textflorin}{PD1}{\206} % florin -\DeclareTextCommand{\textfractionmark}{PD1}{/} % fraction, \207 +\DeclareTextCommand{\textfractionmark}{PD1}{\207} % fraction, \207 \DeclareTextCommand{\guilsinglleft}{PD1}{\210} % guilsinglleft \DeclareTextCommand{\guilsinglright}{PD1}{\211} % guilsinglright \DeclareTextCommand{\textminus}{PD1}{-} % minus, \212 @@ -13800,19 +14585,19 @@ o\fi,t=#4}% \DeclareTextCommand{\textquoteright}{PD1}{\220} % quoteright \DeclareTextCommand{\quotesinglbase}{PD1}{\221} % quotesinglbase \DeclareTextCommand{\texttrademark}{PD1}{\222} % trademark -\DeclareTextCommand{\textfi}{PD1}{fi} % fi ?? \223 -\DeclareTextCommand{\textfl}{PD1}{fl} % fl ?? \224 -\DeclareTextCommand{\L}{PD1}{L} % Lslash, \225 +\DeclareTextCommand{\textfi}{PD1}{\223} % fi ?? \223 +\DeclareTextCommand{\textfl}{PD1}{\224} % fl ?? \224 +\DeclareTextCommand{\L}{PD1}{\225} % Lslash, \225 \DeclareTextCommand{\OE}{PD1}{\226} % OE \DeclareTextCompositeCommand{\v}{PD1}{S}{\227} % Scaron \DeclareTextCompositeCommand{\"}{PD1}{Y}{\230} % Ydieresis \DeclareTextCommand{\IJ}{PD1}{\230} -\DeclareTextCompositeCommand{\v}{PD1}{Z}{Z} % Zcaron, \231 -\DeclareTextCommand{\i}{PD1}{i} % dotlessi, \232 -\DeclareTextCommand{\l}{PD1}{l} % lslash, \233 +\DeclareTextCompositeCommand{\v}{PD1}{Z}{\231} % Zcaron, \231 +\DeclareTextCommand{\i}{PD1}{\232} % dotlessi, \232 +\DeclareTextCommand{\l}{PD1}{\233} % lslash, \233 \DeclareTextCommand{\oe}{PD1}{\234} % oe \DeclareTextCompositeCommand{\v}{PD1}{s}{\235} % scaron -\DeclareTextCompositeCommand{\v}{PD1}{z}{z} % zcaron, 236 +\DeclareTextCompositeCommand{\v}{PD1}{z}{\236} % zcaron, 236 % \end{macrocode} % No glyph \cs{237} in PDFDocEncoding.\\ % The euro \cs{240} is inserted in version 1.3 of the pdf @@ -14390,6 +15175,8 @@ o\fi,t=#4}% % % \subsubsection{Greek} % \begin{macrocode} +\DeclareTextCommand{\textnumeralsigngreek}{PU}{\83\164} +\DeclareTextCommand{\textnumeralsignlowergreek}{PU}{\83\165} \DeclareTextCompositeCommand{\'}{PU}{\textAlpha}{\83\206} \DeclareTextCompositeCommand{\'}{PU}{\textEpsilon}{\83\210} \DeclareTextCompositeCommand{\'}{PU}{\textEta}{\83\211} @@ -14464,7 +15251,14 @@ o\fi,t=#4}% %\DeclareTextCommand{\textvartheta}{PU}{\83\321} %\DeclareTextCommand{\textvarphi}{PU}{\83\325} %\DeclareTextCommand{\textvarpi}{PU}{\83\326} -%\DeclareTextCommand{\textdigamma}{PU}{\83\334} +\DeclareTextCommand{\textStigmagreek}{PU}{\83\332} +\DeclareTextCommand{\textstigmagreek}{PU}{\83\333} +\DeclareTextCommand{\textDigammagreek}{PU}{\83\334} +\DeclareTextCommand{\textdigammagreek}{PU}{\83\335} +\DeclareTextCommand{\textKoppagreek}{PU}{\83\336} +\DeclareTextCommand{\textkoppagreek}{PU}{\83\337} +\DeclareTextCommand{\textSampigreek}{PU}{\83\340} +\DeclareTextCommand{\textsampigreek}{PU}{\83\341} %\DeclareTextCommand{\textvarkappa}{PU}{\83\360} %\DeclareTextCommand{\textvarrho}{PU}{\83\361} % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/hyperref/nameref.dtx b/Master/texmf-dist/source/latex/hyperref/nameref.dtx index bb61b32ee3b..891bd49257a 100644 --- a/Master/texmf-dist/source/latex/hyperref/nameref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/nameref.dtx @@ -1,7 +1,7 @@ % \iffalse % File: nameref.dtx % Copyright (C) 1995-9 Sebastian Rahtz -% 2000-6 Sebastian Rahtz, Heiko Oberdiek +% 2000-7 Sebastian Rahtz, Heiko Oberdiek % %% This file is part of the `Hyperref Bundle'. %% ------------------------------------------- @@ -24,35 +24,35 @@ %<driver>\ProvidesFile{nameref.drv} % \fi % \ProvidesFile{nameref.dtx} - [2006/12/27 v2.28 Cross-referencing by name of section] + [2007/05/29 v2.31 Cross-referencing by name of section]% % -% \CheckSum{473} +% \CheckSum{576} % % \iffalse %<*driver> \documentclass{ltxdoc} -\IfFileExists{bmhydoc.sty}{\usepackage{bmhydoc}}{} \usepackage[numbered]{hypdoc} +\usepackage{bmhydoc} \EnableCrossrefs \CodelineIndex \begin{document} - \GetFileInfo{nameref.sty} + \GetFileInfo{nameref.sty}% \title{% Section name references in \LaTeX \thanks{% - This file has version number \fileversion, + This file has version number \fileversion, % last revised \filedate.% }% - } - \author{Sebastian Rahtz} - \date{\filedate} + }% + \author{Sebastian Rahtz}% + \date{\filedate}% \maketitle \makeatletter \@ifundefined{HyperrefOverview}{}{% \HyperrefOverview*% }% \tableofcontents - \DocInput{nameref.dtx} + \DocInput{nameref.dtx}% \PrintIndex \end{document} %</driver> @@ -199,7 +199,8 @@ }% }% }% - \endgroup} + \endgroup +} % \end{macrocode} % % \subsection{Changes of section macros} @@ -261,6 +262,22 @@ } % \end{macrocode} % +% \begin{macrocode} +\AtBeginDocument{% + \@ifpackageloaded{longtable}{% + \let\NRorg@LT@c@ption\LT@c@ption + \def\LT@c@ption#1[#2]#3{% + \NRorg@LT@c@ption{#1}[{#2}]{#3}% + \def\@tempa{#2}% + \ifx\@tempa\@empty + \else + \def\@currentlabelname{#2}% + \fi + }% + }{}% +} +% \end{macrocode} +% % Compatibility for package titlesec. % \begin{macrocode} \AtBeginDocument{% @@ -274,6 +291,28 @@ } % \end{macrocode} % +% \subsubsection{Class beamer} +% +% \begin{macrocode} +\@ifclassloaded{beamer}{% + \def\NR@PatchBeamer#1{% + \expandafter\let\csname NRorg@beamer@#1\expandafter\endcsname + \csname beamer@#1\endcsname + \begingroup + \edef\x{\endgroup + \long\def\expandafter\noexpand\csname beamer@#1\endcsname[####1]{% + \def\noexpand\@currentlabelname{####1}% + \expandafter\noexpand\csname NRorg@beamer@#1\endcsname[{####1}]% + }% + }% + \x + }% + \NR@PatchBeamer{section}% + \NR@PatchBeamer{subsection}% + \NR@PatchBeamer{subsubsection}% +}{} +% \end{macrocode} +% % \subsection{Referencing stuff} % % We default the label and hypertext reference to be empty. @@ -417,91 +456,149 @@ % [This section was derived by Corey Minyard \texttt{minyard@acm.org} % from the varioref package] % \begin{macrocode} -\ifx\csname @@vpageref\endcsname\relax -\else - \def\@@vpageref#1[#2]#3{% - \leavevmode\unskip - \global\advance\c@vrcnt\@ne - \@ifundefined{r@\the\c@vrcnt @vr}% - {\@namedef{r@\the\c@vrcnt @vr}{{??}{??}{??}{??}{??}}}{}% - \edef\@tempa{% - \expandafter\expandafter\expandafter - \@secondoffive\csname r@\the\c@vrcnt @vr\endcsname - }% - \@ifundefined{r@\the\c@vrcnt @xvr}% - {\@namedef{r@\the\c@vrcnt @xvr}{{??}{??}{??}{??}{??}}}{}% - \edef\@tempb{% - \expandafter\expandafter\expandafter - \@secondoffive\csname r@\the\c@vrcnt @xvr\endcsname - }% - {% - \let\@currentlabel\@empty - \expandafter\label\expandafter{\the\c@vrcnt @xvr}% +\AtBeginDocument{% + \ifx\csname @@vpageref\endcsname\relax + \else + \def\@@vpageref#1[#2]#3{% + \begingroup + \csname @safe@activestrue\endcsname + \edef\x{#3}% + \@onelevel@sanitize\x + \toks@{% + \NR@@vpageref{#1}[{#2}]% + }% + \edef\x{\endgroup + \the\toks@{\x}% + }% + \x }% - \ifx\@tempa\@tempb - \else - \vref@err{% - \noexpand\vref at page boundary - \@tempb-\@tempa\space (may loop)% + \def\NR@@vpageref#1[#2]#3{% + \leavevmode\unskip + \global\advance\c@vrcnt\@ne + \@ifundefined{r@\the\c@vrcnt @vr}% + {\@namedef{r@\the\c@vrcnt @vr}{{??}{??}{}{}{}}}{}% + \edef\@tempa{% + \expandafter\expandafter\expandafter + \@secondoffive\csname r@\the\c@vrcnt @vr\endcsname }% - \fi - \@ifundefined{r@#3}{\@namedef{r@#3}{{??}{??}{??}{??}{??}}}{}% - \edef\@tempb{% - \expandafter\expandafter\expandafter - \@secondoffive\csname r@#3\endcsname - }% - \space - \ifx\@tempa\@tempb - #1% - \else - #2% - \is@pos@number\@tempb{% - \is@pos@number\@tempa{% - \@tempcnta\@tempa - \advance\@tempcnta\@ne - }{% - \@tempcnta\maxdimen + \@ifundefined{r@\the\c@vrcnt @xvr}% + {\@namedef{r@\the\c@vrcnt @xvr}{{??}{??}{}{}{}}}{}% + \edef\@tempb{% + \expandafter\expandafter\expandafter + \@secondoffive\csname r@\the\c@vrcnt @xvr\endcsname + }% + {% + \let\@currentlabel\@empty + \expandafter\label\expandafter{\the\c@vrcnt @xvr}% + }% + \ifx\@tempa\@tempb + \else + \vref@err{% + \noexpand\vref at page boundary % + \@tempb-\@tempa\space (may loop)% }% - \ifnum \@tempb =\@tempcnta - \ifodd\@tempcnta - \if@twoside - \reftextfaceafter + \fi + \@ifundefined{r@#3}{\@namedef{r@#3}{{??}{??}{}{}{}}}{}% + \edef\thevpagerefnum{% + \expandafter\expandafter\expandafter + \@secondoffive\csname r@#3\endcsname + }% + \ifx\vref@space\@undefined + \space + \else + \vref@space + \fi + \ifx\@tempa\thevpagerefnum + #1% + \else + #2% + \is@pos@number\thevpagerefnum{% + \is@pos@number\@tempa{% + \@tempcnta\@tempa + \advance\@tempcnta\@ne + }{% + \@tempcnta\maxdimen + }% + \ifnum \thevpagerefnum =\@tempcnta + \ifodd\@tempcnta + \if@twoside + \reftextfaceafter + \else + \reftextafter + \fi \else \reftextafter \fi \else - \reftextafter - \fi - \else - \advance\@tempcnta-2 - \ifnum \@tempb =\@tempcnta - \ifodd\@tempcnta - \reftextbefore - \else - \if@twoside - \reftextfacebefore - \else + \advance\@tempcnta-2 % + \ifnum \thevpagerefnum =\@tempcnta + \ifodd\@tempcnta \reftextbefore + \else + \if@twoside + \reftextfacebefore + \else + \reftextbefore + \fi \fi + \else + \reftextfaraway{#3}% \fi - \else - \reftextfaraway{#3}% \fi - \fi - }{% - \reftextfaraway{#3}% + }{% + \reftextfaraway{#3}% + }% + \fi + {% + \let\@currentlabel\@empty + \expandafter\label\expandafter{\the\c@vrcnt @vr}% }% - \fi - {% - \let\@currentlabel\@empty - \expandafter\label\expandafter{\the\c@vrcnt @vr}% }% + \DeclareRobustCommand\vnameref[1]{% + \unskip~\nameref{#1}% + \@vpageref[\unskip]{#1}% + }% + \fi +} +% \end{macrocode} +% \begin{macrocode} +\@ifundefined{@Refstar}{% + \def\T@Ref#1{% + \NR@setref{#1}\NR@MakeUppercaseFirstOfFive{#1}% }% - \DeclareRobustCommand\vnameref[1]{% - \unskip~\nameref{#1}% - \@vpageref[\unskip]{#1}% - } -\fi + \def\NR@MakeUppercaseFirstOfFive#1#2#3#4#5{% + \MakeUppercase#1% + }% +}{}% +\AtBeginDocument{% + \@ifpackageloaded{varioref}{% + \@ifundefined{@Refstar}{% + \DeclareRobustCommand*{\Ref}[1]{% + \T@Ref{#1}% + }% + }{}% + }{}% +}% +% \end{macrocode} +% +% \subsection{Support for listings} +% +% \begin{macrocode} +\AtBeginDocument{% + \@ifpackageloaded{listings}{% + \let\NROrg@lst@MakeCaption\lst@MakeCaption + \def\lst@MakeCaption{% + \ifx\lst@label\@empty + \else + \let\@currentlabelname\lst@@caption + \fi + \NROrg@lst@MakeCaption + }% + }{}% +} +% \end{macrocode} +% +% \begin{macrocode} %</package> % \end{macrocode} % |