From 166ecf8f4ada7e344bb8d198de16259aed65f7ee Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 5 May 2016 22:19:33 +0000
Subject: luatexja (5may2016)

git-svn-id: svn://tug.org/texlive/trunk@40904 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/luatex/luatexja/patches/lltjcore.sty       | 41 +++++++++++++++++++---
 1 file changed, 36 insertions(+), 5 deletions(-)

(limited to 'Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty')

diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
index f3587288721..2d577fc687a 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
@@ -1,10 +1,10 @@
 %
 % lltjcore.sty: derived from plcore.dtx in pLaTeX.
 % This file does not include the code relating to "tategaki".
-% 
+%
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjcore}[2016/04/01 Patch to LaTeX2e Kernel for LuaTeX-ja]
+\ProvidesPackage{lltjcore}[2016/05/05 Patch to LaTeX2e Kernel for LuaTeX-ja]
 
 \def\cleardoublepage{\clearpage\if@twoside
   \ifodd\c@page
@@ -165,10 +165,12 @@
   \stepcounter{page}%
   \let\firstmark\botmark
 }
-\renewcommand\@makefnmark{\hbox{%
+
+%%% Remove extra xkanjiskip
+\renewcommand\@makefnmark{%
   \unless\ifnum\ltjgetparameter{direction}=3
-    \@textsuperscript{\normalfont\@thefnmark}%
-  \else\hbox{\yoko \@textsuperscript{\normalfont\@thefnmark}}\fi}}
+    \hbox{}\hbox{\@textsuperscript{\normalfont\@thefnmark}}\hbox{}%
+  \else\hbox{\yoko \@textsuperscript{\normalfont\@thefnmark}}\fi}
 \def\@footnotemark{\leavevmode
   \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
   \unless\ifnum\ltjgetparameter{direction}=3 \@makefnmark
@@ -198,6 +200,35 @@
 \gdef\@stopfield{\null\color@endgroup\egroup}
 \newcount\hour
 \newcount\minute
+%%% etoolbox is loaded by everyhook
+\ifltj@everyhook@avail
+  \patchcmd{\@tabular}{\leavevmode}{\leavevmode\null}{}{}
+  \apptocmd{\endtabular}{\null}{}{}
+  \expandafter \let \csname endtabular*\endcsname = \endtabular
+\fi
+\let\@parboxto\@empty
+\long\def\@iiiparbox#1#2[#3]#4#5{%
+  \leavevmode
+  \@pboxswfalse
+  \setlength\@tempdima{#4}%
+  \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}%
+    \ifx\relax#2\else
+      \setlength\@tempdimb{#2}%
+      \edef\@parboxto{to\the\@tempdimb}%
+    \fi
+    \if#1b\vbox
+    \else\if #1t\vtop
+    \else\ifmmode\vcenter
+    \else\@pboxswtrue\null$\vcenter% !!!
+    \fi\fi\fi
+    \@parboxto{\let\hss\vss\let\unhbox\unvbox
+       \csname bm@#3\endcsname}%
+    \if@pboxsw \m@th$\null\fi% !!!
+  \@end@tempboxa}
+\def\underline#1{%
+  \relax
+  \ifmmode\@@underline{#1}%
+  \else \leavevmode\null$\@@underline{\hbox{#1}}\m@th$\null\relax\fi}
 
 %%% AtBeginDvi
 \def \AtBeginDvi #1{%
-- 
cgit v1.2.3

