6 %% Avoid multiple loading.
7 \csname\if11luatexjacompatLoaded\fi\endcsname
9 \catcode32=\the\catcode32%
10 \catcode33=\the\catcode33%
11 \catcode35=\the\catcode35%
12 \catcode40=\the\catcode40%
13 \catcode41=\the\catcode41%
14 \catcode42=\the\catcode42%
15 \catcode43=\the\catcode43%
16 \catcode44=\the\catcode44%
17 \catcode45=\the\catcode45%
18 \catcode46=\the\catcode46%
19 \catcode58=\the\catcode58%
20 \catcode59=\the\catcode59%
21 \catcode60=\the\catcode60%
22 \catcode61=\the\catcode61%
23 \catcode62=\the\catcode62%
24 \catcode64=\the\catcode64%
25 \catcode91=\the\catcode91%
26 \catcode93=\the\catcode93%
27 \catcode94=\the\catcode94%
28 \catcode95=\the\catcode95%
29 \catcode126=\the\catcode126%
30 \endlinechar=\the\endlinechar
54 %! なお, 上のcatcode設定はcoreとcompatで同一にしておく.
55 \edef\ltj@compat@AtEnd{\x
56 \noexpand\let\noexpand\ltj@compat@AtEnd\relax}
57 \def\luatexjacompatLoaded{\endinput}
59 %% Check if LaTeX is used.
60 \begingroup\expandafter\expandafter\expandafter\endgroup
61 \expandafter\ifx\csname RequirePackage\endcsname\relax %<*!LaTeX>
62 \expandafter\let\csname ifltj@in@latex\expandafter\endcsname
63 \csname iffalse\endcsname
65 \expandafter\let\csname ifltj@in@latex\expandafter\endcsname
66 \csname iftrue\endcsname
67 \NeedsTeXFormat{LaTeX2e}
68 \ProvidesPackage{luatexja-compat}[2020-08-08 Compatibility with pTeX]
71 % Load core module if not yet.
72 \ifx\luatexjacoreLoaded\@undefined
73 \ifltj@in@latex %<*LaTeX>
74 \RequirePackage{luatexja-core}
76 \input luatexja-core.sty %
80 %% When environment check fails, exit now.
81 \ifx\LuaTeXjaAvailable\@undefined
83 \expandafter\endinput\fi\relax
86 %\RequireLuaModule{luatexja.infomute}
87 % not yet implemented.
89 %% Silence info messages of luatexbase-mcb
90 %\directlua{ luatexja.infomute.add_mute("luatexbase-mcb") }
91 % not yet implemented.
94 \RequireLuaTeXjaSubmodule{compat}
96 \def\euc{\ltj@code@conv{euc}}
97 \def\kuten{\ltj@code@conv{kuten}}
98 \def\jis{\ltj@code@conv{jis}}
99 \def\sjis{\ltj@code@conv{sjis}}
100 \def\ucs{\ltj@code@conv{ucs}}
102 \def\ltj@code@conv#1{\directlua{luatexja.compat.from_#1(token.scan_int())}}
103 \def\kansuji{\directlua{luatexja.compat.to_kansuji(token.scan_int())}}
105 \define@key[ltj]{japaram}{kansujichar}{\ltj@@set@stack{KSJ}{0}{0x7FFFFFFF}#1 }
106 \ltj@@decl@array@param{kansujichar}
109 % \pltx@next@inhibitglue (pLaTeX 2018-03-09)
110 \protected\def\pltx@next@inhibitglue{%
111 \ifhmode\inhibitglue\else
112 \edef\@tempa{\everypar{%
113 \everypar{\unexpanded\expandafter{\the\everypar}}%
114 \unexpanded\expandafter{\the\everypar}\inhibitglue}}%
116 \newcommand\printglossary{\@input@{\jobname.gls}}
117 \csname newcount\endcsname\hour
118 \csname newcount\endcsname\minute
121 %%------------------ all done