summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-footmisc.sty
blob: 99ed1906318ac7f8bf0442c88b207a4e3185b784 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
%
% lltjp-footmiscs.sty
%

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{lltjp-footmisc}[2021-03-17 Patch to footmisc for LuaTeX-ja]
\RequirePackage{footmisc}

\let  \if@tempswa  \ifFN@bottom
\ifFN@para    \@tempswatrue \fi
\if@tempswa
  \ifFN@bottom
    \toks@{\setbox\@outputbox \box\@cclv
      \xdef\@freelist{\@freelist\@midlist}%
      \global\let\@midlist\@empty
      \@combinefloats
      \ifvoid\footins
      \else
        \setbox\@outputbox \vbox\bgroup
          \boxmaxdepth\@maxdepth
          \unvbox\@outputbox
          \vfill\relax
    }
    \the\FN@temptoken
    \toks@\expandafter{\the\toks@\egroup\fi}
  \else
    \toks@{\ifvoid\footins
        \setbox\@outputbox\box\@cclv
      \else
        \setbox\@outputbox \vbox\bgroup
        \boxmaxdepth\@maxdepth
        \unvbox\@cclv
    }
    \the\FN@temptoken
    \toks@\expandafter{\the\toks@
      \egroup
      \fi
      \xdef\@freelist{\@freelist\@midlist}%
      \global\let\@midlist\@empty
      \@combinefloats
    }%
  \fi
  \toks@\expandafter{\the\toks@
    \ifvbox\@kludgeins
      \@makespecialcolbox
    \else
      \setbox\@outputbox \vbox to\@colht{%
        \@texttop \dimen@\dp\@outputbox
        \unvbox\@outputbox
        \unless\ifnum\ltjgetparameter{direction}=4
          \vbox{\primitive\everypar{}\hskip\z@}%
        \fi %%% LuaTeX-ja
        \vskip -\dimen@\@textbottom
      }%
    \fi
    \global\maxdepth\@maxdepth
  }
  \edef\@makecol{\the\toks@}
\fi
\endinput