X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Fluatexja-compat.sty;h=f55bf511142ed12fd2177a4cba52557725e634aa;hb=f078ac2f7998a102c7ec765e725f2269eed9f872;hp=6b2185e5598b023d7fc70ca4eeb65045a253c93e;hpb=745d0f80115b7401a87fc8fa0318d539016272b9;p=luatex-ja%2Fluatexja.git diff --git a/src/luatexja-compat.sty b/src/luatexja-compat.sty index 6b2185e..f55bf51 100644 --- a/src/luatexja-compat.sty +++ b/src/luatexja-compat.sty @@ -65,27 +65,13 @@ \expandafter\let\csname ifltj@in@latex\expandafter\endcsname \csname iftrue\endcsname \NeedsTeXFormat{LaTeX2e} - \ProvidesPackage{luatexja-compat}[2013/12/22 Compatibility with pTeX] + \ProvidesPackage{luatexja-compat}[2018/03/29 Compatibility with pTeX] \fi % -% ltj-compat-ptex.sty is not maintained for a long time. -% %% If the engine is pTeX, then load the module for it and exit. -% \edef\ltj@@tempa{\string\kansuji} -% \edef\ltj@@tempb{\meaning\kansuji} -% \ifx\ltj@@tempa\ltj@@tempb %<*pTeX> -% \let\ltj@@compat@pTeX=t -% \ifltj@in@latex %<*LaTeX> -% \RequirePackage{ltj-compat-ptex}[2012/04/21] -% \else %<*!LaTeX> -% \input ltj-compat-ptex.sty % -% \fi % -% \ltj@compat@AtEnd -% \expandafter\endinput\fi\relax % - % Load core module if not yet. \ifx\luatexjacoreLoaded\@undefined \ifltj@in@latex %<*LaTeX> - \RequirePackage{luatexja-core}[2013/05/14] + \RequirePackage{luatexja-core} \else %<*!LaTeX> \input luatexja-core.sty % \fi % @@ -114,26 +100,14 @@ \def\ucs{\ltj@code@conv{ucs}} \def\ltj@code@conv#1{% - \directlua{luatexja._cc_next = luatexja.compat.from_#1 }% - \ltj@code@convA -} -\def\ltj@code@convA{% - \expandafter\expandafter\expandafter - \ltj@code@convB\ltj@grab@num -} -\def\ltj@code@convB#1{% - \directlua{luatexja._cc_next(\ltj@safe@num@or{nil}{#1}) }% + \directlua{luatexja.compat.from_#1(token.scan_int())}% } \def\kansuji{% - \expandafter\expandafter\expandafter - \ltj@kansujiA\ltj@grab@num + \directlua{luatexja.compat.to_kansuji(token.scan_int())}% } -\def\ltj@kansujiA#1{% - \directlua{luatexja.compat.to_kansuji(\ltj@safe@num{#1}) }% -} -\define@key[ltj]{japaram}{kansujichar}{% - \expandafter\ltj@@set@stack#1:{KSJ}{0}{0x7FFFFFFF}} + +\define@key[ltj]{japaram}{kansujichar}{\ltj@@set@stack{KSJ}{0}{0x7FFFFFFF}#1 } \ltjsetparameter{kansujichar={0,`〇}} \ltjsetparameter{kansujichar={1,`一}} @@ -148,10 +122,17 @@ \ltj@@decl@array@param{kansujichar} \ifltj@in@latex +% \pltx@next@inhibitglue (pLaTeX 2018-03-09) +\protected\def\pltx@next@inhibitglue{% + \ifhmode\inhibitglue\else + \edef\@tempa{\everypar{% + \everypar{\unexpanded\expandafter{\the\everypar}}% + \unexpanded\expandafter{\the\everypar}\inhibitglue}}% +\@tempa\fi} \newcommand\printglossary{\@input@{\jobname.gls}} +\csname newcount\endcsname\hour +\csname newcount\endcsname\minute \fi -\newcount\hour -\newcount\minute %%------------------ all done \ltj@compat@AtEnd