OSDN Git Service

Problems in test10-otf.tex
[luatex-ja/luatexja.git] / src / luatexja-core.sty
index bfd28c2..f7bd7b5 100644 (file)
 \define@key[ltj]{japaram}{jascriptscriptfont}{%
   \expandafter\ltj@@set@stackfont#1:{mjss}}
 \def\ltj@@set@stackfont#1,#2:#3{%
-  \ltj@tempcntb=\globaldefs{\globaldefs0 \ltj@curjfnt=-1 #2%
-   \global\ltj@tempcnta=\ltj@curjfnt}\globaldefs\ltj@tempcntb%
+  {\directlua{tex.globaldefs=0}\ltj@curjfnt=-1 #2%
+   \global\ltj@tempcnta=\ltj@curjfnt}%
   \ifnum\ltj@tempcnta=-1
     \@PackageError{luatexja-core}%
     {\string#2 is not a control sequence that represents \MessageBreak
 }
 
 \protected\def\ltjsetparameter#1{%
-  \ifnum\globaldefs=0\directlua{ltj.isglobal=''}\else\directlua{ltj.isglobal='global'}\fi
+  \ifnum\globaldefs>0\directlua{ltj.isglobal='global'}\else\directlua{ltj.isglobal=''}\fi
   \setkeys[ltj]{japaram}{#1}\ignorespaces}
-\protected\def\ltjglobalsetparameter#1{\directlua{ltj.isglobal='global'}%
+\protected\def\ltjglobalsetparameter#1{%
+  \ifnum\globaldefs<0\directlua{ltj.isglobal=''}\else\directlua{ltj.isglobal='global'}\fi
   \setkeys[ltj]{japaram}{#1}\ignorespaces}
 
 %%%%%%%%