6 %% Avoid multiple loading.
7 \csname luatexjalatexLoaded\endcsname
8 \edef\ltj@latex@AtEnd{%
9 \endlinechar=\the\endlinechar
12 \def\luatexjalatexLoaded{\endinput}
14 \NeedsTeXFormat{LaTeX2e}
15 \ProvidesPackage{ltj-latex}[2012/04/21 LuaLaTeX-ja]
17 % Globally add to the head of a macro (cf. LaTeX2e's \g@addto@macro)
18 \long\def\ltj@g@addto@macro#1#2{
21 \toks@\expandafter\expandafter\expandafter{\expandafter\ltj@tmpa#1}
25 \def\ltj@AtBeginDocument{\ltj@g@addto@macro\@begindocumenthook}
27 \def\ltj@pkgpatch#1{\ltj@AtBeginDocument{\@ifpackageloaded{#1}{\usepackage{lltjp-#1}}{}}}
29 % similar to \ltj@pkgpatch, but this is used .sty which
30 % can be reloaded inside the document by \input.
31 \def\ltj@pkgpatchA#1{\ltj@AtBeginDocument{\@ifpackageloaded{#1}{\input{lltjp-#1.sty}}{}}}
40 %%% default parameters
41 \ltjsetparameter{kanjiskip=0pt plus 0.4pt minus 0.4pt,
42 xkanjiskip=.25\zw plus 1pt minus 1pt,
43 autospacing, autoxspacing, jacharrange={-1},
44 yalbaselineshift=0pt, yjabaselineshift=0pt,
45 jcharwidowpenalty=500, differentjfm=average
48 \input luatexja-kinsoku.tex
49 \expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
51 %%% patch for packages
52 \ltj@pkgpatch{listings}
53 \ltj@pkgpatch{unicode-math}
54 \ltj@pkgpatch{xunicode}
57 %%------------------ all done