texlive[46506] Master/texmf-dist: xpinyin (31jan18)
commits+karl at tug.org
commits+karl at tug.org
Wed Jan 31 23:00:36 CET 2018
Revision: 46506
http://tug.org/svn/texlive?view=revision&revision=46506
Author: karl
Date: 2018-01-31 23:00:36 +0100 (Wed, 31 Jan 2018)
Log Message:
-----------
xpinyin (31jan18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/xpinyin/README.md
trunk/Master/texmf-dist/doc/latex/xpinyin/xpinyin.pdf
trunk/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx
trunk/Master/texmf-dist/source/latex/xpinyin/xpinyin.ins
trunk/Master/texmf-dist/tex/latex/xpinyin/xpinyin-database.def
trunk/Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty
Modified: trunk/Master/texmf-dist/doc/latex/xpinyin/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xpinyin/README.md 2018-01-31 22:00:24 UTC (rev 46505)
+++ trunk/Master/texmf-dist/doc/latex/xpinyin/README.md 2018-01-31 22:00:36 UTC (rev 46506)
@@ -20,7 +20,7 @@
Copyright and Licence
---------------------
- Copyright (C) 2012-2017 by Qing Lee <sobenlee at gmail.com>
+ Copyright (C) 2012-2018 by Qing Lee <sobenlee at gmail.com>
----------------------------------------------------------------------
This work may be distributed and/or modified under the
Modified: trunk/Master/texmf-dist/doc/latex/xpinyin/xpinyin.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx 2018-01-31 22:00:24 UTC (rev 46505)
+++ trunk/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx 2018-01-31 22:00:36 UTC (rev 46506)
@@ -26,7 +26,7 @@
Copyright and Licence
---------------------
- Copyright (C) 2012-2017 by Qing Lee <sobenlee at gmail.com>
+ Copyright (C) 2012-2018 by Qing Lee <sobenlee at gmail.com>
----------------------------------------------------------------------
This work may be distributed and/or modified under the
@@ -81,7 +81,7 @@
\preamble
- Copyright (C) 2012-2017 by Qing Lee <sobenlee at gmail.com>
+ Copyright (C) 2012-2018 by Qing Lee <sobenlee at gmail.com>
--------------------------------------------------------------------------
This work may be distributed and/or modified under the
@@ -167,12 +167,12 @@
%</internal>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\RequirePackage{expl3}
-%<+package>\GetIdInfo$Id: xpinyin.dtx 52c78f6 2017-08-07 17:04:25 +0800 Qing Lee <sobenlee at gmail.com> $
+%<+package>\GetIdInfo$Id: xpinyin.dtx fafc2d9 2018-01-28 19:09:20 +0800 Qing Lee <sobenlee at 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 @@
%</driver>
% \fi
%
-% \CheckSum{719}
+% \CheckSum{703}
% \GetFileId{xpinyin.sty}
%
% \title{\bfseries\pkg{xpinyin} 宏包}
@@ -407,7 +407,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 } }
% \end{macrocode}
%
@@ -425,35 +425,47 @@
\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 @@
% \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 @@
% \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 @@
}
% \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,23 +590,8 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[internal]{\@@_leave_vmode:}
+% \begin{macro}{\@@_make_pinyin_box:nnn}
% \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{macrocode}
\cs_new_protected_nopar:Npn \@@_make_pinyin_box:nnn #1#2#3
{
\@@_leavevmode:
@@ -617,14 +614,14 @@
{ \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 @@
% \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 @@
% \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 @@
% \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 @@
% \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 @@
{ \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 @@
% \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,7 +791,7 @@
% \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 }
@@ -801,7 +798,7 @@
% \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 @@
% \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,7 +830,7 @@
% \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 } }
@@ -840,7 +837,7 @@
% \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 @@
% \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 at plane } {#1} } }
@@ -867,7 +864,7 @@
% \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 @@
% \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 @@
\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 @@
% \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 @@
% \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 @@
% \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 @@
% \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 @@
% \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 @@
% \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 @@
% \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 @@
\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 @@
% \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} }
Modified: trunk/Master/texmf-dist/source/latex/xpinyin/xpinyin.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/xpinyin/xpinyin.ins 2018-01-31 22:00:24 UTC (rev 46505)
+++ trunk/Master/texmf-dist/source/latex/xpinyin/xpinyin.ins 2018-01-31 22:00:36 UTC (rev 46506)
@@ -6,7 +6,7 @@
%%
%% xpinyin.dtx (with options: `install')
%%
-%% Copyright (C) 2012-2017 by Qing Lee <sobenlee at gmail.com>
+%% Copyright (C) 2012-2018 by Qing Lee <sobenlee at 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 at gmail.com>
+ Copyright (C) 2012-2018 by Qing Lee <sobenlee at gmail.com>
--------------------------------------------------------------------------
This work may be distributed and/or modified under the
Modified: trunk/Master/texmf-dist/tex/latex/xpinyin/xpinyin-database.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xpinyin/xpinyin-database.def 2018-01-31 22:00:24 UTC (rev 46505)
+++ trunk/Master/texmf-dist/tex/latex/xpinyin/xpinyin-database.def 2018-01-31 22:00:36 UTC (rev 46506)
@@ -7,7 +7,7 @@
%% xpinyin.dtx (with options: `database')
%% xpinyin.db
%%
-%% Copyright (C) 2012-2017 by Qing Lee <sobenlee at gmail.com>
+%% Copyright (C) 2012-2018 by Qing Lee <sobenlee at 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ū}
Modified: trunk/Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty 2018-01-31 22:00:24 UTC (rev 46505)
+++ trunk/Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty 2018-01-31 22:00:36 UTC (rev 46506)
@@ -6,7 +6,7 @@
%%
%% xpinyin.dtx (with options: `package')
%%
-%% Copyright (C) 2012-2017 by Qing Lee <sobenlee at gmail.com>
+%% Copyright (C) 2012-2018 by Qing Lee <sobenlee at 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 at gmail.com> $
+\GetIdInfo$Id: xpinyin.dtx fafc2d9 2018-01-28 19:09:20 +0800 Qing Lee <sobenlee at 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
+\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 } }
+ { ā } = { \@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 }
\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 }
More information about the tex-live-commits
mailing list