OSDN Git Service

6ce9528d727b60622625265ba297516d8b374c76
[luatex-ja/luatexja.git] / src / patches / lltjp-stfloats.sty
1 %
2 % lltjp-stfloats.sty 2021-03-17
3 %
4
5 \NeedsTeXFormat{LaTeX2e}
6
7 \RequirePackage{stfloats}
8 \RequirePackage{etoolbox}
9
10 \newif\ifltj@stfloats@fnbelowfloat
11 \let\ltj@fn@makecol=\fn@makecol
12 \ifx\@makecol\ltj@fn@makecol\ltj@stfloats@fnbelowfloattrue\fi % \fnbelowfloat 発行済
13 \let\ltj@fn@makecol=\relax
14 \global\let\org@makecol\ltj@orig@makecol
15
16 \patchcmd\fn@makecol{\vskip -\dimen@\@textbottom}%
17   {\unless\ifnum\ltjgetparameter{direction}=4
18      \vbox{\primitive\everypar{}\hskip\z@}%
19    \fi %%% LuaTeX-ja
20    \vskip -\dimen@
21    \ifltj@ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi}{}{}
22 \patchcmd\fn@makecol{\vskip\skip\footins}{\iffnfixbottom\vskip\z@\@plus.0001fil\fi\vskip\skip\footins}{}{}
23 \patchcmd\fn@makecol{\ifvoid\footins}{\ifvoid\footins\ltj@ftn@unvboxedfalse}{}{}
24 \patchcmd\fn@makecol{\setbox\@outputbox \vbox}{\ltj@ftn@unvboxedtrue\setbox\@outputbox \vbox}{}{}
25
26 \ifltj@stfloats@fnbelowfloat
27   \global\let\@makecol\fn@makecol
28 \fi
29 \endinput