summaryrefslogtreecommitdiff
path: root/language/japanese/plautopatch/pxstfloats.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-06 03:04:00 +0000
committerNorbert Preining <norbert@preining.info>2019-09-06 03:04:00 +0000
commitbd3ecfd29a422ad4d7f8f1e119ddc518494e567a (patch)
tree0677c26f4ada7e0bc53956438e561cf3809ee47a /language/japanese/plautopatch/pxstfloats.sty
parentd56250bee15780c71fda0c1bad15a4c9ead36070 (diff)
CTAN sync 201909060304
Diffstat (limited to 'language/japanese/plautopatch/pxstfloats.sty')
-rw-r--r--language/japanese/plautopatch/pxstfloats.sty106
1 files changed, 106 insertions, 0 deletions
diff --git a/language/japanese/plautopatch/pxstfloats.sty b/language/japanese/plautopatch/pxstfloats.sty
new file mode 100644
index 0000000000..fe19974931
--- /dev/null
+++ b/language/japanese/plautopatch/pxstfloats.sty
@@ -0,0 +1,106 @@
+%
+% pxstfloats.sty
+% written by Hironobu Yamashita (@aminophen)
+%
+% This package is actually part of the pxsttools bundle, but
+% for now distributed as part of the plautopatch bundle.
+% https://github.com/aminophen/plautopatch
+%
+% This package `pxstfloats.sty' is based on:
+% * stfloats.sty in sttools (2016/06/28 v3.2)
+% Many thanks to lltjp-stfloats.sty in LuaTeX-ja project.
+%
+
+\NeedsTeXFormat{pLaTeX2e}
+\ProvidesPackage{pxstfloats}
+ [2017/02/19 v0.2 stfloats package for pLaTeX]
+\RequirePackage{stfloats}
+
+%% mostly based on \fn@makecol in stfloats.sty, and
+%% the additions for supporting pLaTeX are based on
+%% pLaTeX2e 2017/04/08 community ed.
+%% the code is essentially compatible with
+%% fnpos.sty (yafoot) 1999/07/14 v1.0
+%% |\makeFNmid| + |\makeFNbelow| status.
+\gdef\pxstfl@fnbelowfl@makecol{%
+ \setbox\@outputbox \box\@cclv
+ \let\@elt\relax
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global \let \@midlist \@empty
+ \@combinefloats
+ \ifvoid\footins
+ \else
+ \setbox\@outputbox \vbox {%
+ \boxmaxdepth \@maxdepth
+ \unvbox \@outputbox
+ \vskip \skip\footins
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+ \unvbox \footins
+ \color@endgroup
+ }%
+ \fi
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht {%
+ \@texttop
+ \dimen@ \dp\@outputbox
+ \unvbox \@outputbox
+ \iftdir\vbox{\hskip\z@}\fi %% for pLaTeX
+ \vskip -\dimen@
+ \@textbottom
+ }%
+ \fi
+ \global \maxdepth \@maxdepth
+}
+
+%% mostly based on \@makecol in latex.ltx, and
+%% the additions for supporting pLaTeX are based on
+%% pLaTeX2e 2017/04/08 community ed.
+%% the code is essentially compatible with
+%% fnpos.sty (yafoot) 1999/07/14 v1.0
+%% |\makeFNmid| + |\makeFNabove| status.
+\gdef\pxstfl@fnabovefl@makecol {%
+ \ifvoid\footins
+ \setbox\@outputbox \box\@cclv
+ \else
+ \setbox\@outputbox \vbox {%
+ \boxmaxdepth \@maxdepth
+ \unvbox \@cclv
+ \vskip \skip\footins
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+ \unvbox \footins
+ \color@endgroup
+ }%
+ \fi
+ \let\@elt\relax
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global \let \@midlist \@empty
+ \@combinefloats
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht {%
+ \@texttop
+ \dimen@ \dp\@outputbox
+ \unvbox \@outputbox
+ \iftdir\vbox{\hskip\z@}\fi %% for pLaTeX
+ \vskip -\dimen@
+ \@textbottom
+ }%
+ \fi
+ \global \maxdepth \@maxdepth
+}
+
+%% the definition \fnunderfloat is unnecessary, as stfloats.sty
+%% has already defined it. others should be re-declared here
+\def\fnbelowfloat{\global\let\@makecol\pxstfl@fnbelowfl@makecol}
+\def\fnabovefloat{\global\let\@makecol\pxstfl@fnabovefl@makecol}
+
+%% all done
+
+\endinput