diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/revtex/ltxutil.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/revtex/ltxutil.sty | 158 |
1 files changed, 125 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/latex/revtex/ltxutil.sty b/Master/texmf-dist/tex/latex/revtex/ltxutil.sty index 25d515026d0..db7a4268e8b 100644 --- a/Master/texmf-dist/tex/latex/revtex/ltxutil.sty +++ b/Master/texmf-dist/tex/latex/revtex/ltxutil.sty @@ -22,9 +22,9 @@ %% %%% @LaTeX-file{ %%% filename = "ltxutil.dtx", -%%% version = "4.1h", -%%% date = "2009/10/09", -%%% time = "11:23:00 GMT+8", +%%% version = "4.1p", +%%% date = "2010/02/25", +%%% time = "18:00:00 UT-8", %%% checksum = "4094", %%% author = "Arthur Ogawa (mailto:arthur_ogawa at sbcglobal.net), %%% commissioned by the American Physical Society. @@ -46,16 +46,16 @@ %%% docstring = "The checksum field above generated by ltxdoc", %%% } \NeedsTeXFormat{LaTeX2e}[1995/12/01]% -\ProvidesFile{ltxutil.sty}% - [2009/10/09 4.1h utilities package]% \fileversion +\ProvidesFile{% +ltxutil% +.sty% +}% + [2010/02/25/18:00:00 4.1p utilities package (portions licensed from W. E. Baxter web at superscript.com)]% \fileversion \def\package@name{ltxutil}% \expandafter\PackageInfo\expandafter{\package@name}{% Utility macros for \protect\LaTeXe, by A. Ogawa (arthur_ogawa at sbcglobal.net)% }% -\typeout{% - ltxutil [2009/07/07 4.1f]: portions licensed from W. E. Baxter (web at superscript.com)% -}% \def\class@err#1{\ClassError{\class@name}{#1}\@eha}% \def\class@warn#1{\ClassWarningNoLine{\class@name}{#1}}% \def\class@info#1{\ClassInfo{\class@name}{#1}}% @@ -206,6 +206,7 @@ \let\class@documenthook\@empty \let\class@enddocumenthook\@empty \def\enddocument{% + \let\AtEndDocument\@firstofone \@enddocumenthook \@checkend{document}% \clear@document @@ -213,7 +214,6 @@ \deadcycles\z@ \@@end }% -\def\clear@document{\clearpage}% \def\check@aux{\do@check@aux}% \def\do@check@aux{% \@if@sw\if@filesw\fi{% @@ -246,6 +246,15 @@ }% }{}% }% +\def\clear@document{% + \clearpage + \do@output@cclv{% + \Call@AfterLastShipout + }% +}% +\appdef\class@documenthook{% + \providecommand\Call@AfterLastShipout{}% +}% \def\class@extension#1#2{% \IfFileExists{#1.#2}{% \expandafter\class@extensionfile\csname ver@\@currname.\@currext\endcsname{#1}#2% @@ -449,11 +458,12 @@ \set@footnotewidth \@parboxrestore \protected@edef\@currentlabel{% - \csname p@footnote\endcsname\@thefnmark + \csname p@\@mpfn\endcsname\@thefnmark }% \color@begingroup \@makefntext{% - \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox + \rule\z@\footnotesep\ignorespaces#1% + \@finalstrut\strutbox\vadjust{\vskip\z@skip}% }% \color@endgroup \minipagefootnote@drop @@ -464,17 +474,7 @@ \splittopskip\footnotesep \splitmaxdepth\dp\strutbox }% -\def\set@footnotewidth{% - \hsize\columnwidth - \linewidth\hsize -}% -\def\set@footnotewidth@ii{% - \hsize\textwidth - \advance\hsize\columnsep - \divide\hsize\tw@ - \advance\hsize-\columnsep - \linewidth\hsize -}% +\def\set@footnotewidth{\set@footnotewidth@one}% \def\robustify@contents{% \let \label \@gobble \let \index \@gobble @@ -1870,9 +1870,11 @@ \@nameuse{l@f@#2}% \ignorespaces#3\unskip\nobreak\hskip\skip@ \hb@xt@\rightskip{\hfil\unhbox\@tempboxa}\hskip-\rightskip\hskip\z@skip - \par - \expandafter\aftergroup\csname tocdim@#2\endcsname\expandafter - \endgroup\the\@tempdima\relax + \expandafter\par + \expandafter\aftergroup\csname tocdim@#2% + \expandafter\endcsname + \expandafter\endgroup + \the\@tempdima\relax }% \def\set@tocdim@pagenum#1#2{% \setbox#1\hbox{\ignorespaces#2}% @@ -1923,26 +1925,116 @@ \advance\leftskip\@totalleftmargin }% \let\set@listindent\set@listindent@parshape -\providecommand\href[0]{\begingroup\@sanitize\@href}% -\def\@href#1{\@@startlink{#1}\@@href}% -\def\@@href#1{\endgroup#1\@@endlink}% -\providecommand \url [0]{\begingroup\@sanitize \@url }% +\providecommand\href[0]{\begingroup\@sanitize@url\@href}% +\def\@href#1{\@@startlink{#1}\endgroup\@@href}% +\def\@@href#1{#1\@@endlink}% +\providecommand \url [0]{\begingroup\@sanitize@url \@url }% \def \@url #1{\endgroup\@href {#1}{\URL@prefix#1}}% \providecommand \URL@prefix [0]{URL }% +\providecommand\doi[0]{\begingroup\@sanitize@url\@doi}% +\def\@doi#1{\endgroup\@@startlink{\doibase#1}doi:\discretionary {}{}{}#1\@@endlink }% +\providecommand \doibase [0]{http://dx.doi.org/}% +\providecommand \@sanitize@url[0]{\chardef\cat@space\the\catcode`\ \@sanitize\catcode`\ \cat@space}% +\def\@@startlink#1{}% +\def\@@endlink{}% \@ifxundefined \pdfoutput {\true@sw}{\@ifnum{\z@=\pdfoutput}{\true@sw}{\false@sw}}% {% - \def\@@startlink#1{\leavevmode\special{html:<a href="#1">}}% - \def\@@endlink{\special{html:</a>}}% + \def\@@startlink@hypertext#1{\leavevmode\special{html:<a href="#1">}}% + \def\@@endlink@hypertext{\special{html:</a>}}% }{% - \def\@@startlink#1{% + \def\@@startlink@hypertext#1{% \leavevmode \pdfstartlink\pdfstartlink@attr user{/Subtype/Link/A<</Type/Action/S/URI/URI(#1)>>}% \relax }% - \def\@@endlink{\pdfendlink}% + \def\@@endlink@hypertext{\pdfendlink}% \def\pdfstartlink@attr{attr{/Border[0 0 1 ]/H/I/C[0 1 1]}}% }% +\def\hypertext@enable@ltx{% + \let\@@startlink\@@startlink@hypertext + \let\@@endlink\@@endlink@hypertext +}% +\def\href@Hy{\hyper@normalise \href@ }% +\def\href@Hy@ltx{\@ifnextchar\bgroup\Hy@href{\hyper@normalise\href@}}% +\def\Hy@href#{\hyper@normalise\href@}% +\begingroup + \endlinechar=-1 % + \catcode`\^^A=14 % + \catcode`\^^M\active + \catcode`\%\active + \catcode`\#\active + \catcode`\_\active + \catcode`\$\active + \catcode`\&\active + \gdef\hyper@normalise@ltx{^^A + \begingroup + \catcode`\^^M\active + \def^^M{ }^^A + \catcode`\%\active + \let%\@percentchar + \let\%\@percentchar + \catcode`\#\active + \def#{\hyper@hash}^^A + \def\#{\hyper@hash}^^A + \@makeother\&^^A + \edef&{\string&}^^A + \edef\&{\string&}^^A + \edef\textunderscore{\string_}^^A + \let\_\textunderscore + \catcode`\_\active + \let_\textunderscore + \let~\hyper@tilde + \let\~\hyper@tilde + \let\textasciitilde\hyper@tilde + \let\\\@backslashchar + \edef${\string$}^^A + \Hy@safe@activestrue + \hyper@n@rmalise + }^^A + \catcode`\#=6 ^^A + \gdef\Hy@ActiveCarriageReturn@ltx{^^M}^^A + \gdef\hyper@n@rmalise@ltx#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@ltx#1#2{^^A + \edef\Hy@tempa{^^A + \endgroup + \noexpand#1{\Hy@RemovePercentCr#2%^^M\@nil}^^A + }^^A + \Hy@tempa + }^^A + \gdef\Hy@RemovePercentCr@ltx#1%^^M#2\@nil{^^A + #1^^A + \ifx\limits#2\limits + \else + \Hy@ReturnAfterFi{^^A + \Hy@RemovePercentCr #2\@nil + }^^A + \fi + }^^A +\endgroup +\def\switch@hyperref@href{% + \expandafter\@ifx\expandafter{\csname href \endcsname\href@Hy}{ + \class@info{Repairing hyperref 6.75r \string\href}% + \let\hyper@normalise\hyper@normalise@ltx + \let\hyper@@normalise\hyper@@normalise@ltx + \let\hyper@n@rmalise\hyper@n@rmalise@ltx + \let\Hy@ActiveCarriageReturn\Hy@ActiveCarriageReturn@ltx + \let\Hy@RemovePercentCr\Hy@RemovePercentCr@ltx + \let\href\href@Hy@ltx + }{}% +}% +\appdef\document@inithook{\switch@hyperref@href}% \def\typeout@org#1{% \begingroup \set@display@protect |