summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-02-03 23:02:21 +0000
committerKarl Berry <karl@freefriends.org>2016-02-03 23:02:21 +0000
commitf4a543aed2bbfaec5c3f8dbfee5985322cd1b938 (patch)
tree782264b0fd48eaed1f2448fecaed4ecb3697d801 /Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty
parent0cac99615b136e1d48a6bf1c06c94de0fc0cc6b9 (diff)
xpinyin (2feb16)
git-svn-id: svn://tug.org/texlive/trunk@39566 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty')
-rw-r--r--Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty36
1 files changed, 23 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty b/Master/texmf-dist/tex/latex/xpinyin/xpinyin.sty
index a8ee4120b31..144c0a635fd 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-2014 by Qing Lee <sobenlee@gmail.com>
+%% Copyright (C) 2012-2016 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,17 +21,27 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: xpinyin.dtx 749 2014-12-24 15:05:15Z sobenlee@gmail.com $
+\GetIdInfo$Id: xpinyin.dtx d4d7ebd 2016-02-02 16:55:24 +0800 Qing Lee <sobenlee@gmail.com> $
{Automatically add pinyin to Chinese characters}
\ProvidesExplPackage{\ExplFileName}
- {\ExplFileDate}{2.1}{\ExplFileDescription}
-\msg_new:nnn { xpinyin } { no-LuaTeX }
+ {\ExplFileDate}{2.2}{\ExplFileDescription}
+\msg_new:nnn { xpinyin } { l3-too-old }
{
- The~xpinyin~package~is~not~supported~in~LuaTeX.\\\\
- You~must~change~your~typesetting~engine~to\\
- "xelatex"~or~"pdflatex"~or~"latex"~instead~of~"lualatex".
+ Support~package~'expl3'~too~old. \\\\
+ Please~update~an~up~to~date~version~of~the~bundles\\\\
+ 'l3kernel'~and~'l3packages'\\\\
+ using~your~TeX~package~manager~or~from~CTAN.
}
-\luatex_if_engine:T { \msg_critical:nn { xpinyin } { no-LuaTeX } }
+\@ifpackagelater { expl3 } { 2015/09/24 } { }
+ { \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! }
+\bool_if:nF
+ {
+ \sys_if_engine_xetex_p: ||
+ \sys_if_engine_pdftex_p:
+ }
+ { \msg_critical:nn { xpinyin } { engine-not-supported } }
\RequirePackage { xparse }
\RequirePackage { l3keys2e }
\prop_new:N \c__xpinyin_tone_prop
@@ -130,7 +140,7 @@
\bool_gset_true:N \g__xpinyin_GBK_bool
}
{
- \xetex_if_engine:TF
+ \sys_if_engine_xetex:TF
{
\RequirePackage { xeCJK }
\AtEndOfPackage { \__xpinyin_adjust_xeCJK_hook: }
@@ -150,8 +160,8 @@
\hbox_set:Nn \l__xpinyin_tmpa_box {#2}
#1 = \box_wd:N \l__xpinyin_tmpa_box
}
-\cs_if_exist:NTF \quitvmode
- { \cs_new_eq:NN \__xpinyin_quit_vmode: \quitvmode }
+\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:
{
@@ -194,7 +204,7 @@
}
}
\tl_new:N \l__xpinyin_pinyin_box_hook_tl
-\pdftex_if_engine:T
+\sys_if_engine_pdftex:T
{
\tl_put_right:Nn \l__xpinyin_pinyin_box_hook_tl
{ \cs_set_eq:NN \CJK@plane \tex_undefined:D }
@@ -304,7 +314,7 @@
{
\tl_set:Nx \l__xpinyin_current_coor_tl { \l__xpinyin_coor_tl }
\__xpinyin_select_font_aux:
- \int_compare:nNnF { \XeTeXfonttype \tex_font:D } = \c_zero
+ \int_compare:nNnF { \xetex_fonttype:D \tex_font:D } = \c_zero
{
\exp_last_unbraced:NNV
\cs_gset_eq:cN \l__xpinyin_current_coor_tl \tex_font:D