OSDN Git Service

Add a Chinese help document(draft) of pTeX.
[luatex-ja/luatexja.git] / src / luatexja-latex.sty
index ee41e4b..39e2992 100644 (file)
   \fi
 }
 
+% similar to \ltj@pkgpatch, but this is used .sty which
+% can be reloaded inside the document by \input.
+\def\ltj@pkgpatchA#1{
+  \@ifpackageloaded{#1}{\input{lltjp-#1.sty}}{
+    \@ifpackageloaded{filehook}{\AtEndOfFile{#1.sty}{\input{lltjp-#1.sty}}}{}
+  }
+  \ifx\ltj@pkgpatchlist\@empty
+    \gdef\ltj@pkgpatchlist{#1}
+  \else
+    \xdef\ltj@pkgpatchlist{\ltj@pkgpatchlist, #1}
+  \fi
+}
+
 \endlinechar=13
 
 %%% patch for LaTeX
@@ -34,9 +47,9 @@
 \usepackage{lltjcore}
 
 %%% default parameters
-\ltjsetparameter{kanjiskip=0pt plus 0.4pt minus 0.4pt, 
+\ltjsetparameter{kanjiskip=0pt plus 0.4pt minus 0.4pt,
   xkanjiskip=.25\zw plus 1pt minus 1pt,
-  autospacing, autoxspacing, jacharrange={-1}, 
+  autospacing, autoxspacing, jacharrange={-1},
   yalbaselineshift=0pt, yjabaselineshift=0pt,
   jcharwidowpenalty=500, differentjfm=average
 }
@@ -47,6 +60,7 @@
 %%% patch for packages
 \IfFileExists{filehook.sty}{\usepackage{filehook}}{}
 \ltj@pkgpatch{listings}
+\ltj@pkgpatchA{lstmisc}
 \ltj@pkgpatch{unicode-math}
 \ltj@pkgpatch{xunicode}
 \@ifpackageloaded{filehook}{}{%