summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-16 22:10:49 +0000
committerKarl Berry <karl@freefriends.org>2021-03-16 22:10:49 +0000
commitfc51a03351def03c4710eedb3cfc492c20a8b408 (patch)
tree011ebc14c49026e400c3b47ad11820a8dc2c7242 /Master/texmf-dist/source
parent3b2fc42641eb10e70aacf8e8f281086cc2c420eb (diff)
firstaid (16mar21)
git-svn-id: svn://tug.org/texlive/trunk@58440 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx40
1 files changed, 38 insertions, 2 deletions
diff --git a/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx b/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx
index 9dcedaf4359..1ce357d6d37 100644
--- a/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx
+++ b/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx
@@ -110,8 +110,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\LaTeXFirstAidDate{2020/12/14}
-\def\LaTeXFirstAidVersion{v1.0i}
+\def\LaTeXFirstAidDate{2021/03/15}
+\def\LaTeXFirstAidVersion{v1.0j}
% \end{macrocode}
%
% \begin{macrocode}
@@ -397,6 +397,42 @@
% \end{macrocode}
%
%
+% \subsection{The \pkg{bigfoot} first aid}
+%
+% The \pkg{bigfoot} packages makes the assumption that two
+% \cs{newinsert} allocations have a recognisable order in their
+% numbers, the second one has a lower number. This was correct in
+% the classic \TeX{} implementation but with the extended
+% allocation possibilities of all modern engines is no longer the
+% case and there is a point where the allocations take a ``jump''
+% breaking the odering assumption. These days we are fairly close
+% to that point and depending on how many packages are loaded
+% before \pkg{bigfoot} the package breaks.
+%
+% This firstaid therefore jumps over the problematical point by
+% pushing the count allocation to a safe value if necessary.
+% \begin{macrocode}
+\AddToHook{file/after/bigfoot.sty}{%
+ \ifnum\count10<\insc@unt
+ \global\count10=\insc@unt
+ \fi
+% \end{macrocode}
+% We also correct a bug that \pkg{bigfoot} tries to shift mark
+% registers, but in \LaTeX{} (at least since 2015) the allocation
+% number is not 266, so it does that to a random number of mark
+% registers (which sometimes blows up depending on the value in 266).
+% \begin{macrocode}
+ \def\FN@allmarks#1{\@elt{#1}%
+ \ifnum#1<\count256 %<--- problem: 266 isn't the counter for marks
+ \expandafter\FN@allmarks\expandafter{\number\numexpr#1+\@ne}%
+ \fi}%
+}
+% \end{macrocode}
+%
+%
+%
+%
+%
% \subsection[Temporary fixes for the kernel (until the next
% patch-level release)]
% {Temporary fixes for the kernel \\