summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-31 22:00:36 +0000
committerKarl Berry <karl@freefriends.org>2018-01-31 22:00:36 +0000
commit36524de8c69192388c01a7252c8e609ee0558635 (patch)
tree8bc35006462c482d5a1270e2c525ce12a0f027da
parenta6d864553067dd5f8eab952079dd4b0ab9003caf (diff)
xpinyin (31jan18)
git-svn-id: svn://tug.org/texlive/trunk@46506 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/xpinyin/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/xpinyin/xpinyin.pdfbin209303 -> 209125 bytes
-rw-r--r--Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx191
-rw-r--r--Master/texmf-dist/source/latex/xpinyin/xpinyin.ins4
-rw-r--r--Master/texmf-dist/tex/latex/xpinyin/xpinyin-database.def6
-rw-r--r--Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty102
6 files changed, 152 insertions, 153 deletions
diff --git a/Master/texmf-dist/doc/latex/xpinyin/README.md b/Master/texmf-dist/doc/latex/xpinyin/README.md
index 165b9338eb9..0844f16349c 100644
--- a/Master/texmf-dist/doc/latex/xpinyin/README.md
+++ b/Master/texmf-dist/doc/latex/xpinyin/README.md
@@ -20,7 +20,7 @@ Issues and pull requests are welcome.
Copyright and Licence
---------------------
- Copyright (C) 2012-2017 by Qing Lee <sobenlee@gmail.com>
+ Copyright (C) 2012-2018 by Qing Lee <sobenlee@gmail.com>
----------------------------------------------------------------------
This work may be distributed and/or modified under the
diff --git a/Master/texmf-dist/doc/latex/xpinyin/xpinyin.pdf b/Master/texmf-dist/doc/latex/xpinyin/xpinyin.pdf
index fd9b8bb76b9..b1fb6aa25d8 100644
--- a/Master/texmf-dist/doc/latex/xpinyin/xpinyin.pdf
+++ b/Master/texmf-dist/doc/latex/xpinyin/xpinyin.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx b/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx
index e03c63b2b50..edfa571f401 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-2017 by Qing Lee <sobenlee@gmail.com>
+ Copyright (C) 2012-2018 by Qing Lee <sobenlee@gmail.com>
----------------------------------------------------------------------
This work may be distributed and/or modified under the
@@ -81,7 +81,7 @@ Copyright and Licence
\preamble
- Copyright (C) 2012-2017 by Qing Lee <sobenlee@gmail.com>
+ Copyright (C) 2012-2018 by Qing Lee <sobenlee@gmail.com>
--------------------------------------------------------------------------
This work may be distributed and/or modified under the
@@ -167,12 +167,12 @@ Copyright and Licence
%</internal>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\RequirePackage{expl3}
-%<+package>\GetIdInfo$Id: xpinyin.dtx 52c78f6 2017-08-07 17:04:25 +0800 Qing Lee <sobenlee@gmail.com> $
+%<+package>\GetIdInfo$Id: xpinyin.dtx fafc2d9 2018-01-28 19:09:20 +0800 Qing Lee <sobenlee@gmail.com> $
%<package> {Automatically add pinyin to Chinese characters}
%<package>\ProvidesExplPackage{\ExplFileName}
-%<package> {\ExplFileDate}{2.5}{\ExplFileDescription}
+%<package> {\ExplFileDate}{2.6}{\ExplFileDescription}
%<database>\ProvidesFile{xpinyin-database.def}%
-%<database> [2017/08/07 v2.5 xpinyin database]
+%<database> [2018/01/28 v2.6 xpinyin database]
%<*driver>
\documentclass{ctxdoc}
\usepackage{xpinyin}
@@ -186,7 +186,7 @@ Copyright and Licence
%</driver>
% \fi
%
-% \CheckSum{719}
+% \CheckSum{703}
% \GetFileId{xpinyin.sty}
%
% \title{\bfseries\pkg{xpinyin} 宏包}
@@ -407,7 +407,7 @@ Copyright and Licence
'l3kernel'~and~'l3packages'\\\\
using~your~TeX~package~manager~or~from~CTAN.
}
-\@ifpackagelater { expl3 } { 2017/07/19 } { }
+\@ifpackagelater { expl3 } { 2017/12/16 } { }
{ \msg_error:nn { xpinyin } { l3-too-old } }
% \end{macrocode}
%
@@ -425,35 +425,47 @@ Copyright and Licence
\RequirePackage { l3keys2e }
% \end{macrocode}
%
-% \begin{macro}[internal]{\c_@@_tone_prop}
+% \begin{variable}{\c_@@_tone_prop}
% 重音标记 |\`|、|\'| 和 |\=| 在 \env{tabbing} 环境中被移作他用,为避免错误,
% 我们使用内部命令 \tn{@tabacckludge} 或 \tn{a} 来定义。
% \begin{macrocode}
-\prop_new:N \c_@@_tone_prop
-\clist_map_inline:nn
+\prop_const_from_keyval:Nn \c_@@_tone_prop
{
- { ā }{ \@tabacckludge= a } , { á }{ \@tabacckludge' a } ,
- { ǎ }{ \v a } , { à }{ \@tabacckludge` a } ,
- { ō }{ \@tabacckludge= o } , { ó }{ \@tabacckludge' o } ,
- { ǒ }{ \v o } , { ò }{ \@tabacckludge` o } ,
- { ē }{ \@tabacckludge= e } , { é }{ \@tabacckludge' e } ,
- { ě }{ \v e } , { è }{ \@tabacckludge` e } ,
- { ū }{ \@tabacckludge= u } , { ú }{ \@tabacckludge' u } ,
- { ǔ }{ \v u } , { ù }{ \@tabacckludge` u } ,
- { ḿ }{ \@tabacckludge' m } , { ń }{ \@tabacckludge' n } ,
- { ň }{ \v n } , { ǹ }{ \@tabacckludge` n } ,
- { ī }{ \@tabacckludge= { \i } } , { í }{ \@tabacckludge' { \i } } ,
- { ǐ }{ \v { \i } } , { ì }{ \@tabacckludge` { \i } } ,
- { ü }{ \" u } ,
- { ǖ }{ \@tabacckludge= { \" u } } , { ǘ }{ \@tabacckludge' { \" u } } ,
- { ǚ }{ \v { \" u } } , { ǜ }{ \@tabacckludge` { \" u } }
+ { ā } = { \@tabacckludge= a } ,
+ { á } = { \@tabacckludge' a } ,
+ { ǎ } = { \v a } ,
+ { à } = { \@tabacckludge` a } ,
+ { ō } = { \@tabacckludge= o } ,
+ { ó } = { \@tabacckludge' o } ,
+ { ǒ } = { \v o } ,
+ { ò } = { \@tabacckludge` o } ,
+ { ē } = { \@tabacckludge= e } ,
+ { é } = { \@tabacckludge' e } ,
+ { ě } = { \v e } ,
+ { è } = { \@tabacckludge` e } ,
+ { ū } = { \@tabacckludge= u } ,
+ { ú } = { \@tabacckludge' u } ,
+ { ǔ } = { \v u } ,
+ { ù } = { \@tabacckludge` u } ,
+ { ḿ } = { \@tabacckludge' m } ,
+ { ń } = { \@tabacckludge' n } ,
+ { ň } = { \v n } ,
+ { ǹ } = { \@tabacckludge` n } ,
+ { ī } = { \@tabacckludge= { \i } } ,
+ { í } = { \@tabacckludge' { \i } } ,
+ { ǐ } = { \v { \i } } ,
+ { ì } = { \@tabacckludge` { \i } } ,
+ { ü } = { \" u } ,
+ { ǖ } = { \@tabacckludge= { \" u } } ,
+ { ǘ } = { \@tabacckludge' { \" u } } ,
+ { ǚ } = { \v { \" u } } ,
+ { ǜ } = { \@tabacckludge` { \" u } }
}
- { \prop_gput:Nnn \c_@@_tone_prop #1 }
% \end{macrocode}
-% \end{macro}
+% \end{variable}
%
%
-% \begin{macro}[internal]{\@@_UTF_char:nn}
+% \begin{macro}{\@@_UTF_char:nn}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_UTF_char:nn #1#2
{
@@ -464,7 +476,7 @@ Copyright and Licence
% \end{macro}
%
%
-% \begin{macro}[internal]{\@@_GBK_char:nn}
+% \begin{macro}{\@@_GBK_char:nn}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_GBK_char:nn #1#2
{
@@ -502,7 +514,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_save_UTF_cs:Nn}
+% \begin{macro}{\@@_save_UTF_cs:Nn}
% \begin{macrocode}
\group_begin:
\char_set_catcode_active:n { 126 }
@@ -561,14 +573,14 @@ Copyright and Licence
}
% \end{macrocode}
%
-% \begin{macro}[internal,var]{\l_@@_tmpa_box,\l_@@_tmpb_box}
+% \begin{variable}{\l_@@_tmpa_box,\l_@@_tmpb_box}
% \begin{macrocode}
\box_new:N \l_@@_tmpa_box
\box_new:N \l_@@_tmpb_box
% \end{macrocode}
-% \end{macro}
+% \end{variable}
%
-% \begin{macro}[internal]{\@@_width:Nn}
+% \begin{macro}{\@@_width:Nn}
% \begin{macrocode}
\cs_new_protected:Npn \@@_width:Nn #1#2
{
@@ -578,22 +590,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_leave_vmode:}
-% \begin{macrocode}
-\cs_if_exist:NTF \pdftex_quitvmode:D
- { \cs_new_eq:NN \@@_quit_vmode: \pdftex_quitvmode:D }
- {
- \cs_new_protected_nopar:Npn \@@_quit_vmode:
- {
- \if_mode_vertical:
- \exp_after:wN \tex_indent:D
- \fi:
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[internal]{\@@_make_pinyin_box:nnn}
+% \begin{macro}{\@@_make_pinyin_box:nnn}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_make_pinyin_box:nnn #1#2#3
{
@@ -617,14 +614,14 @@ Copyright and Licence
{ \box_wd:N \l_@@_tmpb_box } >
{ \box_wd:N \l_@@_tmpa_box + \l_@@_CJKglue_dim }
{
- \box_resize:Nnn \l_@@_tmpb_box
+ \box_resize_to_wd_and_ht:Nnn \l_@@_tmpb_box
{ \box_wd:N \l_@@_tmpa_box + \l_@@_CJKglue_dim }
- { \box_ht:N \l_@@_tmpb_box + \box_dp:N \l_@@_tmpb_box }
+ { \box_ht:N \l_@@_tmpb_box }
}
\box_move_up:nn { \l_@@_vsep_tl }
{
\hbox_to_wd:nn { \box_wd:N \l_@@_tmpa_box }
- { \tex_hss:D \box_use_clear:N \l_@@_tmpb_box \tex_hss:D }
+ { \tex_hss:D \box_use_drop:N \l_@@_tmpb_box \tex_hss:D }
}
}
}
@@ -638,7 +635,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_CJKsymbol:n}
+% \begin{macro}{\@@_CJKsymbol:n}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_CJKsymbol:n #1
{ \@@_CJKsymbol:xn { \@@_to_unicode:n {#1} } {#1} }
@@ -666,33 +663,33 @@ Copyright and Licence
% \begin{macrocode}
\NewDocumentCommand \xpinyin { s O { } m }
{
+ \mode_leave_vertical:
\IfBooleanTF {#1}
{
\group_begin:
- \keys_set:nn { xpinyin } {#2}
- \enablepinyin
- #3
+ \keys_set:nn { xpinyin } {#2}
+ \enablepinyin
+ #3
\group_end:
}
{
\group_begin:
- \keys_set:nn { xpinyin } {#2}
- \bool_if:NF \l_@@_enable_bool
- { \@@_width:Nn \l_@@_CJKglue_dim { \CJKglue } }
- \@@_quit_vmode:
- \@@_single_aux:nn {#3}
+ \keys_set:nn { xpinyin } {#2}
+ \bool_if:NF \l_@@_enable_bool
+ { \@@_width:Nn \l_@@_CJKglue_dim { \CJKglue } }
+ \@@_single_aux:nn {#3}
}
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\l_@@_enable_bool}
+% \begin{variable}{\l_@@_enable_bool}
% \begin{macrocode}
\bool_new:N \l_@@_enable_bool
% \end{macrocode}
-% \end{macro}
+% \end{variable}
%
-% \begin{macro}[internal]{\@@_CJKglue:}
+% \begin{macro}{\@@_CJKglue:}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_CJKglue:
{ \skip_horizontal:n { \l_@@_hsep_tl } }
@@ -734,7 +731,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_restore_footnote:}
+% \begin{macro}{\@@_restore_footnote:}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_restore_footnote:
{
@@ -744,7 +741,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\l_@@_restore_footnote_tl}
+% \begin{variable}{\l_@@_restore_footnote_tl}
% \begin{macrocode}
\tl_new:N \l_@@_restore_footnote_tl
\tl_set:Nn \l_@@_restore_footnote_tl
@@ -753,20 +750,20 @@ Copyright and Licence
{ \disablepinyin }
}
% \end{macrocode}
-% \end{macro}
+% \end{variable}
%
-% \begin{macro}[internal,var]{\l_@@_CJKglue_dim}
+% \begin{variable}{\l_@@_CJKglue_dim}
% \begin{macrocode}
\dim_new:N \l_@@_CJKglue_dim
% \end{macrocode}
-% \end{macro}
+% \end{variable}
%
-% \begin{macro}[internal]{\@@_single_aux:nn}
+% \begin{macro}{\@@_single_aux:nn}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_single_aux:nn #1#2
{
- \@@_replace_CJKsymbol_single:n {#2}
- #1
+ \@@_replace_CJKsymbol_single:n {#2}
+ #1
\group_end:
}
\cs_new_protected_nopar:Npn \@@_replace_CJKsymbol_single_aux:n #1
@@ -784,7 +781,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_replace_CJKsymbol_aux:}
+% \begin{macro}{\@@_replace_CJKsymbol_aux:}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_replace_CJKsymbol_aux:
{
@@ -794,14 +791,14 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_restore_CJKsymbol_aux:}
+% \begin{macro}{\@@_restore_CJKsymbol_aux:}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_restore_CJKsymbol_aux:
{ \cs_set_eq:NN \CJKsymbol \@@_save_CJKsymbol:n }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_select_font_xetex:}
+% \begin{macro}{\@@_select_font_xetex:}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_select_font_xetex:
{
@@ -819,7 +816,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_select_font_aux:}
+% \begin{macro}{\@@_select_font_aux:}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_select_font_aux:
{
@@ -833,14 +830,14 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_to_unicode_xetex:n}
+% \begin{macro}{\@@_to_unicode_xetex:n}
% \begin{macrocode}
\cs_new_nopar:Npn \@@_to_unicode_xetex:n #1
{ \int_to_arabic:n { `#1 } }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_UTF_to_unicode:n,\@@_UTFchar_to_unicode:n}
+% \begin{macro}{\@@_UTF_to_unicode:n,\@@_UTFchar_to_unicode:n}
% \begin{macrocode}
\cs_new_nopar:Npn \@@_UTF_to_unicode:n #1
{
@@ -858,7 +855,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_GBK_to_unicode:n,\@@_GBKchar_to_unicode:n}
+% \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} } }
@@ -867,7 +864,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_adjust_xeCJK_hook:}
+% \begin{macro}{\@@_adjust_xeCJK_hook:}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_adjust_xeCJK_hook:
{
@@ -904,7 +901,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_adjust_CJK_hook:}
+% \begin{macro}{\@@_adjust_CJK_hook:}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_adjust_CJK_hook:
{
@@ -918,7 +915,7 @@ Copyright and Licence
\cs_new_eq:NN \@@_char_to_unicode:n \@@_UTFchar_to_unicode:n
}
\cs_new_eq:NN \@@_select_font: \@@_select_font_aux:
- \cs_new_eq:NN \@@_leavevmode: \@@_quit_vmode:
+ \cs_new_eq:NN \@@_leavevmode: \mode_leave_vertical:
\cs_new_eq:NN \@@_CJKsymbol_hook: \prg_do_nothing:
\@ifpackageloaded { CJKpunct }
{ \@@_adjust_CJKpunct_hook: }
@@ -942,7 +939,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_adjust_CJKpunct_hook:}
+% \begin{macro}{\@@_adjust_CJKpunct_hook:}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_adjust_CJKpunct_hook:
{
@@ -992,7 +989,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_pinyin:n}
+% \begin{macro}{\@@_pinyin:n}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_pinyin:n #1
{
@@ -1004,7 +1001,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_pinyin_aux:n}
+% \begin{macro}{\@@_pinyin_aux:n}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_pinyin_aux:n #1
{
@@ -1040,15 +1037,15 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_tone:Nn}
+% \begin{macro}{\@@_tone:nn}
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \@@_tone:Nn #1#2
+\cs_new_protected_nopar:Npn \@@_tone:nn #1#2
{ \use:c { @@_num_to_tone_ #1 :Nn } {#1} {#2} }
-\cs_generate_variant:Nn \@@_tone:Nn { V }
+\cs_generate_variant:Nn \@@_tone:nn { V }
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_replace_v:n}
+% \begin{macro}{\@@_replace_v:n}
% \begin{macrocode}
\cs_new_nopar:Npn \@@_replace_v:n #1
{
@@ -1063,7 +1060,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_pinyin_init:}
+% \begin{macro}{\@@_pinyin_init:}
% \begin{macrocode}
\cs_new_nopar:Npn \@@_pinyin_init:
{
@@ -1073,7 +1070,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_if_number:nTF}
+% \begin{macro}{\@@_if_number:nTF}
% \begin{macrocode}
\prg_new_conditional:Npnn \@@_if_number:n #1 { TF }
{
@@ -1083,13 +1080,13 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal,var]{\l_@@_first_bool}
+% \begin{variable}{\l_@@_first_bool}
% \begin{macrocode}
\bool_new:N \l_@@_first_bool
% \end{macrocode}
-% \end{macro}
+% \end{variable}
%
-% \begin{macro}[internal,var]
+% \begin{variable}
% {\c_@@_a_tl,\c_@@_o_tl,\c_@@_e_tl,\c_@@_i_tl,\c_@@_u_tl,\c_@@_v_tl}
% \begin{macrocode}
\tl_const:Nn \c_@@_a_tl { 3 }
@@ -1099,9 +1096,9 @@ Copyright and Licence
\tl_const:Nn \c_@@_u_tl { 1 }
\tl_const:Nn \c_@@_v_tl { 1 }
% \end{macrocode}
-% \end{macro}
+% \end{variable}
%
-% \begin{macro}[internal]{\@@_num_to_tone:Nn}
+% \begin{macro}{\@@_num_to_tone:Nn}
% \begin{macrocode}
\cs_new_protected_nopar:Npn \@@_num_to_tone:Nn #1#2
{
@@ -1151,7 +1148,7 @@ Copyright and Licence
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\xpinyin_customary:nnn,\xpinyin_multiple:nnn}
+% \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} }
diff --git a/Master/texmf-dist/source/latex/xpinyin/xpinyin.ins b/Master/texmf-dist/source/latex/xpinyin/xpinyin.ins
index 506823d7b4c..af724367e44 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-2017 by Qing Lee <sobenlee@gmail.com>
+%% Copyright (C) 2012-2018 by Qing Lee <sobenlee@gmail.com>
%% --------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -45,7 +45,7 @@
\preamble
- Copyright (C) 2012-2017 by Qing Lee <sobenlee@gmail.com>
+ Copyright (C) 2012-2018 by Qing Lee <sobenlee@gmail.com>
--------------------------------------------------------------------------
This work may be distributed and/or modified under the
diff --git a/Master/texmf-dist/tex/latex/xpinyin/xpinyin-database.def b/Master/texmf-dist/tex/latex/xpinyin/xpinyin-database.def
index 954bea32078..e1fb64ca19e 100644
--- a/Master/texmf-dist/tex/latex/xpinyin/xpinyin-database.def
+++ b/Master/texmf-dist/tex/latex/xpinyin/xpinyin-database.def
@@ -7,7 +7,7 @@
%% xpinyin.dtx (with options: `database')
%% xpinyin.db
%%
-%% Copyright (C) 2012-2017 by Qing Lee <sobenlee@gmail.com>
+%% Copyright (C) 2012-2018 by Qing Lee <sobenlee@gmail.com>
%% --------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -27,7 +27,7 @@
%% --------------------------------------------------------------------------
%%
\ProvidesFile{xpinyin-database.def}%
- [2017/08/07 v2.5 xpinyin database]
+ [2018/01/28 v2.6 xpinyin database]
%%
%% Do not edit this file!
%% Created from Unihan database:
@@ -36,7 +36,7 @@
%% Date: 2017-05-14 07:01:48 GMT [JHJ]
%% Unicode version: 10.0.0
%%
-%% by "texlua xpinyin.lua" on 2017-08-07 17:10:33 +0800
+%% by "texlua xpinyin.lua" on 2018-01-28 19:21:49 +0800
%%
\XPYU{〇}{12295}{líng}
\XPYU{㐀}{13312}{qiū}
diff --git a/Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty b/Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty
index f47a873d1e0..4472e79ca81 100644
--- a/Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty
+++ b/Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty
@@ -6,7 +6,7 @@
%%
%% xpinyin.dtx (with options: `package')
%%
-%% Copyright (C) 2012-2017 by Qing Lee <sobenlee@gmail.com>
+%% Copyright (C) 2012-2018 by Qing Lee <sobenlee@gmail.com>
%% --------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -27,10 +27,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: xpinyin.dtx 52c78f6 2017-08-07 17:04:25 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: xpinyin.dtx fafc2d9 2018-01-28 19:09:20 +0800 Qing Lee <sobenlee@gmail.com> $
{Automatically add pinyin to Chinese characters}
\ProvidesExplPackage{\ExplFileName}
- {\ExplFileDate}{2.5}{\ExplFileDescription}
+ {\ExplFileDate}{2.6}{\ExplFileDescription}
\msg_new:nnn { xpinyin } { l3-too-old }
{
Support~package~'expl3'~too~old. \\\\
@@ -38,7 +38,7 @@
'l3kernel'~and~'l3packages'\\\\
using~your~TeX~package~manager~or~from~CTAN.
}
-\@ifpackagelater { expl3 } { 2017/07/19 } { }
+\@ifpackagelater { expl3 } { 2017/12/16 } { }
{ \msg_error:nn { xpinyin } { l3-too-old } }
\msg_new:nnn { xpinyin } { engine-not-supported }
{ Engine~`\c_sys_engine_str'~is~not~yet~supported,~xpinyin~will~abort! }
@@ -48,26 +48,38 @@
{ \msg_critical:nn { xpinyin } { engine-not-supported } }
\RequirePackage { xparse }
\RequirePackage { l3keys2e }
-\prop_new:N \c__xpinyin_tone_prop
-\clist_map_inline:nn
- {
- { ā }{ \@tabacckludge= a } , { á }{ \@tabacckludge' a } ,
- { ǎ }{ \v a } , { à }{ \@tabacckludge` a } ,
- { ō }{ \@tabacckludge= o } , { ó }{ \@tabacckludge' o } ,
- { ǒ }{ \v o } , { ò }{ \@tabacckludge` o } ,
- { ē }{ \@tabacckludge= e } , { é }{ \@tabacckludge' e } ,
- { ě }{ \v e } , { è }{ \@tabacckludge` e } ,
- { ū }{ \@tabacckludge= u } , { ú }{ \@tabacckludge' u } ,
- { ǔ }{ \v u } , { ù }{ \@tabacckludge` u } ,
- { ḿ }{ \@tabacckludge' m } , { ń }{ \@tabacckludge' n } ,
- { ň }{ \v n } , { ǹ }{ \@tabacckludge` n } ,
- { ī }{ \@tabacckludge= { \i } } , { í }{ \@tabacckludge' { \i } } ,
- { ǐ }{ \v { \i } } , { ì }{ \@tabacckludge` { \i } } ,
- { ü }{ \" u } ,
- { ǖ }{ \@tabacckludge= { \" u } } , { ǘ }{ \@tabacckludge' { \" u } } ,
- { ǚ }{ \v { \" u } } , { ǜ }{ \@tabacckludge` { \" u } }
- }
- { \prop_gput:Nnn \c__xpinyin_tone_prop #1 }
+\prop_const_from_keyval:Nn \c__xpinyin_tone_prop
+ {
+ { ā } = { \@tabacckludge= a } ,
+ { á } = { \@tabacckludge' a } ,
+ { ǎ } = { \v a } ,
+ { à } = { \@tabacckludge` a } ,
+ { ō } = { \@tabacckludge= o } ,
+ { ó } = { \@tabacckludge' o } ,
+ { ǒ } = { \v o } ,
+ { ò } = { \@tabacckludge` o } ,
+ { ē } = { \@tabacckludge= e } ,
+ { é } = { \@tabacckludge' e } ,
+ { ě } = { \v e } ,
+ { è } = { \@tabacckludge` e } ,
+ { ū } = { \@tabacckludge= u } ,
+ { ú } = { \@tabacckludge' u } ,
+ { ǔ } = { \v u } ,
+ { ù } = { \@tabacckludge` u } ,
+ { ḿ } = { \@tabacckludge' m } ,
+ { ń } = { \@tabacckludge' n } ,
+ { ň } = { \v n } ,
+ { ǹ } = { \@tabacckludge` n } ,
+ { ī } = { \@tabacckludge= { \i } } ,
+ { í } = { \@tabacckludge' { \i } } ,
+ { ǐ } = { \v { \i } } ,
+ { ì } = { \@tabacckludge` { \i } } ,
+ { ü } = { \" u } ,
+ { ǖ } = { \@tabacckludge= { \" u } } ,
+ { ǘ } = { \@tabacckludge' { \" u } } ,
+ { ǚ } = { \v { \" u } } ,
+ { ǜ } = { \@tabacckludge` { \" u } }
+ }
\cs_new_protected_nopar:Npn \__xpinyin_UTF_char:nn #1#2
{
\cs_if_exist:cF { u8:#1 }
@@ -164,16 +176,6 @@
\hbox_set:Nn \l__xpinyin_tmpa_box {#2}
#1 = \box_wd:N \l__xpinyin_tmpa_box
}
-\cs_if_exist:NTF \pdftex_quitvmode:D
- { \cs_new_eq:NN \__xpinyin_quit_vmode: \pdftex_quitvmode:D }
- {
- \cs_new_protected_nopar:Npn \__xpinyin_quit_vmode:
- {
- \if_mode_vertical:
- \exp_after:wN \tex_indent:D
- \fi:
- }
- }
\cs_new_protected_nopar:Npn \__xpinyin_make_pinyin_box:nnn #1#2#3
{
\__xpinyin_leavevmode:
@@ -196,14 +198,14 @@
{ \box_wd:N \l__xpinyin_tmpb_box } >
{ \box_wd:N \l__xpinyin_tmpa_box + \l__xpinyin_CJKglue_dim }
{
- \box_resize:Nnn \l__xpinyin_tmpb_box
+ \box_resize_to_wd_and_ht:Nnn \l__xpinyin_tmpb_box
{ \box_wd:N \l__xpinyin_tmpa_box + \l__xpinyin_CJKglue_dim }
- { \box_ht:N \l__xpinyin_tmpb_box + \box_dp:N \l__xpinyin_tmpb_box }
+ { \box_ht:N \l__xpinyin_tmpb_box }
}
\box_move_up:nn { \l__xpinyin_vsep_tl }
{
\hbox_to_wd:nn { \box_wd:N \l__xpinyin_tmpa_box }
- { \tex_hss:D \box_use_clear:N \l__xpinyin_tmpb_box \tex_hss:D }
+ { \tex_hss:D \box_use_drop:N \l__xpinyin_tmpb_box \tex_hss:D }
}
}
}
@@ -230,21 +232,21 @@
{ }
\NewDocumentCommand \xpinyin { s O { } m }
{
+ \mode_leave_vertical:
\IfBooleanTF {#1}
{
\group_begin:
- \keys_set:nn { xpinyin } {#2}
- \enablepinyin
- #3
+ \keys_set:nn { xpinyin } {#2}
+ \enablepinyin
+ #3
\group_end:
}
{
\group_begin:
- \keys_set:nn { xpinyin } {#2}
- \bool_if:NF \l__xpinyin_enable_bool
- { \__xpinyin_width:Nn \l__xpinyin_CJKglue_dim { \CJKglue } }
- \__xpinyin_quit_vmode:
- \__xpinyin_single_aux:nn {#3}
+ \keys_set:nn { xpinyin } {#2}
+ \bool_if:NF \l__xpinyin_enable_bool
+ { \__xpinyin_width:Nn \l__xpinyin_CJKglue_dim { \CJKglue } }
+ \__xpinyin_single_aux:nn {#3}
}
}
\bool_new:N \l__xpinyin_enable_bool
@@ -289,8 +291,8 @@
\dim_new:N \l__xpinyin_CJKglue_dim
\cs_new_protected_nopar:Npn \__xpinyin_single_aux:nn #1#2
{
- \__xpinyin_replace_CJKsymbol_single:n {#2}
- #1
+ \__xpinyin_replace_CJKsymbol_single:n {#2}
+ #1
\group_end:
}
\cs_new_protected_nopar:Npn \__xpinyin_replace_CJKsymbol_single_aux:n #1
@@ -397,7 +399,7 @@
\cs_new_eq:NN \__xpinyin_char_to_unicode:n \__xpinyin_UTFchar_to_unicode:n
}
\cs_new_eq:NN \__xpinyin_select_font: \__xpinyin_select_font_aux:
- \cs_new_eq:NN \__xpinyin_leavevmode: \__xpinyin_quit_vmode:
+ \cs_new_eq:NN \__xpinyin_leavevmode: \mode_leave_vertical:
\cs_new_eq:NN \__xpinyin_CJKsymbol_hook: \prg_do_nothing:
\@ifpackageloaded { CJKpunct }
{ \__xpinyin_adjust_CJKpunct_hook: }
@@ -496,9 +498,9 @@
}
\__xpinyin_pinyin_aux:n
}
-\cs_new_protected_nopar:Npn \__xpinyin_tone:Nn #1#2
+\cs_new_protected_nopar:Npn \__xpinyin_tone:nn #1#2
{ \use:c { __xpinyin_num_to_tone_ #1 :Nn } {#1} {#2} }
-\cs_generate_variant:Nn \__xpinyin_tone:Nn { V }
+\cs_generate_variant:Nn \__xpinyin_tone:nn { V }
\cs_new_nopar:Npn \__xpinyin_replace_v:n #1
{
\str_if_eq:nnTF {#1} { v }