X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Fltj-base.sty;h=1c7e3b7df1d48763593404d6493dbd477038426f;hb=eb118f3e5ea0852407b5261817700401699528b9;hp=a69fcb63e80318c8103699d1b6c3ac4902951a54;hpb=1a139ec449b922a03f1e6608380bdea12aa532b0;p=luatex-ja%2Fluatexja.git diff --git a/src/ltj-base.sty b/src/ltj-base.sty index a69fcb6..1c7e3b7 100644 --- a/src/ltj-base.sty +++ b/src/ltj-base.sty @@ -13,18 +13,18 @@ \ifltj@in@latex %<*LaTeX> \NeedsTeXFormat{LaTeX2e} - \ProvidesPackage{ltj-base}[2012/04/21 v0.2] + \ProvidesPackage{ltj-base}[2014/07/18] \fi % %%------------------ Tiny helpers %% Registers -\newcount\ltj@tempcnta +%\newcount\ltj@tempcnta % defined at luatexja-core.sty \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 +%% -> \setbox\ltj@afbox +%% from Sonja Maus, ``Looking Ahead for a '', +%% 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 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