From bb42e3cdf8147da8d3e4b04af51f7d61a7c09a5c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 1 May 2020 21:28:26 +0000 Subject: xpinyin (1may20) git-svn-id: svn://tug.org/texlive/trunk@54959 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx | 116 ++++++++++----------- Master/texmf-dist/source/latex/xpinyin/xpinyin.ins | 8 +- 2 files changed, 62 insertions(+), 62 deletions(-) (limited to 'Master/texmf-dist/source/latex/xpinyin') diff --git a/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx b/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx index 8d50b231f21..b23d96db64a 100644 --- a/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx +++ b/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx @@ -26,7 +26,7 @@ Issues and pull requests are welcome. Copyright and Licence --------------------- - Copyright (C) 2012-2019 by Qing Lee + Copyright (C) 2012-2020 by Qing Lee ---------------------------------------------------------------------- This work may be distributed and/or modified under the @@ -39,7 +39,7 @@ Copyright and Licence and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later. - This work has the LPPL maintenance status `maintained'. + This work has the LPPL maintenance status "maintained". The Current Maintainer of this work is Qing Lee. @@ -81,7 +81,7 @@ Copyright and Licence \preamble - Copyright (C) 2012-2019 by Qing Lee + Copyright (C) 2012-2020 by Qing Lee -------------------------------------------------------------------------- This work may be distributed and/or modified under the @@ -94,7 +94,7 @@ Copyright and Licence and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later. - This work has the LPPL maintenance status `maintained'. + This work has the LPPL maintenance status "maintained". The Current Maintainer of this work is Qing Lee. @@ -167,12 +167,12 @@ Copyright and Licence % %\NeedsTeXFormat{LaTeX2e} %\RequirePackage{expl3} -%<+package>\GetIdInfo$Id: xpinyin.dtx 81bb941 2019-04-07 23:27:58 +0800 Qing Lee $ +%<+package>\GetIdInfo$Id: xpinyin.dtx 789567a 2020-05-01 21:10:07 +0800 Qing Lee $ % {Automatically add pinyin to Chinese characters} %\ProvidesExplPackage{\ExplFileName} -% {\ExplFileDate}{2.7}{\ExplFileDescription} +% {\ExplFileDate}{2.8}{\ExplFileDescription} %\ProvidesFile{xpinyin-database.def}% -% [2019/04/07 v2.7 xpinyin database] +% [2020/05/01 v2.8 xpinyin database] %<*driver> \documentclass{ctxdoc} \usepackage{xpinyin} @@ -186,7 +186,7 @@ Copyright and Licence % % \fi % -% \CheckSum{696} +% \CheckSum{694} % \GetFileId{xpinyin.sty} % % \title{\bfseries\pkg{xpinyin} 宏包} @@ -359,14 +359,14 @@ Copyright and Licence % \begin{syntax} % format = \Arg{format} % \end{syntax} -% 设置拼音的其它格式,例如颜色等,缺省值为空。 +% 设置拼音的其他格式,例如颜色等,缺省值为空。 % \end{function} % % \begin{function}{multiple} % \begin{syntax} % multiple = \Arg{format} % \end{syntax} -% 设置多音字拼音的其它格式,缺省值为空。可以通过这个选项来提醒校正多音字的拼音。例如 +% 设置多音字拼音的其他格式,缺省值为空。可以通过这个选项来提醒校正多音字的拼音。例如 % 本文档设置多音字拼音的颜色是红色(需要载入 \pkg{color} 宏包): % \begin{frameverb} % \xpinyinsetup{multiple={\color{red}}} @@ -467,7 +467,7 @@ Copyright and Licence % % \begin{macro}{\@@_UTF_char:nn} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_UTF_char:nn #1#2 +\cs_new_protected:Npn \@@_UTF_char:nn #1#2 { \cs_if_exist:cF { u8:#1 } { \tl_const:cn { u8:#1 } {#2} } @@ -478,14 +478,14 @@ Copyright and Licence % % \begin{macro}{\@@_GBK_char:nn} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_GBK_char:nn #1#2 +\cs_new_protected:Npn \@@_GBK_char:nn #1#2 { \@@_UTF_char:nn {#1} {#2} \exp_args:Nx \@@_GBK_char_aux:nn { \tl_head:n {#1} } {#1} } -\cs_new_protected_nopar:Npn \@@_GBK_char_aux:nn #1#2 +\cs_new_protected:Npn \@@_GBK_char_aux:nn #1#2 { \exp_args:Nf \@@_GBK_char_aux:nnn { \int_eval:n { `#1 } } {#1} {#2} } -\cs_new_protected_nopar:Npn \@@_GBK_char_aux:nnn #1#2#3 +\cs_new_protected:Npn \@@_GBK_char_aux:nnn #1#2#3 { \cs_if_exist:cF { @@_UTF_ #1 :w } { @@ -505,9 +505,9 @@ Copyright and Licence \char_set_catcode_active:n {#1} } } -\cs_new_protected_nopar:Npn \@@_GBK_char_def:nnn #1#2#3 +\cs_new_protected:Npn \@@_GBK_char_def:nnn #1#2#3 { - \cs_new_protected_nopar:cpn { @@_UTF_ #2 :w } #1 + \cs_new_protected:cpn { @@_UTF_ #2 :w } #1 { \use:c { u8: \tl_to_str:n { #3#1 } } } } \tl_new:N \c_@@_reset_UTF_catcode_tl @@ -518,7 +518,7 @@ Copyright and Licence % \begin{macrocode} \group_begin: \char_set_catcode_active:n { 126 } -\cs_new_protected_nopar:Npn \@@_save_UTF_cs:Nn #1#2 +\cs_new_protected:Npn \@@_save_UTF_cs:Nn #1#2 { \group_begin: \char_set_lccode:nn { 126 } {#2} @@ -592,7 +592,7 @@ Copyright and Licence % % \begin{macro}{\@@_make_pinyin_box:nnn} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_make_pinyin_box:nnn #1#2#3 +\cs_new_protected:Npn \@@_make_pinyin_box:nnn #1#2#3 { \@@_leavevmode: \hbox_overlap_right:n @@ -637,9 +637,9 @@ Copyright and Licence % % \begin{macro}{\@@_CJKsymbol:n} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_CJKsymbol:n #1 +\cs_new_protected:Npn \@@_CJKsymbol:n #1 { \@@_CJKsymbol:xn { \@@_to_unicode:n {#1} } {#1} } -\cs_new_protected_nopar:Npn \@@_CJKsymbol:nn #1#2 +\cs_new_protected:Npn \@@_CJKsymbol:nn #1#2 { \@@_make_pinyin_box:nnn {#1} {#2} { \use:c { c_@@_ #1 _tl } } \@@_save_CJKsymbol:n {#2} @@ -691,7 +691,7 @@ Copyright and Licence % % \begin{macro}{\@@_CJKglue:} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_CJKglue: +\cs_new_protected:Npn \@@_CJKglue: { \skip_horizontal:n { \l_@@_hsep_tl } } % \end{macrocode} % \end{macro} @@ -733,7 +733,7 @@ Copyright and Licence % % \begin{macro}{\@@_restore_footnote:} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_restore_footnote: +\cs_new_protected:Npn \@@_restore_footnote: { \bool_if:NF \l_@@_footnote_bool { \tl_put_left:Nn \@parboxrestore { \l_@@_restore_footnote_tl } } @@ -760,19 +760,19 @@ Copyright and Licence % % \begin{macro}{\@@_single_aux:nn} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_single_aux:nn #1#2 +\cs_new_protected:Npn \@@_single_aux:nn #1#2 { \@@_replace_CJKsymbol_single:n {#2} #1 \group_end: } -\cs_new_protected_nopar:Npn \@@_replace_CJKsymbol_single_aux:n #1 +\cs_new_protected:Npn \@@_replace_CJKsymbol_single_aux:n #1 { \bool_if:NF \l_@@_enable_bool { \@@_replace_CJKsymbol: } - \cs_set_protected_nopar:Npn \CJKsymbol ##1 + \cs_set_protected:Npn \CJKsymbol ##1 { \@@_single_CJKsymbol:nn {##1} {#1} } } -\cs_new_protected_nopar:Npn \@@_single_CJKsymbol:nn #1#2 +\cs_new_protected:Npn \@@_single_CJKsymbol:nn #1#2 { \@@_make_pinyin_box:xnn { \@@_to_unicode:n {#1} } {#1} { \@@_pinyin:n {#2} } @@ -783,7 +783,7 @@ Copyright and Licence % % \begin{macro}{\@@_replace_CJKsymbol_aux:} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_replace_CJKsymbol_aux: +\cs_new_protected:Npn \@@_replace_CJKsymbol_aux: { \cs_set_eq:NN \@@_save_CJKsymbol:n \CJKsymbol \cs_set_eq:NN \CJKsymbol \@@_CJKsymbol:n @@ -793,14 +793,14 @@ Copyright and Licence % % \begin{macro}{\@@_restore_CJKsymbol_aux:} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_restore_CJKsymbol_aux: +\cs_new_protected:Npn \@@_restore_CJKsymbol_aux: { \cs_set_eq:NN \CJKsymbol \@@_save_CJKsymbol:n } % \end{macrocode} % \end{macro} % % \begin{macro}{\@@_select_font_xetex:} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_select_font_xetex: +\cs_new_protected:Npn \@@_select_font_xetex: { \cs_if_exist_use:cF { \l_@@_coor_tl } { @@ -818,7 +818,7 @@ Copyright and Licence % % \begin{macro}{\@@_select_font_aux:} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_select_font_aux: +\cs_new_protected:Npn \@@_select_font_aux: { \fontsize { \l_@@_ratio_tl \tex_dimexpr:D \f@size pt \scan_stop: } @@ -832,21 +832,21 @@ Copyright and Licence % % \begin{macro}{\@@_to_unicode_xetex:n} % \begin{macrocode} -\cs_new_nopar:Npn \@@_to_unicode_xetex:n #1 +\cs_new:Npn \@@_to_unicode_xetex:n #1 { \int_to_arabic:n { `#1 } } % \end{macrocode} % \end{macro} % % \begin{macro}{\@@_UTF_to_unicode:n,\@@_UTFchar_to_unicode:n} % \begin{macrocode} -\cs_new_nopar:Npn \@@_UTF_to_unicode:n #1 +\cs_new:Npn \@@_UTF_to_unicode:n #1 { \int_to_arabic:n { \exp_args:No \int_from_hex:n { \CJK@plane } * "100 + #1 } } -\cs_new_nopar:Npn \@@_UTFchar_to_unicode:n #1 +\cs_new:Npn \@@_UTFchar_to_unicode:n #1 { \int_to_arabic:n { \@@_UTF_viii_to_unicode:NNNw #1 \q_stop } } -\cs_new_nopar:Npn \@@_UTF_viii_to_unicode:NNNw #1#2#3#4 \q_stop +\cs_new:Npn \@@_UTF_viii_to_unicode:NNNw #1#2#3#4 \q_stop { \tl_if_empty:nTF {#4} { ( `#1 - "E0 ) * "1000 + ( `#2 - "80 ) * "40 + ( `#3 - "80 ) } @@ -857,16 +857,16 @@ Copyright and Licence % % \begin{macro}{\@@_GBK_to_unicode:n,\@@_GBKchar_to_unicode:n} % \begin{macrocode} -\cs_new_nopar:Npn \@@_GBK_to_unicode:n #1 - { \int_to_arabic:n { " \CJKtu_sfd_map:nn { \CJK@plane } {#1} } } -\cs_new_nopar:Npn \@@_GBKchar_to_unicode:n #1 - { \int_to_arabic:n { " \CJKchartouni {#1} } } +\cs_new:Npn \@@_GBK_to_unicode:n + { \CJKtu_sfd_map:nn { \CJK@plane } } +\cs_new:Npn \@@_GBKchar_to_unicode:n + { \CJKtu_char_to_unicode:n } % \end{macrocode} % \end{macro} % % \begin{macro}{\@@_adjust_xeCJK_hook:} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_adjust_xeCJK_hook: +\cs_new_protected:Npn \@@_adjust_xeCJK_hook: { \cs_new_eq:NN \@@_select_font: \@@_select_font_xetex: \cs_new_eq:NN \@@_to_unicode:n \@@_to_unicode_xetex:n @@ -891,7 +891,7 @@ Copyright and Licence } } \cs_new_eq:NN \@@_leavevmode: \prg_do_nothing: - \cs_new_protected_nopar:Npx \@@_CJKsymbol_hook: + \cs_new_protected:Npx \@@_CJKsymbol_hook: { \exp_not:N \makexeCJKinactive \cs_if_exist_use:NF \xeCJK_select_font: @@ -903,7 +903,7 @@ Copyright and Licence % % \begin{macro}{\@@_adjust_CJK_hook:} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_adjust_CJK_hook: +\cs_new_protected:Npn \@@_adjust_CJK_hook: { \bool_if:NTF \g_@@_GBK_bool { @@ -941,15 +941,15 @@ Copyright and Licence % % \begin{macro}{\@@_adjust_CJKpunct_hook:} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_adjust_CJKpunct_hook: +\cs_new_protected:Npn \@@_adjust_CJKpunct_hook: { - \cs_new_protected_nopar:Npn \@@_restore_CJKsymbol: + \cs_new_protected:Npn \@@_restore_CJKsymbol: { \int_compare:nNnTF { \CJKpunct@punctstyle } = { \CJKpunct@ps@plain } { \@@_restore_CJKsymbol_aux: } { \cs_set_eq:NN \CJKosymbol \@@_save_CJKsymbol:n } } - \cs_new_protected_nopar:Npn \@@_replace_CJKsymbol: + \cs_new_protected:Npn \@@_replace_CJKsymbol: { \int_compare:nNnTF { \CJKpunct@punctstyle } = { \CJKpunct@ps@plain } { \@@_replace_CJKsymbol_aux: } @@ -958,14 +958,14 @@ Copyright and Licence \cs_set_eq:NN \CJKosymbol \@@_CJKsymbol:n } } - \cs_new_protected_nopar:Npn \@@_replace_CJKsymbol_single:n ##1 + \cs_new_protected:Npn \@@_replace_CJKsymbol_single:n ##1 { \int_compare:nNnTF { \CJKpunct@punctstyle } = { \CJKpunct@ps@plain } { \@@_replace_CJKsymbol_single_aux:n { ##1 } } { \bool_if:NF \l_@@_enable_bool { \cs_set_eq:NN \@@_save_CJKsymbol:n \CJKosymbol } - \cs_set_protected_nopar:Npn \CJKosymbol ####1 + \cs_set_protected:Npn \CJKosymbol ####1 { \@@_single_CJKsymbol:nn { ####1 } { ##1 } } } } @@ -991,7 +991,7 @@ Copyright and Licence % % \begin{macro}{\@@_pinyin:n} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_pinyin:n #1 +\cs_new_protected:Npn \@@_pinyin:n #1 { \@@_pinyin_init: \bool_set_true:N \l_@@_first_bool @@ -1003,7 +1003,7 @@ Copyright and Licence % % \begin{macro}{\@@_pinyin_aux:n} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_pinyin_aux:n #1 +\cs_new_protected:Npn \@@_pinyin_aux:n #1 { \quark_if_recursion_tail_stop_do:nn {#1} { @@ -1039,7 +1039,7 @@ Copyright and Licence % % \begin{macro}{\@@_tone:nn} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_tone:nn #1#2 +\cs_new_protected:Npn \@@_tone:nn #1#2 { \use:c { @@_num_to_tone_ #1 :Nn } {#1} {#2} } \cs_generate_variant:Nn \@@_tone:nn { V } % \end{macrocode} @@ -1047,7 +1047,7 @@ Copyright and Licence % % \begin{macro}{\@@_replace_v:n} % \begin{macrocode} -\cs_new_nopar:Npn \@@_replace_v:n #1 +\cs_new:Npn \@@_replace_v:n #1 { \str_if_eq:nnTF {#1} { v } { @@ -1062,7 +1062,7 @@ Copyright and Licence % % \begin{macro}{\@@_pinyin_init:} % \begin{macrocode} -\cs_new_nopar:Npn \@@_pinyin_init: +\cs_new:Npn \@@_pinyin_init: { \tl_clear:N \l_@@_pre_tl \tl_clear:N \l_@@_post_tl \tl_clear:N \l_@@_item_tl \tl_clear:N \l_@@_tone_tl @@ -1100,19 +1100,19 @@ Copyright and Licence % % \begin{macro}{\@@_num_to_tone:Nn} % \begin{macrocode} -\cs_new_protected_nopar:Npn \@@_num_to_tone:Nn #1#2 +\cs_new_protected:Npn \@@_num_to_tone:Nn #1#2 { \if_case:w \int_eval:n { #2 - 1 } \exp_stop_f: \= {#1} \or: \'{#1} \or: \v {#1} \or: \` {#1} \else: #1 \fi: } \tl_map_inline:nn { a o e u } { \cs_new_eq:cN { @@_num_to_tone_ #1 :Nn } \@@_num_to_tone:Nn } -\cs_new_nopar:Npn \@@_num_to_tone_i:Nn #1#2 +\cs_new:Npn \@@_num_to_tone_i:Nn #1#2 { \if_case:w \int_eval:n { #2 - 1 } \exp_stop_f: ī \or: í \or: ǐ \or: ì \else: i \fi: } -\cs_new_protected_nopar:Npn \@@_num_to_tone_v:Nn #1#2 +\cs_new_protected:Npn \@@_num_to_tone_v:Nn #1#2 { \str_case:onTF { \l_@@_pre_tl } { { l } { } { n } { } { L } { } { N } { } } @@ -1150,10 +1150,10 @@ Copyright and Licence % % \begin{macro}[int]{\xpinyin_customary:nnn,\xpinyin_multiple:nnn} % \begin{macrocode} -\cs_new_protected_nopar:Npn \xpinyin_customary:nnn #1#2#3 - { \cs_gset_nopar:cpn { c_@@_ #2 _tl } {#3} } -\cs_new_protected_nopar:Npn \xpinyin_multiple:nnn #1#2#3 - { \cs_gset_nopar:cpn { c_@@_multiple_ #2 _clist } {#3} } +\cs_new_protected:Npn \xpinyin_customary:nnn #1#2 + { \cs_gset_nopar:cpn { c_@@_ #2 _tl } } +\cs_new_protected:Npn \xpinyin_multiple:nnn #1#2 + { \cs_gset_nopar:cpn { c_@@_multiple_ #2 _clist } } % \end{macrocode} % \end{macro} % diff --git a/Master/texmf-dist/source/latex/xpinyin/xpinyin.ins b/Master/texmf-dist/source/latex/xpinyin/xpinyin.ins index bc0657b87a2..bc25db75014 100644 --- a/Master/texmf-dist/source/latex/xpinyin/xpinyin.ins +++ b/Master/texmf-dist/source/latex/xpinyin/xpinyin.ins @@ -6,7 +6,7 @@ %% %% xpinyin.dtx (with options: `install') %% -%% Copyright (C) 2012-2019 by Qing Lee +%% Copyright (C) 2012-2020 by Qing Lee %% -------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -19,7 +19,7 @@ %% and version 1.3 or later is part of all distributions of %% LaTeX version 2005/12/01 or later. %% -%% This work has the LPPL maintenance status `maintained'. +%% This work has the LPPL maintenance status "maintained". %% %% The Current Maintainer of this work is Qing Lee. %% @@ -45,7 +45,7 @@ \preamble - Copyright (C) 2012-2019 by Qing Lee + Copyright (C) 2012-2020 by Qing Lee -------------------------------------------------------------------------- This work may be distributed and/or modified under the @@ -58,7 +58,7 @@ and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later. - This work has the LPPL maintenance status `maintained'. + This work has the LPPL maintenance status "maintained". The Current Maintainer of this work is Qing Lee. -- cgit v1.2.3