OSDN Git Service

Imported ajmacros.sty
[luatex-ja/luatexja.git] / src / luatexja-otf.sty
index ac7a883..d2c469c 100644 (file)
 %! Main part of luatexja-otf
 \RequireLuaModule{luatexja.otf}
 
-\protected\def\CID#1{\ifvmode\leavevmode\fi\directlua{luatexja.otf.cid(#1)}\relax}
+\newcount\ltj@tempcnta
 
-%% \UTF being compatible with the OTF package for pLaTeX
+\protected\def\CID#1{\ifvmode\leavevmode\fi\ltj@tempcnta#1\relax\directlua{luatexja.otf.cid(\the\ltj@tempcnta)}\relax}
+
+%% \UTF compatible with the OTF package for pLaTeX
 \protected\def\UTF#1{\ifvmode\leavevmode\fi\directlua{luatexja.otf.append_jglyph(0x#1)}}
 
+%% Load ajmacros
+\ifltj@in@latex                 %<*LaTeX>
+  \RequirePackage{luatexja-ajmacros}[2011/09/19]
+\else                           %<*!LaTeX>
+  \input luatexja-ajmacros.sty %
+\fi                             %</LaTeX>
+
+
 %%------------------ all done
 \ltj@otf@AtEnd
 \endinput