| 1 |
%% |
| 2 |
%% This is file `lwarp-xpinyin.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% lwarp.dtx (with options: `xpinyin') |
| 8 |
%% This is a generated file. |
| 9 |
%% Copyright 2016-2026 Brian Dunn |
| 10 |
%% |
| 11 |
%% This work may be distributed and/or modified under the |
| 12 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 13 |
%% of this license or (at your option) any later version. |
| 14 |
%% The latest version of this license is in |
| 15 |
%% http://www.latex-project.org/lppl.txt |
| 16 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 17 |
%% version 2005/12/01 or later. |
| 18 |
|
| 19 |
\LWR@ProvidesPackagePass{xpinyin}[2019-04-07] |
| 20 |
\ExplSyntaxOn |
| 21 |
\cs_new_protected_nopar:Npn \LWR@HTML@__xpinyin_make_pinyin_box:nnn #1#2#3 |
| 22 |
{ |
| 23 |
\color_group_begin: \color_ensure_current: |
| 24 |
\l__xpinyin_pinyin_box_hook_tl |
| 25 |
\renewcommand*{\l__xpinyin_ratio_tl}{1}% for pdftotext |
| 26 |
\__xpinyin_select_font: |
| 27 |
\clist_if_exist:cTF { c__xpinyin_multiple_ #1 _clist } |
| 28 |
{ \l__xpinyin_multiple_tl \l__xpinyin_format_tl } |
| 29 |
{ \l__xpinyin_format_tl } |
| 30 |
\ifdefempty{\l__xpinyin_format_tl} |
| 31 |
{#3} |
| 32 |
{\LWR@textcurrentcolor{#3}} |
| 33 |
\color_group_end: |
| 34 |
} |
| 35 |
\LWR@formatted{__xpinyin_make_pinyin_box:nnn} |
| 36 |
|
| 37 |
\cs_new_protected_nopar:Npn \LWR@HTML@__xpinyin_CJKsymbol:nn #1#2 |
| 38 |
{ |
| 39 |
\__xpinyin_leavevmode: |
| 40 |
\LWR@htmltagc{ruby} |
| 41 |
\__xpinyin_save_CJKsymbol:n {#2}\null% \null removes extra space |
| 42 |
\LWR@htmltagc{rp}(\LWR@htmltagc{/rp\space} |
| 43 |
\LWR@htmltagc{rt} |
| 44 |
\__xpinyin_make_pinyin_box:nnn {#1} {#2} { \use:c { c__xpinyin_ #1 _tl } } |
| 45 |
\LWR@htmltagc{/rt\space} |
| 46 |
\LWR@htmltagc{rp})\LWR@htmltagc{/rp\space} |
| 47 |
\LWR@htmltagc{/ruby\space}\null |
| 48 |
} |
| 49 |
\LWR@formatted{__xpinyin_CJKsymbol:nn} |
| 50 |
|
| 51 |
\cs_new_protected_nopar:Npn \LWR@HTML@__xpinyin_single_CJKsymbol:nn #1#2 |
| 52 |
{ |
| 53 |
\__xpinyin_leavevmode: |
| 54 |
\LWR@htmltagc{ruby} |
| 55 |
\__xpinyin_save_CJKsymbol:n {#1}\null% \null removes extra space |
| 56 |
\LWR@htmltagc{rp}(\LWR@htmltagc{/rp\space} |
| 57 |
\LWR@htmltagc{rt} |
| 58 |
\__xpinyin_make_pinyin_box:xnn |
| 59 |
{ \__xpinyin_to_unicode:n {#1} } {#1} { \__xpinyin_pinyin:n {#2} } |
| 60 |
\LWR@htmltagc{/rt\space} |
| 61 |
\LWR@htmltagc{rp})\LWR@htmltagc{/rp\space} |
| 62 |
\LWR@htmltagc{/ruby\space}\null |
| 63 |
} |
| 64 |
\LWR@formatted{__xpinyin_single_CJKsymbol:nn} |
| 65 |
|
| 66 |
\ExplSyntaxOff |
| 67 |
\renewcommand*{\LWR@disablepinyin}{\disablepinyin} |
| 68 |
|
| 69 |
\FilenameNullify{\LWR@disablepinyin} |
| 70 |
\endinput |
| 71 |
%% |
| 72 |
%% End of file `lwarp-xpinyin.sty'. |