summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/sttools/floatpag.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/sttools/floatpag.dtx')
-rw-r--r--macros/latex/contrib/sttools/floatpag.dtx141
1 files changed, 67 insertions, 74 deletions
diff --git a/macros/latex/contrib/sttools/floatpag.dtx b/macros/latex/contrib/sttools/floatpag.dtx
index 95d732b665..b40da49c9f 100644
--- a/macros/latex/contrib/sttools/floatpag.dtx
+++ b/macros/latex/contrib/sttools/floatpag.dtx
@@ -1,6 +1,7 @@
-% \iffalse meta-comment
+% \iffalse meta-comment/*% \end{macrocode}*/
%
% Copyright (C) 1999-2012 by Vytas Statulevi\v{c}ius <vytas@vtex.lt>
+% Copyright (C) 2021 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
% ---------------------------------------------------------------------------
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -20,12 +21,35 @@
% \fi
%
% \iffalse
+%<*internal>
+\begingroup
+%</internal>
+%<*batchfile>
+\input docstrip.tex
+\keepsilent\askforoverwritefalse
+\preamble
+%%
+%% This is file `floatpag.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% floatpag.dtx (with options: `package')
+%%
+\endpreamble
+\generate{\file{floatpag.sty}{\from{floatpag.dtx}{package}}}
+%</batchfile>
+%<batchfile>\endbatchfile
+%<*internal>
+\generate{\file{floatpag.ins}{\from{floatpag.dtx}{batchfile}}}
+\endgroup
+%</internal>
%<*driver>
\ProvidesFile{floatpag.dtx}
%</driver>
%% Copyright (C) 1999-2012 by Vytas Statulevi\v{c}ius <vytas@vtex.lt>
-%% VTeX Ltd., Akademijos 4, Vilnius, Lithuania
-%% http://www.vtex.lt/tex/download/macros/
+%% Copyright (C) 2021 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+%% UAB VTeX, Mokslininkų 2A, LT-08412 Vilnius, Lithuania
%% --------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -46,12 +70,13 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{floatpag}
%<*package>
- [2012/05/29 v1.1 Different pagestyles on float pages]
+ [2021/10/04 v2.0 Different pagestyles on float pages]
+
%</package>
%
%<*driver>
\documentclass{ltxdoc}
-\usepackage{floatpag}[2012/05/29]
+\usepackage{floatpag}[2021/10/04]
\EnableCrossrefs
\CodelineIndex
\RecordChanges
@@ -63,7 +88,7 @@
%</driver>
% \fi
%
-% \CheckSum{304}
+% \CheckSum{216}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -83,6 +108,7 @@
%
%
% \changes{v1.1}{2012/05/29}{Converted to DTX file}
+% \changes{v2.0}{2021/10/04}{Removed latex209 compatibility; added rotated dblfloat support}
%
% \DoNotIndex{\newcommand,\newenvironment}
%
@@ -126,8 +152,8 @@
% |\@xfloat|, |\@vtryfc|.
%
% \medskip
-% The following command from the rotating.sty was redefined:
-% |\@xrotfloat|.
+% The following commands from the rotating.sty was redefined:
+% |\@xrotfloat|, |\@rotxdblfloat|.
%
% \StopEventually{}
%
@@ -137,13 +163,6 @@
%<*package>
% \fi
%
-% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{floatpag}
- [1999/04/29
- FLOAT PAGESTYLE]
-% \end{macrocode}
-%
% \begin{macro}{\floatpagestyle}
% \begin{macrocode}
\def\floatpagestyle#1{\gdef\at@float@page{\thispagestyle{#1}}}
@@ -153,10 +172,7 @@
%
% \begin{macro}{\rotfloatpagestyle}
% \begin{macrocode}
-\def\rotfloatpagestyle#1{%
- \gdef\@r@f@pagestyle{#1}%
- \gdef\at@rotfloat@page{\thispagestyle{#1}}%
- }
+\def\rotfloatpagestyle#1{\gdef\@r@f@pagestyle{#1}}
% \end{macrocode}
% \end{macro}
%
@@ -169,8 +185,7 @@
%
% \begin{macrocode}
\def\thisfloatpagestyle#1{%
- \expandafter\expandafter\expandafter\gdef\expandafter
- \csname\number\@currbox @float\endcsname{\thispagestyle{#1}}\relax
+ \global\@namedef{\number\@currbox @float}{\thispagestyle{#1}}\relax
}
% \end{macrocode}
% \end{macro}
@@ -215,28 +230,27 @@
\else
\advance \@tempcnta \@ne
\fi
- \fi
- \if \reserved@a t%
+ \else\if \reserved@a t%
\@setfpsbit \tw@
- \fi
- \if \reserved@a b%
+ \else\if \reserved@a b%
\@setfpsbit 4%
- \fi
- \if \reserved@a p%
+ \else\if \reserved@a p%
\@setfpsbit 8%
- \fi
- \if \reserved@a !%
+ \else\if \reserved@a !%
\ifnum \@tempcnta>15
\advance\@tempcnta -\sixt@@n\relax
\fi
- \fi
+ \else
+ \@latex@error{Unknown float option `\reserved@a'}%
+ {Option `\reserved@a' ignored and `p' used.}%
+ \@setfpsbit 8%
+ \fi\fi\fi\fi\fi
}%
\@tempcntb \csname ftype@\@captype \endcsname
\multiply \@tempcntb \@xxxii
\advance \@tempcnta \@tempcntb
\global \count\@currbox \@tempcnta
- \expandafter\expandafter\expandafter\gdef\expandafter
- \csname\number\@currbox @float\endcsname{\at@float@page}\relax
+ \global\@namedef{\number\@currbox @float}{\at@float@page}\relax
}%
\@fltovf
\fi
@@ -252,11 +266,11 @@
% \end{macro}
%
%
-% \begin{macro}{\e@xrotfloat}
+% \begin{macro}{\floatpag@@xrotfloat}
%
-%% 2e rotating.sty v. 2.10:
+% rotating.sty v. $>$2.10:
% \begin{macrocode}
-\def\e@xrotfloat#1[#2]{%
+\def\floatpag@@xrotfloat#1[#2]{%
\@float{#1}[#2]%
\thisfloatpagestyle{\@r@f@pagestyle}%
\begin{lrbox}\rot@float@box
@@ -266,57 +280,36 @@
% \end{macro}
%
%
-% \begin{macro}{\n@xrotfloat}
-%% 2.09 rotating.sty v. 1.6
+% \begin{macro}{\floatpag@@rotxdblfloat}
+%
+% rotating.sty v. $>$2.10:
% \begin{macrocode}
-\def\n@xrotfloat#1[#2]{%
- \ifhmode
- \@bsphack
- \@floatpenalty -\@Mii
- \else
- \@floatpenalty-\@Miii
- \fi
- \def\@captype{#1}%
- \ifinner
- \@parmoderr\@floatpenalty\z@
- \else
- \@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname
- \multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n
- \@tfor \@tempa :=#2\do{%
- \if\@tempa h\advance\@tempcnta \@ne\fi
- \if\@tempa t\advance\@tempcnta \tw@\fi
- \if\@tempa b\advance\@tempcnta 4\relax\fi
- \if\@tempa p\advance\@tempcnta 8\relax\fi
- }%
- \global\count\@currbox\@tempcnta
- }%
- \@fltovf
- \fi
- \expandafter\expandafter\expandafter\gdef\expandafter
- \csname\number\@currbox @float\endcsname{\at@rotfloat@page}\relax
- \global\setbox\@currbox\vbox\bgroup
- \hsize\textheight
- \@parboxrestore
- }
+\def\floatpag@@rotxdblfloat#1[#2]{%
+ \@float{#1}[#2]%
+ \thisfloatpagestyle{\@r@f@pagestyle}%
+ \hsize\textwidth\linewidth\textwidth
+ \begin{lrbox}\rot@float@box
+ \begin{minipage}\textheight
+}
% \end{macrocode}
+% \end{macro}
+%
%
-%% Check for |rotating| version: 2e ar 209:
-%% 1999.02.08 To be sure check at begin document.
% \begin{macrocode}
\AtBeginDocument{%
-\@ifpackageloaded{rotating}%
-{\let\@xrotfloat\e@xrotfloat\let\n@xrotfloat\relax}%
-{\let\@xrotfloat\n@xrotfloat\let\e@xrotfloat\relax}}%
+ \let\@xrotfloat\floatpag@@xrotfloat
+ \let\@rotxdblfloat\floatpag@@rotxdblfloat
+ }%
% \end{macrocode}
-% \end{macro}
%
%
% \begin{macro}{\spec@float}
%
%% "Hook" in the output procedure.
% \begin{macrocode}
-\def\spec@float#1{\expandafter\csname\number#1@float\endcsname
- \expandafter\expandafter\expandafter\gdef\expandafter\csname\number#1@float\endcsname{}%
+\def\spec@float#1{%
+ \@nameuse{\number#1@float}%
+ \global\@namedef{\number#1@float}{}%
}
% \end{macrocode}
% \end{macro}