OSDN Git Service

jfm: new property "round_threshold" (only yoko direction now)
[luatex-ja/luatexja.git] / src / ltj-base.sty
index 75e2b7a..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
   }
 }
 
-%% \ltj@safe@glue{<glue>}
-%! グルー値.
-% For a glue. The result is a gluespec object.
-\def\ltj@safe@glue{
-  \ltj@safe@glue@or\ltj@safe@invalid
-}
-\def\ltj@safe@glue@or#1#2{
-  \expandafter\expandafter\expandafter\ltj@@safe@glueA
-   \ltj@gobble@glue#2\ltj@@safe@end{#2}{#1}
-}
-\def\ltj@@safe@glueA#1\ltj@@safe@end#2#3{
-  \ltj@if@blank{#1}{
-    (luatexja.base.to_skip("\the\glueexpr#2\relax"))
-  }{
-    #3
-  }
-}
-
 %% \ltj@safe@real{<real>}
 %! 実数. これは十進表記に限る.
 % For a real number given in decimal notation or a macro that
@@ -465,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