summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luatexja/src/patches/lltjp-stfloats.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/luatex/generic/luatexja/src/patches/lltjp-stfloats.sty
Initial commit
Diffstat (limited to 'macros/luatex/generic/luatexja/src/patches/lltjp-stfloats.sty')
-rw-r--r--macros/luatex/generic/luatexja/src/patches/lltjp-stfloats.sty27
1 files changed, 27 insertions, 0 deletions
diff --git a/macros/luatex/generic/luatexja/src/patches/lltjp-stfloats.sty b/macros/luatex/generic/luatexja/src/patches/lltjp-stfloats.sty
new file mode 100644
index 0000000000..e7535bd7e1
--- /dev/null
+++ b/macros/luatex/generic/luatexja/src/patches/lltjp-stfloats.sty
@@ -0,0 +1,27 @@
+%
+% lltjp-stfloats.sty 2017-05-05
+%
+
+\NeedsTeXFormat{LaTeX2e}
+
+\RequirePackage{stfloats}
+\RequirePackage{etoolbox}
+
+\newif\ifltj@stfloats@fnbelowfloat
+\let\ltj@fn@makecol=\fn@makecol
+\ifx\@makecol\ltj@fn@makecol\ltj@stfloats@fnbelowfloattrue\fi % \fnbelowfloat 発行済
+\let\ltj@fn@makecol=\relax
+\global\let\org@makecol\ltj@orig@makecol
+
+\patchcmd\fn@makecol{\vskip -\dimen@\@textbottom}%
+ {\ifnum\ltjgetparameter{direction}=4\else\vbox{\hskip\z@}\fi %%% LuaTeX-ja
+ \vskip -\dimen@
+ \ifltj@ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi}{}{}
+\patchcmd\fn@makecol{\vskip\skip\footins}{\iffnfixbottom\vskip\z@\@plus.0001fil\fi\vskip\skip\footins}{}{}
+\patchcmd\fn@makecol{\ifvoid\footins}{\ifvoid\footins\ltj@ftn@unvboxedfalse}{}{}
+\patchcmd\fn@makecol{\setbox\@outputbox \vbox}{\ltj@ftn@unvboxedtrue\setbox\@outputbox \vbox}{}{}
+
+\ifltj@stfloats@fnbelowfloat
+ \global\let\@makecol\fn@makecol
+\fi
+\endinput