OSDN Git Service

removed unnecessary file
[luatex-ja/luatexja.git] / src / luatexja-compat.sty
index 687d395..2d6d053 100644 (file)
   \expandafter\let\csname ifltj@in@latex\expandafter\endcsname
     \csname iftrue\endcsname
   \NeedsTeXFormat{LaTeX2e}
-  \ProvidesPackage{luatexja-compat}[2015/02/22 Compatibility with pTeX]
+  \ProvidesPackage{luatexja-compat}[2020-08-08 Compatibility with pTeX]
 \fi                             %</LaTeX>
 
 % 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                             %</LaTeX>
 \def\sjis{\ltj@code@conv{sjis}}
 \def\ucs{\ltj@code@conv{ucs}}
 
-\def\ltj@code@conv#1{%
-  \directlua{luatexja.compat.from_#1(luatexja.token.scan_int())}%
-}
+\def\ltj@code@conv#1{\directlua{luatexja.compat.from_#1(token.scan_int())}}
+\def\kansuji{\directlua{luatexja.compat.to_kansuji(token.scan_int())}}
 
-\def\kansuji{%
-  \directlua{luatexja.compat.to_kansuji(luatexja.token.scan_int())}%
-}
-
-\define@key[ltj]{japaram}{kansujichar}{%
-  \expandafter\ltj@@set@stack#1:{KSJ}{0}{0x7FFFFFFF}}
-
-\ltjsetparameter{kansujichar={0,`〇}}
-\ltjsetparameter{kansujichar={1,`一}}
-\ltjsetparameter{kansujichar={2,`二}}
-\ltjsetparameter{kansujichar={3,`三}}
-\ltjsetparameter{kansujichar={4,`四}}
-\ltjsetparameter{kansujichar={5,`五}}
-\ltjsetparameter{kansujichar={6,`六}}
-\ltjsetparameter{kansujichar={7,`七}}
-\ltjsetparameter{kansujichar={8,`八}}
-\ltjsetparameter{kansujichar={9,`九}}
+\define@key[ltj]{japaram}{kansujichar}{\ltj@@set@stack{KSJ}{0}{0x7FFFFFFF}#1 }
 \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