File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 18381838% \end{macrocode}
18391839% \end{variable}
18401840%
1841- % \begin{variable}{\g_@@_lang_tl,\g_@@_lang_clist}
1841+ % \begin{variable}{\g_@@_lang_tl,\g_@@_lang_clist,\c_@@_lang_clist }
18421842% 论文主要语言。
18431843% \begin{macrocode}
18441844\tl _new:N \g _@@_lang_tl
18451845% <thesis>\clist_set:Nn \g_@@_lang_clist { zh, en }
1846+ \clist _const:Nn \c _@@_lang_clist { zh, en, de, ja }
18461847% \end{macrocode}
18471848% \end{variable}
18481849%
19901991% \begin{macrocode}
19911992 lang .choice: ,
19921993 lang .value_required:n = true ,
1993- lang .choices:nn =
1994- { zh, en, de, ja }
1994+ lang .choices:Vn = \c _@@_lang_clist
19951995 {
19961996 \tl _gset_eq:NN \g _@@_lang_tl \l _keys_choice_tl
19971997% <*thesis>
21412141\ProcessKeyOptions [ sjtu / option ]
21422142% \end{macrocode}
21432143%
2144- % \begin{macro}[int,pTF]{\@@_if_main_lang_de:,\@@_if_main_lang_ja:}
2144+ % \begin{macro}[int,pTF]{\@@_if_main_lang_zh:,\@@_if_main_lang_en:,
2145+ % \@@_if_main_lang_de:,\@@_if_main_lang_ja:}
21452146% 快捷判断主要语言。
21462147% \begin{macrocode}
2147- \@@ _conditional_const:nn { main_lang_de }
2148- { \str _if_eq_p:Vn \g _@@_lang_tl { de } }
2149- \@@ _conditional_const:nn { main_lang_ja }
2150- { \str _if_eq_p:Vn \g _@@_lang_tl { ja } }
2148+ \clist _map_inline:Nn \c _@@_lang_clist
2149+ {
2150+ \@@ _conditional_const:nn { main_lang_ #1 }
2151+ { \str _if_eq_p:Vn \g _@@_lang_tl {#1} }
2152+ }
21512153% \end{macrocode}
21522154% \end{macro}
21532155%
You can’t perform that action at this time.
0 commit comments