summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty31
1 files changed, 29 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty
index d30221e0c51..b8b7855476f 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty
@@ -23,8 +23,8 @@
\newcount\ltj@tempcntb
\newcount\ltj@tempcntc
\newdimen\ltj@tempdima
-\newskip\ltj@tempskipa
-\newtoks\ltj@temptoks
+% \newskip\ltj@tempskipa unused
+% \newtoks\ltj@temptoks unused
\countdef\ltj@@count@zero=0 %
\luatexattributedef\ltj@@attr@zero=0 %
@@ -512,6 +512,33 @@ luatexja.base._error_show(true)% and many spaces trail!
\def#1{\ltj@package@debug{#2}}
}
+%% \ltj@afterbox <token><box>
+%% -> \setbox\ltj@afbox<box><token>
+%% from Sonja Maus, ``Looking Ahead for a <box>'',
+%% TUGBoat, 11, No. 4, 1990.
+\newbox\ltj@afbox
+\protected\def\ltj@afterbox#1{%
+ \def\ltj@afb@xarg{#1}%
+ \afterassignment\ltj@afb@x
+ \chardef\next`.}
+\def\ltj@afb@x{\futurelet\next\ltj@afb@xtest}
+\def\ltj@afb@xtest{%
+ \ifcase\ifx\next\hbox\tw@\fi
+ \ifx\next\vbox\tw@\fi
+ \ifx\next\vtop\tw@\fi
+ \ifx\next\box\@ne\fi
+ \ifx\next\copy\@ne\fi
+ \ifx\next\vsplit\@ne\fi
+ \ifx\next\lastbox\@ne\fi
+ 0% ``A <box> was ...'' error will be causes by \setbox later anyway.
+ \or\afterassignment\ltj@afb@xarg
+ \or\afterassignment\ltj@afb@xagarg
+ \fi
+ \setbox\ltj@afbox
+}
+\def\ltj@afb@xagarg{\aftergroup\ltj@afb@xarg}
+
+
%%------------------ all done
\ltj@base@AtEnd
\endinput