| 1 |
%% |
| 2 |
%% This is file `xeCJK-example-mathblock.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% xeCJK.dtx (with options: `ex-mathblock') |
| 8 |
%% |
| 9 |
\documentclass{article} |
| 10 |
|
| 11 |
\usepackage{url} |
| 12 |
\usepackage[CJKmath]{xeCJK} |
| 13 |
|
| 14 |
\setCJKmainfont[BoldFont=SimHei]{SimSun} |
| 15 |
\setCJKmonofont{KaiTi} |
| 16 |
|
| 17 |
\ExplSyntaxOn |
| 18 |
\tl_const:Nn \c_test_text_tl { 天地玄黃宇宙洪荒日月盈昃辰宿列張寒來暑往秋收冬藏閏餘成歲律呂調陽 } |
| 19 |
\cs_new:Npn \test_color:n #1 |
| 20 |
{ \exp_args:No \str_range:nnn { \mdfivesum {#1} } { 1 } { 6 } } |
| 21 |
\tl_map_inline:Nn \c_test_text_tl |
| 22 |
{ |
| 23 |
\xeCJKDeclareSubCJKBlock {#1} { `#1 } |
| 24 |
\setCJKmainfont |
| 25 |
[ #1 , Color = \test_color:n {#1} , BoldFont = SimHei ] { SimSun } |
| 26 |
\setCJKmonofont [ #1 ] { KaiTi } |
| 27 |
} |
| 28 |
\cs_new_protected:Npn \TEST |
| 29 |
{ |
| 30 |
\exp_args:No \path { \c_test_text_tl } \par |
| 31 |
\c_test_text_tl \par |
| 32 |
$ \c_test_text_tl $ |
| 33 |
} |
| 34 |
\ExplSyntaxOff |
| 35 |
|
| 36 |
\begin{document} |
| 37 |
|
| 38 |
\TEST |
| 39 |
|
| 40 |
\bigskip |
| 41 |
|
| 42 |
\bfseries\mathversion{bold}\TEST |
| 43 |
|
| 44 |
\end{document} |
| 45 |
%% |
| 46 |
%% |
| 47 |
%% End of file `xeCJK-example-mathblock.tex'. |