From dc8de378dea7a09d1e83b20828ab14721fd7f4a1 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 14 Nov 2013 00:15:43 +0000
Subject: xpinyin (13nov13)

git-svn-id: svn://tug.org/texlive/trunk@32142 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx | 24 ++++++++++------------
 1 file changed, 11 insertions(+), 13 deletions(-)

(limited to 'Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx')

diff --git a/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx b/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx
index df07517417d..4a5221a7ded 100644
--- a/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx
+++ b/Master/texmf-dist/source/latex/xpinyin/xpinyin.dtx
@@ -119,13 +119,13 @@ and some specific Chinese Simplified fonts (TrueType or OpenType).
 %<*driver|package>
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{expl3}
-\GetIdInfo$Id: xpinyin.dtx 512 2013-08-17 15:03:03Z sobenlee $
+\GetIdInfo$Id: xpinyin.dtx 526 2013-11-12 00:16:04Z sobenlee $
   {Automatically add pinyin to Chinese characters}
 %<*driver>
 \ProvidesExplFile{\ExplFileName.\ExplFileExtension}
 %</driver>
 %<package>\ProvidesExplPackage{\ExplFileName}
-  {\ExplFileDate}{1.4}{\ExplFileDescription}
+  {\ExplFileDate}{1.5}{\ExplFileDescription}
 %<*driver>
 \ExplSyntaxOff
 %</driver>
@@ -186,7 +186,7 @@ and some specific Chinese Simplified fonts (TrueType or OpenType).
 %</driver>
 % \fi
 %
-% \CheckSum{622}
+% \CheckSum{616}
 % \GetFileInfo{\jobname.dtx}
 %
 % \title{\bfseries\pkg{xpinyin} 宏包}
@@ -540,8 +540,8 @@ and some specific Chinese Simplified fonts (TrueType or OpenType).
 %    \begin{macrocode}
 \cs_new_protected_nopar:Npn \@@_make_box:nn #1#2
   {
-    \@@_save_CJKsymbol:n {#1}
     \@@_make_pinyin_box:xnn { \@@_to_unicode:n {#1} } {#1} {#2}
+    \@@_save_CJKsymbol:n {#1}
   }
 %    \end{macrocode}
 % \end{macro}
@@ -550,7 +550,8 @@ and some specific Chinese Simplified fonts (TrueType or OpenType).
 %    \begin{macrocode}
 \cs_new_protected_nopar:Npn \@@_make_pinyin_box:nnn #1#2#3
   {
-    \hbox_overlap_left:n
+    \@@_leavevmode:
+    \hbox_overlap_right:n
       {
         \hbox_set:Nn \l_@@_tmpa_box
           { \@@_CJKsymbol_hook: \@@_save_CJKsymbol:n {#2} }
@@ -579,8 +580,6 @@ and some specific Chinese Simplified fonts (TrueType or OpenType).
               { \tex_hss:D  \box_use_clear:N \l_@@_tmpb_box \tex_hss:D }
           }
       }
-    { \@@_CJK_node: }
-    \@@_ignore_spaces:w
   }
 \tl_new:N \l_@@_pinyin_box_hook_tl
 \cs_generate_variant:Nn \@@_make_pinyin_box:nnn { x }
@@ -593,8 +592,8 @@ and some specific Chinese Simplified fonts (TrueType or OpenType).
   { \@@_CJKsymbol:xn { \@@_to_unicode:n {#1} } {#1} }
 \cs_new_protected_nopar:Npn \@@_CJKsymbol:nn #1#2
   {
-    \@@_save_CJKsymbol:n {#2}
     \@@_make_pinyin_box:nnn {#1} {#2} { \use:c { c_@@_ #1 _tl } }
+    \@@_save_CJKsymbol:n {#2}
   }
 \cs_generate_variant:Nn \@@_CJKsymbol:nn { x }
 %    \end{macrocode}
@@ -633,6 +632,7 @@ and some specific Chinese Simplified fonts (TrueType or OpenType).
         \group_begin:
         \keys_set:nn { xpinyin } {#2}
         \settowidth \l_@@_CJKglue_dim { \CJKglue }
+        \leavevmode
         \@@_single_aux:nn {#3}
       }
   }
@@ -727,7 +727,7 @@ and some specific Chinese Simplified fonts (TrueType or OpenType).
 \cs_new_nopar:Npn \@@_UTF_to_unicode:n #1
   {
     \int_to_hexadecimal:n
-      { \exp_args:No \int_from_hexadecimal: { \CJK@plane } * "100 + #1 }
+      { \exp_args:No \int_from_hexadecimal:n { \CJK@plane } * "100 + #1 }
   }
 \cs_new_nopar:Npn \@@_UTFchar_to_unicode:n #1
   { \int_to_hexadecimal:n { \@@_UTF_viii_to_unicode:NNNw #1 \q_stop } }
@@ -757,10 +757,9 @@ and some specific Chinese Simplified fonts (TrueType or OpenType).
     \cs_new_eq:NN \@@_to_unicode:n       \@@_to_unicode_xetex:n
     \cs_new_eq:NN \@@_char_to_unicode:n  \@@_to_unicode:n
     \cs_new_eq:NN \@@_replace_CJKsymbol: \@@_replace_CJKsymbol_aux:
-    \cs_new_protected_nopar:Npn \@@_ignore_spaces:w { \xeCJK_ignore_spaces:w }
-    \cs_new_protected_nopar:Npn \@@_CJK_node: { \xeCJK_make_node:n { CJK } }
     \tl_gset:Nn \l_@@_coor_tl
       { (\cs_meaning:N \l_@@_font_tl)/\l_xeCJK_current_font_tl/\l_@@_ratio_tl }
+    \cs_new_eq:NN \@@_leavevmode: \prg_do_nothing:
     \cs_new_protected_nopar:Npn \@@_CJKsymbol_hook:
       { \makexeCJKinactive \xeCJK_select_font: }
     \cs_new_protected_nopar:Npn \@@_single_hook:n
@@ -783,9 +782,8 @@ and some specific Chinese Simplified fonts (TrueType or OpenType).
         \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:     \leavevmode
     \cs_new_eq:NN \@@_CJKsymbol_hook: \prg_do_nothing:
-    \cs_new_protected_nopar:Npn \@@_CJK_node: { \CJK@CJK }
-    \cs_new_protected_nopar:Npn \@@_ignore_spaces:w { \CJK@ignorespaces }
     \@ifpackageloaded { CJKpunct }
       { \@@_adjust_CJKpunct_hook: }
       {
-- 
cgit v1.2.3

