• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

ソースコードの管理場所


Commit MetaInfo

Revisãodca36b60bd8d286443146fca072c791ab829ebae (tree)
Hora2016-01-01 21:28:30
AutorHironori Kitagawa <h_kitagawa2001@yaho...>
CommiterHironori Kitagawa

Mensagem de Log

luatexja-preset: more l3keys2e

Mudança Sumário

Diff

--- a/src/addons/luatexja-preset.sty
+++ b/src/addons/luatexja-preset.sty
@@ -18,29 +18,25 @@
1818 \cs_new:Nn \ltjpreset_declare_option:nn {
1919 \keys_define:nn { luatexja-preset }{
2020 #1 .code:n = #2,
21- #1. value_forbidden:n = true
21+ #1 .value_forbidden:n = true
22+ }
23+}
24+\cs_new:Nn \ltjpreset_declare_bool_option:nn {
25+ \bool_new:c { l_ltjpreset_#1_bool }
26+ \bool_set_false:c { l_ltjpreset_#1_bool }
27+ \keys_define:nn { luatexja-preset }{
28+ #1 .bool_set:c = { l_ltjpreset_#1_bool },
29+ #2 .bool_set_inverse:c = { l_ltjpreset_#1_bool },
30+ #1 .default:n = true,
31+ #2 .default:n = true,
2232 }
2333 }
2434
25-\bool_new:N \l_ltjpreset_nfssonly_bool % nfssonly
26-\bool_set_false:N \l_ltjpreset_nfssonly_bool
27-\ltjpreset_declare_option:nn{nfssonly} {\bool_set_true:N \l_ltjpreset_nfssonly_bool}
28-\ltjpreset_declare_option:nn{fontspec} {\bool_set_false:N \l_ltjpreset_nfssonly_bool}
29-
30-\bool_new:N \l_ltjpreset_bold_bool % bold
31-\bool_set_false:N \l_ltjpreset_bold_bool
32-\ltjpreset_declare_option:nn{bold} {\bool_set_true:N \l_ltjpreset_bold_bool}
33-\ltjpreset_declare_option:nn{nobold}{\bool_set_false:N \l_ltjpreset_bold_bool}
34-
35-\bool_new:N \l_ltjpreset_expert_bool % expert
36-\bool_set_false:N \l_ltjpreset_expert_bool
37-\ltjpreset_declare_option:nn{expert} {\bool_set_true:N \l_ltjpreset_expert_bool}
38-\ltjpreset_declare_option:nn{noexpert}{\bool_set_false:N \l_ltjpreset_expert_bool}
39-
40-\int_new:N \l_ltjpreset_deluxe_int % deluxe
41-\int_set:Nn \l_ltjpreset_deluxe_int { 0 }
42-\ltjpreset_declare_option:nn{deluxe}{\int_set:Nn \l_ltjpreset_deluxe_int { 2 }} % 6 fonts
43-\ltjpreset_declare_option:nn{nodeluxe}{\int_set:Nn \l_ltjpreset_deluxe_int { 0 }} % 2 fonts
35+%%%%%%%% bool options
36+\ltjpreset_declare_bool_option:nn { nfssonly }{ fontspec }
37+\ltjpreset_declare_bool_option:nn { bold }{ nobold }
38+\ltjpreset_declare_bool_option:nn { expert }{ noexpert }
39+\ltjpreset_declare_bool_option:nn { deluxe }{ nodeluxe }
4440
4541 % JFM
4642 \cs_set:Npn \ltjpreset_use_jfm: {ujis} % 使用する JFM
@@ -80,6 +76,12 @@
8076
8177 %%%%%%%% プリセット達
8278
79+% カスタム指定
80+ \keys_define:nn { luatexja-preset }{
81+ custom .code:n = \ltjpreset_set_multi:n { #1 },
82+ custom .value_required:n = true
83+}
84+
8385 % 小塚 (Adobe)
8486 %% Pro
8587 \ltjpreset_declare_option:nn{kozuka-pro}{
@@ -362,7 +364,7 @@
362364 \DeclareKanjiFamily{JY3}{ltjpm}{}\DeclareKanjiFamily{JT3}{ltjpm}{}
363365 \DeclareKanjiFamily{JY3}{ltjpg}{}\DeclareKanjiFamily{JT3}{ltjpg}{}
364366
365-\int_compare:nTF { \l_ltjpreset_deluxe_int == 2 } {
367+\bool_if:NTF \l_ltjpreset_deluxe_bool {
366368 \bool_if:NT \l_ltjpreset_bold_bool {
367369 \cs_set_eq:NN \ltjpreset_font_mc_bx: \ltjpreset_font_gt_bx:
368370 }
@@ -392,7 +394,7 @@
392394 \DeclareRobustCommand\rubyfamily { \kanjishape{rb}\selectfont }
393395 }
394396
395-\int_compare:nTF { \l_ltjpreset_deluxe_int == 2 } {
397+\bool_if:NTF \l_ltjpreset_deluxe_bool {
396398 \DeclareKanjiFamily{JY3}{ltjpmg}{}\DeclareKanjiFamily{JT3}{ltjpmg}{}
397399 \ltj_preset_define_family:nnn {ltjpmg} {m} {\ltjpreset_font_mg:}
398400 \ltj_preset_define_family:nnn {ltjpg} {eb} {\ltjpreset_font_gt_eb:}
@@ -434,7 +436,7 @@
434436 }
435437
436438 % (丸)ゴシック体の設定: bold option もここで
437-\int_compare:nTF { \l_ltjpreset_deluxe_int == 2 } {
439+\bool_if:NTF \l_ltjpreset_deluxe_bool {
438440 %% mg
439441 \newjfontfamily \mgfamily [
440442 BoldFont = \ltjpreset_font_mg:,