diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx b/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx index ab69c0efe3c..7ad60df7fa4 100644 --- a/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx +++ b/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx @@ -50,7 +50,7 @@ xpinyin.tds.zip. The later is most convenient for most users: simply unzip this in your local texmf directory and run texhash to update the database of file locations. If you want to unpack the dtx yourself, running "xetex xpinyin.dtx" will extract the package whereas -"xelatex xpinyin.dtx" will extract it and also typeset the documentation. +"xelatex xpinyin.dtx" will typeset the documentation. The package requires LaTeX3 support as provided in the l3kernel and l3packages bundles. Both of these are available on CTAN as ready-to-install zip files. @@ -62,17 +62,21 @@ and some specific Chinese Simplified fonts (TrueType or OpenType). %</readme> %<*internal> \fi -\ifnum\strcmp{\fmtname}{plain}=0 \else - \expandafter\begingroup -\fi +\begingroup + \edef\tempa{\fmtname} + \edef\tempb{plain} +\expandafter\endgroup +\ifx\tempa\tempb +\csname fi\endcsname %</internal> %<*install> + \input docstrip.tex \keepsilent \askforoverwritefalse \preamble - 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 @@ -95,20 +99,20 @@ and some specific Chinese Simplified fonts (TrueType or OpenType). xpinyin.ins and README. \endpostamble -\usedir{tex/latex/xpinyin} -\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}} + +\generate{ + \usedir{source/latex/xpinyin} + \file{\jobname.ins}{\from{\jobname.dtx}{install}} + \usedir{tex/latex/xpinyin} + \file{\jobname.sty}{\from{\jobname.dtx}{package}} + \nopreamble\nopostamble + \usedir{doc/latex/zhnumber} + \file{README.txt}{\from{\jobname.dtx}{readme}} +} + +\endbatchfile %</install> -%<install>\endbatchfile %<*internal> -\usedir{source/latex/xpinyin} -\generate{\file{\jobname.ins}{\from{\jobname.dtx}{install}}} -\nopreamble\nopostamble -\usedir{doc/latex/zhnumber} -\generate{\file{README.txt}{\from{\jobname.dtx}{readme}}} -\ifnum\strcmp{\fmtname}{plain}=0 - \expandafter\endbatchfile -\else - \expandafter\endgroup \fi %</internal> % @@ -118,7 +122,7 @@ and some specific Chinese Simplified fonts (TrueType or OpenType). \ProvidesFile{xpinyin.dtx} %</driver> \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} %</driver|package> % @@ -176,7 +180,7 @@ and some specific Chinese Simplified fonts (TrueType or OpenType). %</driver> % \fi % -% \CheckSum{528} +% \CheckSum{534} % \GetFileInfo{\jobname.sty} % % \title{\bfseries\pkg{xpinyin} 宏包} @@ -370,7 +374,7 @@ and some specific Chinese Simplified fonts (TrueType or OpenType). % \fi % % \begin{macrocode} -\ProvidesExplPackage{\ExplFileName}{\ExplFileDate}{1.2}{\ExplFileDescription} +\ProvidesExplPackage{\ExplFileName}{\ExplFileDate}{1.3}{\ExplFileDescription} % \end{macrocode} % % \begin{macrocode} @@ -733,7 +737,7 @@ and some specific Chinese Simplified fonts (TrueType or OpenType). } { \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} } { @@ -745,7 +749,6 @@ and some specific Chinese Simplified fonts (TrueType or OpenType). } \xpinyin_xpinyin_aux:N } -\cs_generate_variant:Nn \tl_to_str:n { V } % \end{macrocode} % \end{macro} % @@ -766,7 +769,9 @@ and some specific Chinese Simplified fonts (TrueType or OpenType). \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 } } @@ -831,7 +836,12 @@ and some specific Chinese Simplified fonts (TrueType or OpenType). \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: |