OSDN Git Service

match option in luatexja-preset.sty.
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Wed, 3 Dec 2014 07:06:58 +0000 (16:06 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Wed, 3 Dec 2014 07:06:58 +0000 (16:06 +0900)
src/addons/luatexja-fontspec-24.sty
src/addons/luatexja-fontspec.sty
src/addons/luatexja-preset.sty

index 90cccd7..1aead90 100644 (file)
@@ -3,13 +3,12 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-fontspec-24}[2014/10/29 fontspec support of LuaTeX-ja]
+\ProvidesPackage{luatexja-fontspec-24}[2014/12/03 fontspec support of LuaTeX-ja]
 \RequirePackage{l3keys2e,luatexja}
 \ExplSyntaxOn
 
 %%%%%%%% Change Japanese font family by \rmfamily or not
-\bool_if:NTF  \ltj_fontspec_match
-{
+\cs_new:Npn \ltj_fontspec_match_cmd {
   \renewcommand\jttdefault{\gtdefault}
   \DeclareRobustCommand\rmfamily
   {\not@math@alphabet\rmfamily\mathrm
   {\not@math@alphabet\ttfamily\mathtt
      \romanfamily\ttdefault\kanjifamily\jttdefault\selectfont}
   \DeclareDocumentCommand \setmonojfont { O{} m } {
-    \ltj_fontspec_set_family:Nnn \jttdefault {#1}{#2}
+    \ltj_fontspec_set_family:Nnn \jttdefault {##1}{##2}
     \normalfont
   }
-}{
 }
-
+\bool_if:NT  \ltj_fontspec_match_bool \ltj_fontspec_match_cmd
 %%%%%%%% Messages
 
 \msg_new:nnn {luatexja-fontspec} {addjfontfeatures-ignored}
index 51346d5..6287324 100644 (file)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-fontspec}[2014/06/19 fontspec support of LuaTeX-ja]
+\ProvidesPackage{luatexja-fontspec}[2014/12/03 fontspec support of LuaTeX-ja]
 \RequirePackage{l3keys2e,luatexja}
 \ExplSyntaxOn
 
 \cs_set:Nn  \ltj_fontspec_pass_opts: {}
 \keys_define:nn { luatexja-fontspec }
   {
-    match .bool_set:N = \ltj_fontspec_match,
+    match .bool_set:N = \ltj_fontspec_match_bool,
     match .default:n  = true,
-    pass .code:n = \cs_set:Nn \ltj_fontspec_pass_opts: {#1},
+    pass .code:n = \cs_set:Nn \ltj_fontspec_pass_opts: {#1},% 互換性
   }
 \ProcessKeysOptions { luatexja-fontspec }
-\RequirePackage[\ltj_fontspec_pass_opts:]{fontspec}[2011/09/13]
-\cs_if_exist:NTF \fontspec_update_featstr:n {
-  \RequirePackage{luatexja-fontspec-23}
-} {
+\RequirePackage[\ltj_fontspec_pass_opts:]{fontspec}[2014/06/01]
+%\cs_if_exist:NTF \fontspec_update_featstr:n {
+%  \RequirePackage{luatexja-fontspec-23}
+%} {
   \RequirePackage{luatexja-fontspec-24}
-}
+%}
 
 \endinput
index 44b4476..ed93e25 100644 (file)
@@ -1,5 +1,5 @@
 % luatexja-preset.sty
-\ProvidesPackage{luatexja-preset}[2013/10/28 Japanese font presets]
+\ProvidesPackage{luatexja-preset}[2014/12/03 Japanese font presets]
 
 \RequirePackage{expl3}
 \RequirePackage{luatexja-fontspec}
 }
 
 \ExecuteOptions{ipaex}
+
+% match 
+\DeclareOption{match} {
+  \bool_if:NF  \ltj_fontspec_match_bool {
+    \ltj_fontspec_match_cmd
+    \bool_set_true:N \ltj_fontspec_match_bool
+  }
+}
 \ProcessOptions*
 
 %% KozMinPr6N の場合はjp04 feature がないので,nlck にする