%
% luatexja.sty
%

%! 外から読まれるので多少仰々しくなってます
%% Avoid multiple loading.
\csname\if11luatexjaLoaded\fi\endcsname
\edef\x{%
\catcode32=\the\catcode32%
\catcode45=\the\catcode45%
\catcode46=\the\catcode46%
\catcode64=\the\catcode64%
\catcode91=\the\catcode91%
\catcode93=\the\catcode93%
\endlinechar=\the\endlinechar
\relax}
\catcode32=10 %< >
\catcode45=12 %<->
\catcode46=12 %<.>
\catcode64=11 %<@>
\catcode91=12 %<[>
\catcode93=12 %<]>
\endlinechar=13 %
%! あまり恩恵がないので \endlinechar=-1 はなし
\edef\ltj@AtEnd{\x
  \noexpand\let\noexpand\ltj@AtEnd\relax}
\def\luatexjaLoaded{\endinput}

%% Check if LaTeX is used.
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax %<*!LaTeX>
  \expandafter\let\csname ifltj@in@latex\expandafter\endcsname
    \csname iffalse\endcsname
\else                           %<*LaTeX>
  \expandafter\let\csname ifltj@in@latex\expandafter\endcsname
    \csname iftrue\endcsname
  \NeedsTeXFormat{LaTeX2e}
  \ProvidesPackage{luatexja}[2013/05/14 Japanese Typesetting with LuaTeX]
\fi                             %</LaTeX>

\ifnum\catcode`漢=12
  \input ltj-unicode-ccfix.tex
\fi

%% Load all sub-packages.
\ifltj@in@latex                 %<*LaTeX>
  \RequirePackage{luatexja-core}  [2013/05/14]
  \RequirePackage{luatexja-compat}[2013/05/14]
\else                           %<*!LaTeX>
  \input luatexja-core.sty %
  \input luatexja-compat.sty %
\fi                             %</LaTeX>

%% all done
\ltj@AtEnd
\endinput
%% EOF
