OSDN Git Service

Updated lltjp-listings.sty and other fix
[luatex-ja/luatexja.git] / src / patches / lltjcore.sty
index c1b28d5..63ba233 100644 (file)
@@ -4,7 +4,7 @@
 % 
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjcore}[2013/05/14 Patch to LaTeX2e Kernel for LuaTeX-ja]
+\ProvidesPackage{lltjcore}[2015/01/01 Patch to LaTeX2e Kernel for LuaTeX-ja]
 
 \def\cleardoublepage{\clearpage\if@twoside
   \ifodd\c@page
 \newdimen\@@topmargin
 \def\@outputpage{%
 \begingroup % the \endgroup is put in by \aftergroup
-  \ifnum\ltjgetparameter{direction}=
+  \ifnum\ltjgetparameter{direction}=4\else
     \dimen\z@\textwidth \textwidth\textheight \textheight\dimen\z@
   \fi
   \let \protect \noexpand
 \newcount\hour
 \newcount\minute
 
+%%% AtBeginDvi
+\def \AtBeginDvi #1{%
+  \global \setbox \@begindvibox
+    \vbox{\yoko\unvbox \@begindvibox #1}%
+}
+
+%%% @makecol
+\gdef \@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
+       \ifnum\ltjgetparameter{direction}=4\else\hskip\z@\fi %%% LuaTeX-ja
+       \vskip -\dimen@
+       \@textbottom
+       }%
+   \fi
+   \global \maxdepth \@maxdepth
+}
+
 \endinput