summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-07-22 23:01:13 +0000
committerKarl Berry <karl@freefriends.org>2015-07-22 23:01:13 +0000
commitc7fbeeaff8d1548d8bb4dc7e3e4dd49846d0e974 (patch)
tree674bd29aa194ebe5436f7d3f1c57641765285456 /Master/texmf-dist
parenteccd10e4fe7f75163ac2a0104e8172e3fa056a60 (diff)
morefloats (22jul15)
git-svn-id: svn://tug.org/texlive/trunk@37927 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/morefloats/README5
-rw-r--r--Master/texmf-dist/doc/latex/morefloats/morefloats-example.pdfbin63739 -> 61674 bytes
-rw-r--r--Master/texmf-dist/doc/latex/morefloats/morefloats-example.tex187
-rw-r--r--Master/texmf-dist/doc/latex/morefloats/morefloats.pdfbin487934 -> 493525 bytes
-rw-r--r--Master/texmf-dist/source/latex/morefloats/morefloats.drv4
-rw-r--r--Master/texmf-dist/source/latex/morefloats/morefloats.dtx428
-rw-r--r--Master/texmf-dist/source/latex/morefloats/morefloats.ins6
-rw-r--r--Master/texmf-dist/tex/latex/morefloats/morefloats.sty147
8 files changed, 281 insertions, 496 deletions
diff --git a/Master/texmf-dist/doc/latex/morefloats/README b/Master/texmf-dist/doc/latex/morefloats/README
index 1898228cee5..bb3c11351bb 100644
--- a/Master/texmf-dist/doc/latex/morefloats/README
+++ b/Master/texmf-dist/doc/latex/morefloats/README
@@ -1,4 +1,4 @@
-README for morefloats package, 2015/07/16, v1.0g
+README for morefloats package, 2015/07/22, v1.0h
TABLE OF CONTENTS
@@ -21,7 +21,8 @@ The limit of unprocessed floats, 18, can be increased with this
morefloats package. Otherwise, \clear(double)page, h(!), H from the
float package, or \FloatBarrier from the picins package might help.
-Note: The main code of this package was invented by
+Note: The original main code of this package
+(without \extrafloats from LaTeX 2015) was invented by
Don Hosek, Quixote, 1990/07/27 (Thanks!).
Maintenance has been taken over in September 2010 by H.-Martin M\"{u}nch.
diff --git a/Master/texmf-dist/doc/latex/morefloats/morefloats-example.pdf b/Master/texmf-dist/doc/latex/morefloats/morefloats-example.pdf
index d3373c9139a..4c9b1d0b999 100644
--- a/Master/texmf-dist/doc/latex/morefloats/morefloats-example.pdf
+++ b/Master/texmf-dist/doc/latex/morefloats/morefloats-example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/morefloats/morefloats-example.tex b/Master/texmf-dist/doc/latex/morefloats/morefloats-example.tex
index 81e943694cf..b8fdd2aa86c 100644
--- a/Master/texmf-dist/doc/latex/morefloats/morefloats-example.tex
+++ b/Master/texmf-dist/doc/latex/morefloats/morefloats-example.tex
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: morefloats
-%% Version: 2015/07/16 v1.0g
+%% Version: 2015/07/22 v1.0h
%%
%% Copyright (C) 2010 - 2015 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -56,21 +56,26 @@
%%
\documentclass[british]{article}[2014/09/29]% v1.4h
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\usepackage[maxfloats=19]{morefloats}[2015/07/16]% v1.0g
+\usepackage[maxfloats=25]{morefloats}[2015/07/22]% v1.0h
+%% \maxdeadcycles is the maximum number of calls of \output
+%% without a \shipout.
\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
\listfiles
\begin{document}
+\makeatletter
+
\section*{Example for morefloats}
\markboth{Example for morefloats}{Example for morefloats}
This example demonstrates the use of package\newline
-\textsf{morefloats}, v1.0g as of 2015/07/16 (HMM).\newline
-The package takes options (here: \verb|maxfloats=19| is used).\newline
+\textsf{morefloats}, v1.0h as of 2015/07/22 (HMM).\newline
+The package takes options (here:
+\verb|maxfloats=|\texttt{\morefloats@maxfloats} is used).\newline
For more details please see the documentation!\newline
To reproduce the\newline
-\texttt{\LaTeX{} Error: Too many unprocessed floats},\newline
+\LaTeX{} \texttt{ Error: Too many unprocessed floats},\newline
comment out the \verb|\usepackage...| in the preamble
(line~3)\newline
(by placing a \% before it).\newline
@@ -84,164 +89,26 @@ I do NOT think, that it is necessary to print THIS file, really!
\bigskip
-There follow a lot of floating tables.
+There follow \morefloats@maxfloats{} floating tables.
\pagebreak
-Here are a lot of floating tables.\newline
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The first Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The second Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The third Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The fourth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The fifth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The sixth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The seventh Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The eighth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The ninth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The tenth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The eleventh Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The twelfth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The thirteenth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The fourteenth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The fifteenth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The sixteenth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The seventeenth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The eighteenth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-One floating table too many
-(without \textsf{morefloats} and appropriate option(s)).\\ \hline
-\end{tabular}%
-\caption{The nineteenth Table}%
-\end{table}%
+\@tempcnta=18\relax% default floats
+\advance\@tempcnta by \morefloats@morefloats%
+\loop
+ \ifnum\@tempcnta>0\relax%
+ \begin{table}[t]\centering%
+ \begin{tabular}{|l|}%
+ \hline%
+ A table, which will keep floating.\\%
+ \hline
+ \end{tabular}%
+ \caption{A floating Table.}%
+ \end{table}%
+ \advance\@tempcnta by -1\relax%
+\repeat
+
+\makeatother
\end{document}
\endinput
diff --git a/Master/texmf-dist/doc/latex/morefloats/morefloats.pdf b/Master/texmf-dist/doc/latex/morefloats/morefloats.pdf
index e620602308e..0eb09eb88a9 100644
--- a/Master/texmf-dist/doc/latex/morefloats/morefloats.pdf
+++ b/Master/texmf-dist/doc/latex/morefloats/morefloats.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/morefloats/morefloats.drv b/Master/texmf-dist/source/latex/morefloats/morefloats.drv
index be70bff859c..d24a9cd3036 100644
--- a/Master/texmf-dist/source/latex/morefloats/morefloats.drv
+++ b/Master/texmf-dist/source/latex/morefloats/morefloats.drv
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: morefloats
-%% Version: 2015/07/16 v1.0g
+%% Version: 2015/07/22 v1.0h
%%
%% Copyright (C) 2010 - 2015 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -56,7 +56,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2015/01/01]
\ProvidesFile{morefloats.drv}%
- [2015/07/16 v1.0g Raise limit of unprocessed floats (HMM)]
+ [2015/07/22 v1.0h Raise limit of unprocessed floats (HMM)]
\documentclass{ltxdoc}[2015/03/26]% v2.0w
\usepackage[T1]{fontenc}[2005/09/27]% v1.99g
\usepackage{pdflscape}[2008/08/11]% v0.10
diff --git a/Master/texmf-dist/source/latex/morefloats/morefloats.dtx b/Master/texmf-dist/source/latex/morefloats/morefloats.dtx
index 104830b8618..7ff29e5301a 100644
--- a/Master/texmf-dist/source/latex/morefloats/morefloats.dtx
+++ b/Master/texmf-dist/source/latex/morefloats/morefloats.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% File: morefloats.dtx
-% Version: 2015/07/16 v1.0g
+% Version: 2015/07/22 v1.0h
%
% Copyright (C) 2010 - 2015 by
% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -58,7 +58,7 @@
\input docstrip.tex
\Msg{*******************************************************************************}
\Msg{* Installation *}
-\Msg{* Package: morefloats 2015/07/16 v1.0g Raise limit of unprocessed floats (HMM)*}
+\Msg{* Package: morefloats 2015/07/22 v1.0h Raise limit of unprocessed floats (HMM)*}
\Msg{*******************************************************************************}
\keepsilent
@@ -70,7 +70,7 @@
This is a generated file.
Project: morefloats
-Version: 2015/07/16 v1.0g
+Version: 2015/07/22 v1.0h
Copyright (C) 2010 - 2015 by
H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -170,7 +170,7 @@ In memoriam
%<*driver>
\NeedsTeXFormat{LaTeX2e}[2015/01/01]
\ProvidesFile{morefloats.drv}%
- [2015/07/16 v1.0g Raise limit of unprocessed floats (HMM)]
+ [2015/07/22 v1.0h Raise limit of unprocessed floats (HMM)]
\documentclass{ltxdoc}[2015/03/26]% v2.0w
\usepackage[T1]{fontenc}[2005/09/27]% v1.99g
\usepackage{pdflscape}[2008/08/11]% v0.10
@@ -209,7 +209,7 @@ In memoriam
%
% \fi
%
-% \CheckSum{3509}
+% \CheckSum{3565}
%
% \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
@@ -249,9 +249,9 @@ In memoriam
% \DoNotIndex{\begin, \end, \LaTeX, \LateXe}
% \DoNotIndex{\bigskip, \caption, \centering, \hline, \MessageBreak}
% \DoNotIndex{\documentclass, \markboth, \mathrm, \mathord}
-% \DoNotIndex{\NeedsTeXFormat, \usepackage}
+% \DoNotIndex{\NeedsTeXFormat, \usepackage, \ProvidesPackage, \RequirePackage}
% \DoNotIndex{\newline, \newpage, \pagebreak}
-% \DoNotIndex{\section, \space, \thinspace}
+% \DoNotIndex{\section, \subsection, \space, \thinspace}
% \DoNotIndex{\textsf, \texttt}
% \DoNotIndex{\the, \@tempcnta,\@tempcntb}
% \DoNotIndex{\@elt,\@freelist, \newinsert}
@@ -269,7 +269,7 @@ In memoriam
% \DoNotIndex{\morefloats@mx}
%
% \title{The \xpackage{morefloats} package}
-% \date{2015/07/16 v1.0g}
+% \date{2015/07/22 v1.0h}
% \author{H.-Martin M\"{u}nch (current maintainer;\\
% invented by Don Hosek, Quixote)\\
% \xemail{Martin.Muench at Uni-Bonn.de}}
@@ -324,7 +324,8 @@ In memoriam
% (user \url{https://tex.stackexchange.com/users/1495/kahen} as comment to\\
% \url{https://tex.stackexchange.com/a/35596/6865} on 2011/11/21)\\
% As alternatives (see also section \ref{sec:alternatives} below)
-% |\clear(double)page|, |h(!)|, |H|~from the \xpackage{float} package,
+% |\clear(double)page|, |h(!)|, |H|~from the
+% \href{https://www.ctan.org/pkg/float}{\xpackage{float}} package,
% or |\FloatBarrier| from the %
% \href{https://www.ctan.org/pkg/picins}{\xpackage{picins}} package might help.
% If the floats cannot be placed anywhere at all, extending the number of floats
@@ -332,11 +333,12 @@ In memoriam
%
% \section{Usage}
%
+% \subsection{General usage:}
% Load the package placing
% \begin{quote}
% |\usepackage[<|\textit{options}|>]{morefloats}|
% \end{quote}
-% \noindent in the preamble of your \LaTeXe{} source file.\\
+% \noindent in the preamble of your \LaTeXe{} source file (the earlier the better).\\
% \noindent The \xpackage{morefloats} package takes two options: |maxfloats| and
% |morefloats|, where |morefloats| gives the number of additional floats and
% |maxfloats| gives the maximum number of floats. |maxfloats=25| therefore means,
@@ -360,31 +362,31 @@ In memoriam
% |\usepackage[maxfloats=25,morefloats=7]{morefloats}|
% \end{quote}
%
-% Situation for \LaTeX{} before 2015:\\
+% \subsection{Situation for \LaTeX{} before 2015:}
% |Float| uses |insert|, and each |insert| uses a group of |count|, |dimen|,
% |skip|, and |box| each. When there are not enough available, no |\newinsert|
-% can be created. The \xpackage{etex} package provides access at an extended
-% range of those registers, but does not use those for |\newinsert|. Therefore
-% the inserts must be reserved first, which forces the use of the extended
-% register range for other new |count|, |dimen|, |skip|, and |box|:
+% can be created. The
+% \href{https://www.ctan.org/pkg/etex-pkg}{\xpackage{etex}} package
+% provides access at an extended range of those registers,
+% but does not use those for |\newinsert|. Therefore the inserts must be
+% reserved first, which forces the use of the extended register range
+% for other new |count|, |dimen|, |skip|, and |box|:
% To have more floats available, use |\usepackage{etex}\reserveinserts{...}|
% right after |\documentclass[...]{...}|, where the argument of |\reserveinserts|
% should be at least the maximum number of floats. Add another $10$
% if the \href{https://www.ctan.org/pkg/bigfoot}{\xpackage{bigfoot}} or the
% \href{https://www.ctan.org/pkg/manyfoot}{\xpackage{manyfoot}} package
% is used, but |\reserveinserts| can be about $234$ at most for older
-% \LaTeX{} formats.\\
+% \LaTeX{} formats.
%
-% \pagebreak
-%
-% Situation for \LaTeX{} since 2015:\\
+% \subsection{Situation for \LaTeX{} since 2015:}
% Now |\reserveinserts| can be about $2\,147\,483\,647$,
% but |\insert255{}| even then produces an error.
% The \LaTeX{} 2015 \textquotedblleft release provides a new command in the format
% |\extrafloats|\textquotedblright ; \textquotedblleft as it doesn't use
% |\newinsert| (and as the 2015 format uses extended registers by default)
% you can allocate a lot more floats\textquotedblright{} %
-% (both \textsc{David Carlisle}, 29.06.2015), \hbox{e.\,g. |\extrafloats{1234}|.}
+% (both \textsc{David Carlisle}, 29. June 2015), \hbox{e.\,g. |\extrafloats{1234}|.}
%
% \section{Alternatives (kind of)\label{sec:alternatives}}
%
@@ -430,13 +432,20 @@ In memoriam
% section headings. It is further possible to make
% |\FloatBarrier|s less strict (see that package's documentation).\\
% The \xpackage{placeins} package is available at \url{https://www.ctan.org/pkg/placeins}.
+% \item[-] Sometimes also increasing the maximum number (|\maxdeadcycles|)
+% of calls of |\output| without a |\shipout| can help,
+% for example |\maxdeadcycles=123\relax|.
% \end{description}
%
+% \newpage
+%
% \noindent See also the following entries in the
-% \texttt{UK~List of TeX Frequently Asked Questions on the Web}:\\
-% - \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=floats}\\
-% - \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tmupfl}\\
-% - \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=figurehere}\\
+% \texttt{UK~List of TeX Frequently Asked Questions on the Web}:
+% \begin{description}
+% \item[-] \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=floats}
+% \item[-] \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tmupfl}
+% \item[-] \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=figurehere}
+% \end{description}
% and the \textbf{excellent article on \textquotedblleft How to influence the position
% of float environments like figure and table in \hbox{\LaTeX ?\textquotedblright } by
% \textsc{Frank Mittelbach}} at \url{https://tex.stackexchange.com/a/39020/6865}{}!\\
@@ -457,21 +466,27 @@ In memoriam
%<*example>
\documentclass[british]{article}[2014/09/29]% v1.4h
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\usepackage[maxfloats=19]{morefloats}[2015/07/16]% v1.0g
+\usepackage[maxfloats=25]{morefloats}[2015/07/22]% v1.0h
+%\maxdeadcycles=200\relax%
+%% \maxdeadcycles is the maximum number of calls of \output
+%% without a \shipout.
\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
\listfiles
\begin{document}
+\makeatletter
+
\section*{Example for morefloats}
\markboth{Example for morefloats}{Example for morefloats}
This example demonstrates the use of package\newline
-\textsf{morefloats}, v1.0g as of 2015/07/16 (HMM).\newline
-The package takes options (here: \verb|maxfloats=19| is used).\newline
+\textsf{morefloats}, v1.0h as of 2015/07/22 (HMM).\newline
+The package takes options (here:
+\verb|maxfloats=|\texttt{\morefloats@maxfloats} is used).\newline
For more details please see the documentation!\newline
To reproduce the\newline
-\texttt{\LaTeX{} Error: Too many unprocessed floats},\newline
+\LaTeX{} \texttt{ Error: Too many unprocessed floats},\newline
comment out the \verb|\usepackage...| in the preamble
(line~3)\newline
(by placing a \% before it).\newline
@@ -485,164 +500,28 @@ I do NOT think, that it is necessary to print THIS file, really!
\bigskip
-There follow a lot of floating tables.
+There follow \morefloats@maxfloats{} floating tables.
\pagebreak
-Here are a lot of floating tables.\newline
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The first Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The second Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The third Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The fourth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The fifth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The sixth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The seventh Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The eighth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The ninth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The tenth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The eleventh Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The twelfth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The thirteenth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The fourteenth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The fifteenth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The sixteenth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The seventeenth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-A table, which will keep floating.\\ \hline
-\end{tabular}%
-\caption{The eighteenth Table}%
-\end{table}%
-
-\begin{table}[t] \centering%
-\begin{tabular}{|l|}
-\hline
-One floating table too many
-(without \textsf{morefloats} and appropriate option(s)).\\ \hline
-\end{tabular}%
-\caption{The nineteenth Table}%
-\end{table}%
+\@tempcnta=18\relax% default floats
+\advance\@tempcnta by \morefloats@morefloats%
+% \morefloats@morefloats is the number of additional
+% floating tables to create.
+\loop
+ \ifnum\@tempcnta>0\relax%
+ \begin{table}[t]\centering%
+ \begin{tabular}{|l|}%
+ \hline%
+ A table, which will keep floating.\\%
+ \hline
+ \end{tabular}%
+ \caption{A floating Table.}%
+ \end{table}%
+ \advance\@tempcnta by -1\relax%
+\repeat
+
+\makeatother
\end{document}
%</example>
@@ -664,8 +543,8 @@ One floating table too many
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[2011/06/27]
%% The current format at the time of the release of this version of the
-%% morefloats package was 2015/01/01.
-\ProvidesPackage{morefloats}[2015/07/16 v1.0g
+%% morefloats package was 2015/01/01, patch level 2.
+\ProvidesPackage{morefloats}[2015/07/22 v1.0h
Raise limit of unprocessed floats (HMM)]
% \end{macrocode}
@@ -707,25 +586,31 @@ One floating table too many
\gdef\morefloats@maxfloats{36}%
\gdef\morefloats@morefloats{18}%
\else%
- \@tempcnta=\morefloats@morefloats\relax%
- \ifnum\@tempcnta>1569\relax%
+ \ifnum\morefloats@morefloats>1569\relax%
\PackageWarning{morefloats}{%
\morefloats@morefloats\space more floats requested.\MessageBreak%
LaTeX might run out of memory before this\MessageBreak%
(in which case it will notify you)\MessageBreak%
}%
+ \else%
+ \PackageInfo{morefloats}{%
+ \morefloats@morefloats\space more floats requested.\MessageBreak%
+ LaTeX might run out of memory before this\MessageBreak%
+ (in which case it will notify you)\MessageBreak%
+ }%
\fi%
- \advance \@tempcnta by +18%
+ \@tempcnta=\morefloats@morefloats\relax%
+ \advance\@tempcnta by +18%
\xdef\morefloats@maxfloats{\the\@tempcnta}%
\fi%
\else%
-% \end{macrocode}
-% \pagebreak
-% \begin{macrocode}
\ifx\morefloats@morefloats\@empty%
\@tempcnta=\morefloats@maxfloats\relax%
- \advance \@tempcnta by -18%
+ \advance\@tempcnta by -18%
\xdef\morefloats@morefloats{\the\@tempcnta}%
+ \ifnum\morefloats@morefloats<\z@\relax% i.e. \morefloats@maxfloats < 18
+ \gdef\morefloats@morefloats{0}%
+ \fi%
\ifnum\morefloats@maxfloats>1587\relax%
\PackageWarning{morefloats}{%
\morefloats@maxfloats\space floats requested.\MessageBreak%
@@ -737,7 +622,7 @@ One floating table too many
\fi%
\@tempcnta=\morefloats@maxfloats\relax%
-\edef\morefloats@max{\the\@tempcnta}%
+\xdef\morefloats@max{\the\@tempcnta}%
\ifnum\@tempcnta<18\relax%
\PackageError{morefloats}{Option maxfloats is \the\@tempcnta<18}{%
@@ -749,9 +634,9 @@ One floating table too many
\fi%
\@tempcnta=\morefloats@morefloats\relax%
-\edef\morefloats@more{\the\@tempcnta}%
+\xdef\morefloats@more{\the\@tempcnta}%
-\ifnum\@tempcnta<0\relax%
+\ifnum\@tempcnta<\z@\relax%
\PackageError{morefloats}{Option morefloats is \the\@tempcnta<0}{%
morefloats must be a number equal to or larger than 0\MessageBreak%
(or not used at all).\MessageBreak%
@@ -773,8 +658,8 @@ One floating table too many
% Therefore |\@tempcnta| should now be equal to zero.
%
% \begin{macrocode}
-\edef\morefloats@mx{\the\@tempcnta}%
-\ifnum\morefloats@mx=0\relax% OK
+\xdef\morefloats@mx{\the\@tempcnta}%
+\ifnum\morefloats@mx=\z@\relax%
\@tempcnta=\morefloats@maxfloats\relax%
\else%
\PackageError{morefloats}{%
@@ -789,7 +674,7 @@ One floating table too many
% We choose the larger value to be used.
%
% \begin{macrocode}
- \ifnum \@tempcnta<0% \morefloats@max > \morefloats@more
+ \ifnum\@tempcnta<\z@% \morefloats@max > \morefloats@more
\@tempcnta=\morefloats@maxfloats\relax%
\else% \@tempcnta>0, \morefloats@max < \morefloats@more
\@tempcnta=18\relax%
@@ -803,7 +688,7 @@ One floating table too many
%
% \begin{macrocode}
\xdef\morefloats@maxfloats{\the\@tempcnta}%
-\advance\@tempcnta by -18
+\advance\@tempcnta by -18\relax%
\xdef\morefloats@morefloats{\the\@tempcnta}%
\gdef\morefloats@test{1}%
\ifx\morefloats@morefloats\morefloats@test\relax%
@@ -830,67 +715,88 @@ One floating table too many
% |\extrafloats| which does a similar job [as earlier versions of this package did],
% although as it doesn't use |\newinsert| (and as the 2015 format uses extended
% registers by default) you can allocate a lot more floats,\textquotedblright{} %
-% \hbox{e.\,g. |\extrafloats{1234}|.} Loading \xpackage{etex} and \xpackage{morefloats}
-% with the new format would \textquotedblleft over{-}write the new allocation mechanism
-% and end up with fewer floats available.\textquotedblright{} Therefore here
-% it is tested \textquotedblleft for the new format and switch[ed] to the new mechanism
+% \hbox{e.\,g. |\extrafloats{1234}|.} Loading the \xpackage{etex} package and
+% \xpackage{morefloats} with the new format would
+% \textquotedblleft over{-}write the new allocation mechanism and end up with
+% fewer floats available.\textquotedblright{} Therefore here it is tested
+% \textquotedblleft for the new format and switch[ed] to the new mechanism
% in that case, so that existing documents work as before but using the new allocation
-% scheme underneath.\textquotedblright{} (all \textsc{David Carlisle}, 29.06.2015,
-% who provided also parts of the following code)
+% scheme underneath.\textquotedblright{} (all \textsc{David Carlisle}, 29. June 2015,
+% who provided also main parts of the following code)
%
% \begin{macrocode}
%% Test for new mechanism in LaTeX 2015:
-\gdef\morefloats@efa{0}%
\ifx\e@alloc\@undefined\relax%
%% This is an old LaTeX format, \extrafloats is not available.
\PackageWarning{morefloats}{%
- \fmtname\space <\fmtversion> found.\MessageBreak%
- LaTeX 2015/01/01 is now available\MessageBreak%
+ \fmtname\space <\fmtversion> %
+ \ifx\patch@level\@undefined\relax%
+ \else patch level \patch@level%
+ \fi%
+ \MessageBreak%
+ found. At least\MessageBreak%
+ LaTeX2e <2015/01/01> patch level 2\MessageBreak%
+ is now available\MessageBreak%
and can handle even more floats%
\@gobble%
}%
- %\gdef\morefloats@efa{0}, but it already has this value
\else%
- %% This is new in LaTeX 2015, \extrafloats is available,
- %% but older versions of the etex package are incompatible.
+ %% This is new in LaTeX 2015, \extrafloats is available.
\@ifpackageloaded{etex}%
- {% etex package loaded
- \PackageError{morefloats}{etex package loaded}{%
- The etex package was loaded\MessageBreak%
- but breaks the \string\extrafloats\space command.\MessageBreak%
- Therefore now not more than 256 floats will be available.\MessageBreak%
- }%
- %\gdef\morefloats@efa{0}, but it already has this value
+ {%% etex package loaded:
+ %% "it overwrites all the new allocation system
+ %% so really \extrafloats shouldn't be expected to work"
+ %% (D. Carlisle, 2015/07/16, who also provided the following
+ %% \extrafloats redefinition).
+ \gdef\extrafloats#1{%
+ \ifnum#1>\z@\relax%
+ \count@\numexpr\float@count-1\relax%
+ \ch@ck0\count@\count\relax%
+ \ch@ck1\count@\dimen\relax%
+ \ch@ck2\count@\skip\relax%
+ \ch@ck4\count@\box\relax%
+ \e@alloc@chardef\float@count\count@%
+ \expandafter\e@alloc@chardef\csname bx@\the\float@count\endcsname\float@count%
+ \@cons\@freelist{\csname bx@\the\float@count\endcsname}%
+ \expandafter%
+ \extrafloats\expandafter{\numexpr#1-1\relax}%
+ \fi%
+ }%
}{% etex package not loaded
- \gdef\morefloats@efa{1}%
}%
-\fi%
-\gdef\morefloats@test{1}%
-\ifx\morefloats@efa\morefloats@test\relax%
\extrafloats{\morefloats@morefloats}%
% The part after the test is no longer needed and therefore not loaded:
\expandafter\endinput%
\fi%
%% End of the test for LaTeX 2015 (or newer).
+%% Not new format, otherwise the last \endinput would have been applied.
-
+%% Test for e-TeX:
\RequirePackage{ifetex}[2011/12/15]% v1.2
\ifetex%
- %% then we can use the code of David Carlisle:
+ %% then we can use code similar to the one from David Carlisle,
%% https://tex.stackexchange.com/a/212483/6865
\mathchardef\float@count=32767\relax%
- \def\dc@extrafloats#1{%
- \ifnum#1>\z@%
+ \gdef\extrafloats#1{%
+ \ifnum#1>\z@\relax%
\count@\numexpr\float@count-1\relax%
+ \ch@ck0\count@\count\relax%
+ \ch@ck1\count@\dimen\relax%
+ \ch@ck2\count@\skip\relax%
+ \ch@ck4\count@\box\relax%
\mathchardef\float@count\count@\relax%
\expandafter\mathchardef\csname bx@\the\float@count\endcsname\float@count%
\@cons\@freelist{\csname bx@\the\float@count\endcsname}%
\expandafter%
- \dc@extrafloats\expandafter{\numexpr#1-1\relax}%
+ \extrafloats\expandafter{\numexpr#1-1\relax}%
\fi}%
- \dc@extrafloats{\morefloats@morefloats}%
+ \extrafloats{\morefloats@morefloats}%
\expandafter\endinput%
\fi%
+%% End of the test for e-TeX.
+%% Old format and not e-TeX,
+%% otherwise the last \endinput would have been applied.
+
% \end{macrocode}
%
@@ -899,7 +805,6 @@ One floating table too many
% which severely limits the maximum number of additionally available floats.
%
% \begin{macrocode}
-%% Not eTeX, otherwise the last \endinput would have been applied.
\PackageWarning{morefloats}{%
e-TeX is not available here\MessageBreak%
but it is available in almost all\MessageBreak%
@@ -925,19 +830,19 @@ One floating table too many
\ifnum \count12>\@tempcnta \@tempcnta=\the\count12 \relax \def\maxfloats@vln{skip} \fi%
\ifnum \count14>\@tempcnta \@tempcnta=\the\count14 \relax \def\maxfloats@vln{box} \fi%
%% end similar
-
\@tempcntb=234\relax%
\advance\@tempcntb by -\@tempcnta\relax%
\@tempcnta=\@tempcntb\relax%
-\advance\@tempcntb by +18% already reserved by default
\ifnum\morefloats@mx>\@tempcntb\relax%
\PackageError{morefloats}{Too many floats requested}{%
Maximum number of possible floats asked for: \morefloats@mx .\MessageBreak%
There are only \the\@tempcnta\space \maxfloats@vln\space left,\MessageBreak%
therefore only \the\@tempcntb\space floats will be possible.\MessageBreak%
- Reduce the number of used \maxfloats@vln\space to have more floats available!\MessageBreak%
+ Load the morefloats package earlier and/or\MessageBreak%
+ reduce the number of used \maxfloats@vln\space registers\MessageBreak%
+ to have more floats available!\MessageBreak%
}%
- \gdef\morefloats@mx{\the\@tempcntb}%
+ \xdef\morefloats@mx{\the\@tempcntb}%
\fi%
% \end{macrocode}
@@ -1224,35 +1129,21 @@ One floating table too many
\ifnum \morefloats@mx>255 \newinsert\bx@IV \expandafter\gdef\expandafter\@freelist\expandafter{\@freelist \@elt\bx@IV}
% \end{macrocode}
%
-% \end{landscape}
% \newpage
%
% \begin{macrocode}
\ifnum \morefloats@mx>256\relax%
- \ifx\e@alloc\@undefined\relax% old LaTeX format
- \PackageError{morefloats}{Too many floats called for}{%
- You requested more than 256 floats.\MessageBreak%
- (\morefloats@mx\space to be precise.)\MessageBreak%
- LaTeX before 2015 could not process\MessageBreak%
- more than 256 floats, therefore the morefloats\MessageBreak%
- package only provides 256 floats.\MessageBreak%
- If you need more floats,\MessageBreak%
- update to a current (>=2015) LaTeX distribution.\MessageBreak%
- I expected LaTeX (prior 2015) to run out of dimensions\MessageBreak%
- or memory long before reaching this anyway.\MessageBreak%
- }%
- \else% new LaTeX format, therefore we are here
- % because an outdated version of the etex package was used
- \PackageError{morefloats}{Too many floats called for}{%
- You requested more than 256 floats.\MessageBreak%
- (\morefloats@mx\space to be precise.)\MessageBreak%
- LaTeX can process more than 256 floats since 2015,\MessageBreak%
- but not if an outdated version of the etex package\MessageBreak%
- was loaded before the morefloats package.\MessageBreak%
- Therefore the morefloats package only provides\MessageBreak%
- 256 floats now. If you need more floats,\MessageBreak%
- update your etex package to the recent version!\MessageBreak%
- }%
+ \PackageError{morefloats}{Too many floats called for}{%
+ You requested more than 256 floats.\MessageBreak%
+ (\morefloats@mx\space to be precise.)\MessageBreak%
+ LaTeX before 2015 could not process\MessageBreak%
+ more than 256 floats, therefore the morefloats\MessageBreak%
+ package only provides 256 floats.\MessageBreak%
+ If you need more floats,\MessageBreak%
+ update to a current (>=2015) LaTeX distribution.\MessageBreak%
+ I expected LaTeX (prior 2015) to run out of dimensions\MessageBreak%
+ or memory long before reaching 256 floats anyway.\MessageBreak%
+ }%
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi
@@ -1266,7 +1157,7 @@ One floating table too many
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi
-\fi \fi \fi \fi \fi \fi
+\fi \fi \fi \fi \fi
% \end{macrocode}
%
@@ -1274,6 +1165,7 @@ One floating table too many
%</package>
% \end{macrocode}
%
+% \end{landscape}
% \newpage
%
% \section{Installation}
@@ -1355,7 +1247,7 @@ One floating table too many
% \hspace*{1em}The README file.
% \end{description}
%
-% There is also a |morefloats.tds.zip| available:
+% \noindent There is also a |morefloats.tds.zip| available:
% \begin{description}
% \item[\url{http://mirror.ctan.org/install/macros/latex/contrib/morefloats.tds.zip}]\hspace*{0.1cm}
% Everything in TDS compliant, compiled format.
@@ -1515,7 +1407,7 @@ One floating table too many
% invented the main code for handling more floats
% before |\extrafloats| was available.
% \textsc{David Carlisle} pointed the maintainer to the new |\extrafloats|
-% and provided the code for |\dc@extrafloats| in case |\extrafloats| is not
+% and provided the code for |\extrafloats| in case |\extrafloats| is not yet
% available at the used system (Thanks!).
% The current maintainer is \textsc{H.-Martin M\"{u}nch}.\\
% I would like to thank additionally \textsc{Karl Berry} for helping with taking
@@ -1524,7 +1416,8 @@ One floating table too many
% which I also got everything I know about creating a file in \xfile{dtx}
% format, ok, say it: copying), everybody of the CTAN team for managing
% CTAN, and the \Newsgroup{comp.text.tex} and \Newsgroup{de.comp.text.tex}
-% newsgroups for their help in all things \TeX{}.
+% newsgroups and everybody at \url{http://tex.stackexchange.com/}
+% for their help in all things \hbox{\TeX{}.}
%
% \newpage
%
@@ -1583,10 +1476,19 @@ One floating table too many
% \item Quite some additional changes in the \xfile{dtx} and README files.
% \end{Version}
% \begin{Version}{2015/07/16 v1.0g}
-% \item Implemented the new |\extrafloats|, \LaTeX{} 2015, allowing
+% \item Implemented the new |\extrafloats| from \LaTeX{} 2015 allowing
% several hundreds of additional floats.
% \item Update of documentation, README, and \xfile{dtx} internals.
% \end{Version}
+% \begin{Version}{2015/07/22 v1.0h}
+% \item Handling of more floats depending on new{/}old \LaTeX{} format,
+% availability of \eTeX{} in the used distribution,
+% and loading of the \xpackage{etex} package
+% (before \xpackage{morefloats}{/}after \xpackage{morefloats}{/}not
+% at all) should now ensure that the maximum number
+% for available floats can be allocated.
+% \item The example file now uses a flexible number of floats.
+% \end{Version}
% \end{History}
%
% \bigskip
diff --git a/Master/texmf-dist/source/latex/morefloats/morefloats.ins b/Master/texmf-dist/source/latex/morefloats/morefloats.ins
index d69e281451a..d16b83b2152 100644
--- a/Master/texmf-dist/source/latex/morefloats/morefloats.ins
+++ b/Master/texmf-dist/source/latex/morefloats/morefloats.ins
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: morefloats
-%% Version: 2015/07/16 v1.0g
+%% Version: 2015/07/22 v1.0h
%%
%% Copyright (C) 2010 - 2015 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -57,7 +57,7 @@
\input docstrip.tex
\Msg{*******************************************************************************}
\Msg{* Installation *}
-\Msg{* Package: morefloats 2015/07/16 v1.0g Raise limit of unprocessed floats (HMM)*}
+\Msg{* Package: morefloats 2015/07/22 v1.0h Raise limit of unprocessed floats (HMM)*}
\Msg{*******************************************************************************}
\keepsilent
@@ -69,7 +69,7 @@
This is a generated file.
Project: morefloats
-Version: 2015/07/16 v1.0g
+Version: 2015/07/22 v1.0h
Copyright (C) 2010 - 2015 by
H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
diff --git a/Master/texmf-dist/tex/latex/morefloats/morefloats.sty b/Master/texmf-dist/tex/latex/morefloats/morefloats.sty
index 5199a1e9b2a..c79436a977b 100644
--- a/Master/texmf-dist/tex/latex/morefloats/morefloats.sty
+++ b/Master/texmf-dist/tex/latex/morefloats/morefloats.sty
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: morefloats
-%% Version: 2015/07/16 v1.0g
+%% Version: 2015/07/22 v1.0h
%%
%% Copyright (C) 2010 - 2015 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -56,8 +56,8 @@
%%
\NeedsTeXFormat{LaTeX2e}[2011/06/27]
%% The current format at the time of the release of this version of the
-%% morefloats package was 2015/01/01.
-\ProvidesPackage{morefloats}[2015/07/16 v1.0g
+%% morefloats package was 2015/01/01, patch level 2.
+\ProvidesPackage{morefloats}[2015/07/22 v1.0h
Raise limit of unprocessed floats (HMM)]
\RequirePackage{kvoptions}[2011/06/30]% v3.11
@@ -78,22 +78,31 @@
\gdef\morefloats@maxfloats{36}%
\gdef\morefloats@morefloats{18}%
\else%
- \@tempcnta=\morefloats@morefloats\relax%
- \ifnum\@tempcnta>1569\relax%
+ \ifnum\morefloats@morefloats>1569\relax%
\PackageWarning{morefloats}{%
\morefloats@morefloats\space more floats requested.\MessageBreak%
LaTeX might run out of memory before this\MessageBreak%
(in which case it will notify you)\MessageBreak%
}%
+ \else%
+ \PackageInfo{morefloats}{%
+ \morefloats@morefloats\space more floats requested.\MessageBreak%
+ LaTeX might run out of memory before this\MessageBreak%
+ (in which case it will notify you)\MessageBreak%
+ }%
\fi%
- \advance \@tempcnta by +18%
+ \@tempcnta=\morefloats@morefloats\relax%
+ \advance\@tempcnta by +18%
\xdef\morefloats@maxfloats{\the\@tempcnta}%
\fi%
\else%
\ifx\morefloats@morefloats\@empty%
\@tempcnta=\morefloats@maxfloats\relax%
- \advance \@tempcnta by -18%
+ \advance\@tempcnta by -18%
\xdef\morefloats@morefloats{\the\@tempcnta}%
+ \ifnum\morefloats@morefloats<\z@\relax% i.e. \morefloats@maxfloats < 18
+ \gdef\morefloats@morefloats{0}%
+ \fi%
\ifnum\morefloats@maxfloats>1587\relax%
\PackageWarning{morefloats}{%
\morefloats@maxfloats\space floats requested.\MessageBreak%
@@ -105,7 +114,7 @@
\fi%
\@tempcnta=\morefloats@maxfloats\relax%
-\edef\morefloats@max{\the\@tempcnta}%
+\xdef\morefloats@max{\the\@tempcnta}%
\ifnum\@tempcnta<18\relax%
\PackageError{morefloats}{Option maxfloats is \the\@tempcnta<18}{%
@@ -117,9 +126,9 @@
\fi%
\@tempcnta=\morefloats@morefloats\relax%
-\edef\morefloats@more{\the\@tempcnta}%
+\xdef\morefloats@more{\the\@tempcnta}%
-\ifnum\@tempcnta<0\relax%
+\ifnum\@tempcnta<\z@\relax%
\PackageError{morefloats}{Option morefloats is \the\@tempcnta<0}{%
morefloats must be a number equal to or larger than 0\MessageBreak%
(or not used at all).\MessageBreak%
@@ -131,8 +140,8 @@
\@tempcnta=18\relax%
\advance\@tempcnta by \morefloats@more%
\advance\@tempcnta by -\morefloats@max%
-\edef\morefloats@mx{\the\@tempcnta}%
-\ifnum\morefloats@mx=0\relax% OK
+\xdef\morefloats@mx{\the\@tempcnta}%
+\ifnum\morefloats@mx=\z@\relax%
\@tempcnta=\morefloats@maxfloats\relax%
\else%
\PackageError{morefloats}{%
@@ -142,7 +151,7 @@
but it is maxfloats=\morefloats@maxfloats\space and %
morefloats=\morefloats@morefloats .\MessageBreak%
}%
- \ifnum \@tempcnta<0% \morefloats@max > \morefloats@more
+ \ifnum\@tempcnta<\z@% \morefloats@max > \morefloats@more
\@tempcnta=\morefloats@maxfloats\relax%
\else% \@tempcnta>0, \morefloats@max < \morefloats@more
\@tempcnta=18\relax%
@@ -151,7 +160,7 @@
\fi%
\edef\morefloats@mx{\the\@tempcnta}%
\xdef\morefloats@maxfloats{\the\@tempcnta}%
-\advance\@tempcnta by -18
+\advance\@tempcnta by -18\relax%
\xdef\morefloats@morefloats{\the\@tempcnta}%
\gdef\morefloats@test{1}%
\ifx\morefloats@morefloats\morefloats@test\relax%
@@ -172,58 +181,77 @@
\fi%
%% Test for new mechanism in LaTeX 2015:
-\gdef\morefloats@efa{0}%
\ifx\e@alloc\@undefined\relax%
%% This is an old LaTeX format, \extrafloats is not available.
\PackageWarning{morefloats}{%
- \fmtname\space <\fmtversion> found.\MessageBreak%
- LaTeX 2015/01/01 is now available\MessageBreak%
+ \fmtname\space <\fmtversion> %
+ \ifx\patch@level\@undefined\relax%
+ \else patch level \patch@level%
+ \fi%
+ \MessageBreak%
+ found. At least\MessageBreak%
+ LaTeX2e <2015/01/01> patch level 2\MessageBreak%
+ is now available\MessageBreak%
and can handle even more floats%
\@gobble%
}%
- %\gdef\morefloats@efa{0}, but it already has this value
\else%
- %% This is new in LaTeX 2015, \extrafloats is available,
- %% but older versions of the etex package are incompatible.
+ %% This is new in LaTeX 2015, \extrafloats is available.
\@ifpackageloaded{etex}%
- {% etex package loaded
- \PackageError{morefloats}{etex package loaded}{%
- The etex package was loaded\MessageBreak%
- but breaks the \string\extrafloats\space command.\MessageBreak%
- Therefore now not more than 256 floats will be available.\MessageBreak%
- }%
- %\gdef\morefloats@efa{0}, but it already has this value
+ {%% etex package loaded:
+ %% "it overwrites all the new allocation system
+ %% so really \extrafloats shouldn't be expected to work"
+ %% (D. Carlisle, 2015/07/16, who also provided the following
+ %% \extrafloats redefinition).
+ \gdef\extrafloats#1{%
+ \ifnum#1>\z@\relax%
+ \count@\numexpr\float@count-1\relax%
+ \ch@ck0\count@\count\relax%
+ \ch@ck1\count@\dimen\relax%
+ \ch@ck2\count@\skip\relax%
+ \ch@ck4\count@\box\relax%
+ \e@alloc@chardef\float@count\count@%
+ \expandafter\e@alloc@chardef\csname bx@\the\float@count\endcsname\float@count%
+ \@cons\@freelist{\csname bx@\the\float@count\endcsname}%
+ \expandafter%
+ \extrafloats\expandafter{\numexpr#1-1\relax}%
+ \fi%
+ }%
}{% etex package not loaded
- \gdef\morefloats@efa{1}%
}%
-\fi%
-\gdef\morefloats@test{1}%
-\ifx\morefloats@efa\morefloats@test\relax%
\extrafloats{\morefloats@morefloats}%
% The part after the test is no longer needed and therefore not loaded:
\expandafter\endinput%
\fi%
%% End of the test for LaTeX 2015 (or newer).
+%% Not new format, otherwise the last \endinput would have been applied.
+%% Test for e-TeX:
\RequirePackage{ifetex}[2011/12/15]% v1.2
\ifetex%
- %% then we can use the code of David Carlisle:
+ %% then we can use code similar to the one from David Carlisle,
%% https://tex.stackexchange.com/a/212483/6865
\mathchardef\float@count=32767\relax%
- \def\dc@extrafloats#1{%
- \ifnum#1>\z@%
+ \gdef\extrafloats#1{%
+ \ifnum#1>\z@\relax%
\count@\numexpr\float@count-1\relax%
+ \ch@ck0\count@\count\relax%
+ \ch@ck1\count@\dimen\relax%
+ \ch@ck2\count@\skip\relax%
+ \ch@ck4\count@\box\relax%
\mathchardef\float@count\count@\relax%
\expandafter\mathchardef\csname bx@\the\float@count\endcsname\float@count%
\@cons\@freelist{\csname bx@\the\float@count\endcsname}%
\expandafter%
- \dc@extrafloats\expandafter{\numexpr#1-1\relax}%
+ \extrafloats\expandafter{\numexpr#1-1\relax}%
\fi}%
- \dc@extrafloats{\morefloats@morefloats}%
+ \extrafloats{\morefloats@morefloats}%
\expandafter\endinput%
\fi%
+%% End of the test for e-TeX.
+%% Old format and not e-TeX,
+%% otherwise the last \endinput would have been applied.
-%% Not eTeX, otherwise the last \endinput would have been applied.
\PackageWarning{morefloats}{%
e-TeX is not available here\MessageBreak%
but it is available in almost all\MessageBreak%
@@ -239,19 +267,19 @@
\ifnum \count12>\@tempcnta \@tempcnta=\the\count12 \relax \def\maxfloats@vln{skip} \fi%
\ifnum \count14>\@tempcnta \@tempcnta=\the\count14 \relax \def\maxfloats@vln{box} \fi%
%% end similar
-
\@tempcntb=234\relax%
\advance\@tempcntb by -\@tempcnta\relax%
\@tempcnta=\@tempcntb\relax%
-\advance\@tempcntb by +18% already reserved by default
\ifnum\morefloats@mx>\@tempcntb\relax%
\PackageError{morefloats}{Too many floats requested}{%
Maximum number of possible floats asked for: \morefloats@mx .\MessageBreak%
There are only \the\@tempcnta\space \maxfloats@vln\space left,\MessageBreak%
therefore only \the\@tempcntb\space floats will be possible.\MessageBreak%
- Reduce the number of used \maxfloats@vln\space to have more floats available!\MessageBreak%
+ Load the morefloats package earlier and/or\MessageBreak%
+ reduce the number of used \maxfloats@vln\space registers\MessageBreak%
+ to have more floats available!\MessageBreak%
}%
- \gdef\morefloats@mx{\the\@tempcntb}%
+ \xdef\morefloats@mx{\the\@tempcntb}%
\fi%
\global\long\def\@freelist{\@elt\bx@A\@elt\bx@B\@elt\bx@C\@elt\bx@D\@elt\bx@E\@elt\bx@F\@elt\bx@G\@elt\bx@H\@elt%
@@ -496,30 +524,17 @@
\ifnum \morefloats@mx>254 \newinsert\bx@IU \expandafter\gdef\expandafter\@freelist\expandafter{\@freelist \@elt\bx@IU}
\ifnum \morefloats@mx>255 \newinsert\bx@IV \expandafter\gdef\expandafter\@freelist\expandafter{\@freelist \@elt\bx@IV}
\ifnum \morefloats@mx>256\relax%
- \ifx\e@alloc\@undefined\relax% old LaTeX format
- \PackageError{morefloats}{Too many floats called for}{%
- You requested more than 256 floats.\MessageBreak%
- (\morefloats@mx\space to be precise.)\MessageBreak%
- LaTeX before 2015 could not process\MessageBreak%
- more than 256 floats, therefore the morefloats\MessageBreak%
- package only provides 256 floats.\MessageBreak%
- If you need more floats,\MessageBreak%
- update to a current (>=2015) LaTeX distribution.\MessageBreak%
- I expected LaTeX (prior 2015) to run out of dimensions\MessageBreak%
- or memory long before reaching this anyway.\MessageBreak%
- }%
- \else% new LaTeX format, therefore we are here
- % because an outdated version of the etex package was used
- \PackageError{morefloats}{Too many floats called for}{%
- You requested more than 256 floats.\MessageBreak%
- (\morefloats@mx\space to be precise.)\MessageBreak%
- LaTeX can process more than 256 floats since 2015,\MessageBreak%
- but not if an outdated version of the etex package\MessageBreak%
- was loaded before the morefloats package.\MessageBreak%
- Therefore the morefloats package only provides\MessageBreak%
- 256 floats now. If you need more floats,\MessageBreak%
- update your etex package to the recent version!\MessageBreak%
- }%
+ \PackageError{morefloats}{Too many floats called for}{%
+ You requested more than 256 floats.\MessageBreak%
+ (\morefloats@mx\space to be precise.)\MessageBreak%
+ LaTeX before 2015 could not process\MessageBreak%
+ more than 256 floats, therefore the morefloats\MessageBreak%
+ package only provides 256 floats.\MessageBreak%
+ If you need more floats,\MessageBreak%
+ update to a current (>=2015) LaTeX distribution.\MessageBreak%
+ I expected LaTeX (prior 2015) to run out of dimensions\MessageBreak%
+ or memory long before reaching 256 floats anyway.\MessageBreak%
+ }%
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi
@@ -533,7 +548,7 @@
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi
-\fi \fi \fi \fi \fi \fi
+\fi \fi \fi \fi \fi
\endinput
%%