• R/O
  • HTTP
  • SSH
  • HTTPS

luatexja: Commit

ソースコードの管理場所


Commit MetaInfo

Revisionb871dd0c1d6695dc2492eb9cb758e978faaeb78e (tree)
Time2018-08-24 16:48:06
AuthorHironori Kitagawa <h_kitagawa2001@yaho...>
CommiterHironori Kitagawa

Log Message

ltj-latex.sty: avoid multiple loading of lltjp-*

Change Summary

Incremental Difference

--- a/src/ltj-latex.sty
+++ b/src/ltj-latex.sty
@@ -12,19 +12,13 @@
1212 \def\luatexjalatexLoaded{\endinput}
1313
1414 \NeedsTeXFormat{LaTeX2e}
15-\ProvidesPackage{ltj-latex}[2018/08/23 LaTeX support of LuaTeX-ja]
15+\ProvidesPackage{ltj-latex}[2018/08/24 LaTeX support of LuaTeX-ja]
1616
1717 % cleanup at end of the document
1818 %\let\ltj@@orig@end=\@@end
1919 %\protected\def\@@end{%
2020 % \directlua{luatexja.ext_cleanup()}\ltj@@orig@end}
2121
22-\def\ltj@AtBeginDocument{\gpreto\@begindocumenthook}
23-
24-\def\ltj@pkgpatch#1{%
25- \@ifnextchar[{\ltj@pkgpatch@@{#1}}{\ltj@pkgpatch@@{#1}[lltjp-#1]}}%]
26-\def\ltj@pkgpatch@@#1[#2]{\ltj@AtBeginDocument{\@ifpackageloaded{#1}{\RequirePackage{#2}}{}}}
27-
2822 \endlinechar=13
2923
3024 %%% patch for LaTeX
@@ -32,10 +26,26 @@
3226 \usepackage{lltjdefs}
3327 \usepackage{lltjcore}
3428
29+%%% patching commands
3530 \RequirePackage{filehook}
31+
3632 \def\ltj@pkgpatch@im#1{%
3733 \@ifnextchar[{\ltj@pkgpatch@im@{#1}}{\ltj@pkgpatch@im@{#1}[lltjp-#1]}}%]
38-\def\ltj@pkgpatch@im@#1[#2]{\AtEndOfPackageFile*{#1}{\RequirePackage{#2}}}
34+\def\ltj@pkgpatch@im@#1[#2]{%
35+ \AtEndOfPackageFile*{#1}{%
36+ \@ifpackageloaded{#2}{}{\RequirePackage{#2}}%
37+ }%
38+}
39+
40+\def\ltj@pkgpatch#1{%
41+ \@ifnextchar[{\ltj@pkgpatch@@{#1}}{\ltj@pkgpatch@@{#1}[lltjp-#1]}}%]
42+\def\ltj@pkgpatch@@#1[#2]{%
43+ \gpreto\@begindocumenthook{%
44+ \@ifpackageloaded{#1}{%
45+ \@ifpackageloaded{#2}{}{\RequirePackage{#2}}%
46+ }{}%
47+ }%
48+}
3949
4050 %%% default parameters
4151 \directlua{
Show on old repository browser