summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty')
-rw-r--r--Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty20
1 files changed, 13 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty b/Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty
index c9740575b02..f6e6d79e7d8 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 by Qing Lee <sobenlee@gmail.com>
+%% Copyright (C) 2012--2013 by Qing Lee <sobenlee@gmail.com>
%% --------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,9 +21,9 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: xpinyin.dtx 367 2012-11-23 04:45:50Z sobenlee $
+\GetIdInfo$Id: xpinyin.dtx 407 2013-05-20 02:19:35Z sobenlee $
{Automatically add pinyin to Chinese characters}
-\ProvidesExplPackage{\ExplFileName}{\ExplFileDate}{1.2}{\ExplFileDescription}
+\ProvidesExplPackage{\ExplFileName}{\ExplFileDate}{1.3}{\ExplFileDescription}
\msg_new:nnn { xpinyin } { no-LuaTeX }
{
The~xpinyin~package~is~not~supported~in~LuaTeX.\\\\
@@ -272,7 +272,7 @@
}
{
\int_compare:nNnTF
- { 0 \cs_if_exist_use:c { c_xpinyin_ \tl_to_str:V \l_xpinyin_tone_tl _tl } } >
+ { 0 \cs_if_exist_use:c { c_xpinyin_ \tl_to_str:N \l_xpinyin_tone_tl _tl } } >
{ 0 \cs_if_exist_use:c { c_xpinyin_ \tl_to_str:n {#1} _tl } }
{ \tl_put_right:Nn \l_xpinyin_post_tl {#1} }
{
@@ -284,7 +284,6 @@
}
\xpinyin_xpinyin_aux:N
}
-\cs_generate_variant:Nn \tl_to_str:n { V }
\cs_new_nopar:Nn \xpinyin_tone:Nn
{ \use:c { xpinyin_num_to_tone_ #1 :Nn } {#1} {#2} }
\cs_generate_variant:Nn \xpinyin_tone:Nn { V }
@@ -295,7 +294,9 @@
\bool_if:nTF
{
\str_if_eq_p:Vn \l_xpinyin_item_tl { l } ||
- \str_if_eq_p:Vn \l_xpinyin_item_tl { n }
+ \str_if_eq_p:Vn \l_xpinyin_item_tl { n } ||
+ \str_if_eq_p:Vn \l_xpinyin_item_tl { L } ||
+ \str_if_eq_p:Vn \l_xpinyin_item_tl { N }
}
{ \exp_not:n { ü} } { u }
}
@@ -333,7 +334,12 @@
\cs_new_nopar:Nn \xpinyin_num_to_tone_v:Nn
{
\bool_if:nTF
- { \str_if_eq_p:Vn \l_tmpa_tl { l } || \str_if_eq_p:Vn \l_tmpa_tl { n } }
+ {
+ \str_if_eq_p:Vn \l_xpinyin_pre_tl { l } ||
+ \str_if_eq_p:Vn \l_xpinyin_pre_tl { n } ||
+ \str_if_eq_p:Vn \l_xpinyin_pre_tl { L } ||
+ \str_if_eq_p:Vn \l_xpinyin_pre_tl { N }
+ }
{
\if_case:w \int_eval:n { #2 - \c_one } \exp_stop_f:
ǖ \or: ǘ \or: ǚ \or: ǜ \else: ü \fi: