summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/revtex4/revtex4.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/revtex4/revtex4.cls')
-rw-r--r--Master/texmf-dist/tex/latex/revtex4/revtex4.cls88
1 files changed, 71 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/revtex4/revtex4.cls b/Master/texmf-dist/tex/latex/revtex4/revtex4.cls
index 854db7169ae..069e7fd9fdf 100644
--- a/Master/texmf-dist/tex/latex/revtex4/revtex4.cls
+++ b/Master/texmf-dist/tex/latex/revtex4/revtex4.cls
@@ -23,7 +23,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesClass{revtex4}
- [2001/08/02 v4.0 (http://publish.aps.org/revtex4/ for documentation)]%FileInfo
+ [2020/09/30 v4.0a (http://publish.aps.org/revtex4/ for documentation)]%FileInfo
\def\class@name{revtex4}%
\GenericInfo{}{\space
Copyright (c) 2001 The American Physical Society.^^J
@@ -33,7 +33,7 @@
Based on work by David Carlisle <david@dcarlisle.demon.co.uk>%
\@gobble
}%
-\if@compatibility
+\if@compatibility
\edef\reserved@a{\errhelp{%
Change your \string\documentstyle\space statement to
\string\documentclass\space and rerun.
@@ -151,6 +151,11 @@
\long\def\@argswap#1#2{#2#1}%
\long\def\@argswap@val#1#2{#2{#1}}%
\def\@ifxundefined@cs#1{\expandafter\@ifx\expandafter{\csname#1\endcsname\relax}}%
+\ifx\IfFormatAtLeastTF\undefined
+ \def\rvtx@ifformat@geq{\@ifl@t@r\fmtversion}%
+\else
+ \let\rvtx@ifformat@geq\IfFormatAtLeastTF
+\fi
\def\@boolean#1#2{%
\long\def#1{%
#2% \if<something>
@@ -186,14 +191,24 @@
\@ifx{\undefined#1}{\true@sw}{\@ifx{\relax#1}{\true@sw}{\false@sw}}%
{\def#1}{\def\j@nk}%
}%
-\prepdef\document{%
- \endgroup
- \init@documenthook
- \set@typesize@hook
- \normalsize
- \set@pica@hook
- \true@sw{}%
-}%
+\rvtx@ifformat@geq{2020-10-01}%
+ {%
+ \AddToHook{begindocument/before}{%
+ \init@documenthook
+ \set@typesize@hook
+ \normalsize
+ \set@pica@hook
+ }%
+ }{%
+ \prepdef\document{%
+ \endgroup
+ \init@documenthook
+ \set@typesize@hook
+ \normalsize
+ \set@pica@hook
+ \true@sw{}%
+ }%
+ }
\def\init@documenthook{}%
\AtBeginDocument{%
\class@documenthook
@@ -205,6 +220,10 @@
\def\class@enddocumenthook{}%
\def\set@typesize@hook{}%
\def\set@pica@hook{}%
+\rvtx@ifformat@geq{2020-10-01}{%
+ % <definitions for newer LaTeX later>
+}{%
+ % <definitions for older LaTeX>
\def\enddocument{%
\@enddocumenthook
\@checkend{document}%
@@ -238,7 +257,7 @@
\@if@sw\if@tempswa\fi{%
\@latex@warning@no@line{%
Label(s) may have changed.
- Rerun to get cross-references right
+ Rerun to get cross-references right%
}%
}{}%
}{%
@@ -246,6 +265,31 @@
}%
}{}%
}%
+}
+\rvtx@ifformat@geq{2020-10-01}{%
+ \AddToHook{enddocument}{\rvtx@enddocument@patch{}}%
+}{}
+\protected\long\def\rvtx@enddocument@patch#1#2\@checkend#3{%
+ \begingroup
+ \edef\x{\detokenize{#3}}%
+ \edef\y{\detokenize{document}}%
+ \expandafter\endgroup
+ \ifx\x\y
+ \expandafter\rvtx@enddocument@patch@end
+ \else
+ \expandafter\rvtx@enddocument@patch@more
+ \fi
+ {#1#2}{#3}}
+\def\rvtx@enddocument@patch@more#1#2{%
+ \rvtx@enddocument@patch{#1\@checkend{#2}}}
+\long\def\rvtx@enddocument@patch@end#1#2\clearpage#3\endgroup{%
+ \def\do@check@aux{#3\endgroup}%
+ #1%
+ \@checkend{#2}%
+ \clear@document
+ \check@aux}
+\def\check@aux{\do@check@aux}%
+\def\clear@document{\clearpage}%
\def\flushing{%
\let\\\@normalcr
\leftskip\z@skip
@@ -3230,12 +3274,22 @@
}{}%
\outputdebug@sw{{\tracingall\scrollmode\showbox\footbox}}{}%
}%
-\prepdef\@begindocumenthook{%
- \open@column@one\@ne
- \set@colht
- \@floatplacement
- \@dblfloatplacement
-}%
+\rvtx@ifformat@geq{2020-10-01}%
+ {%
+ \AddToHook{begindocument}{%
+ \open@column@one\@ne
+ \set@colht
+ \@floatplacement
+ \@dblfloatplacement
+ }%
+ }{%
+ \prepdef\@begindocumenthook{%
+ \open@column@one\@ne
+ \set@colht
+ \@floatplacement
+ \@dblfloatplacement
+ }%
+ }
\def\longtable@longtable{%
\par
\ifx\multicols\@undefined\else\ifnum\col@number>\@ne\@twocolumntrue\fi\fi