OSDN Git Service

Fix a crash by "\ruby{Weierstraß}{ワイエルシュトラス}"
[luatex-ja/luatexja.git] / src / ltj-base.sty
index 6dc66e3..717105e 100644 (file)
@@ -13,7 +13,7 @@
 
 \ifltj@in@latex                 %<*LaTeX>
   \NeedsTeXFormat{LaTeX2e}
-  \ProvidesPackage{ltj-base}[2014/07/18]
+  \ProvidesPackage{ltj-base}[2017/05/05]
 \fi                             %</LaTeX>
 
 %%------------------ Tiny helpers
 %% \ltj@gobble@num <number>
 %! 次に続く整数を(2 回展開で)読み捨てる. 
 \def\ltj@gobble@num{
-  \directlua{luatexja.token.scan_int()}
+  \directlua{token.scan_int()}
 }
 
 %% \ltj@gobble@glue <glue>
 %! 次に続くグルー値を(2 回展開で)読み捨てる. 
 \def\ltj@gobble@glue{
-  \directlua{luatexja.token.scan_glue()}
+  \directlua{token.scan_glue()}
 }
 
 %% \ltj@gobble@dimen <dimen>
 %! 次に続く寸法値を(2 回展開で)読み捨てる. 
 \def\ltj@gobble@dimen{
-  \directlua{luatexja.token.scan_dimen()}
+  \directlua{token.scan_dimen()}
 }
 
 %% \ltj@grab@num <number>
 %!   (command_name が "assign_int" であるトークン).
 %! (注意: まだ文字表記(`A)に対応していません.)
 \def\ltj@grab@num{
-  \directlua{tex.sprint('{' .. luatexja.token.scan_int() .. '}')}
+  \directlua{tex.sprint('{' .. token.scan_int() .. '}')}
 }
 
 %%------------------ Safe passing
@@ -447,16 +447,16 @@ luatexja.base._error_show(true)% and many spaces trail!
 \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}
+  \chardef\ltj@@next`.}
+\def\ltj@afb@x{\futurelet\ltj@@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
+  \ifcase\ifx\ltj@@next\hbox\tw@\fi
+         \ifx\ltj@@next\vbox\tw@\fi
+         \ifx\ltj@@next\vtop\tw@\fi
+         \ifx\ltj@@next\box\@ne\fi
+         \ifx\ltj@@next\copy\@ne\fi
+         \ifx\ltj@@next\vsplit\@ne\fi
+         \ifx\ltj@@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