% \iffalse meta-comment % % Copyright (C) 2017--2020 by Xiangdong Zeng <xdzeng96@gmail.com> % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either % version 1.3c of this license or (at your option) any later % version. The latest version of this license is in: % % http://www.latex-project.org/lppl.txt % % and version 1.3 or later is part of all distributions of % LaTeX version 2005/12/01 or later. % % This work has the LPPL maintenance status `maintained'. % % The Current Maintainer of this work is Xiangdong Zeng. % % This work consists of the files zhlipsum.dtx, % zhlipsum-text.dtx, % and the derived files zhlipsum.ins, % zhlipsum.sty, % zhlipsum-utf8.def, % zhlipsum-gbk.def, % zhlipsum-big5.def, % zhlipsum-en.tex, % zhlipsum.pdf, % zhlipsum-en.pdf, % and README.md. % %<*internal> \iffalse %</internal> % %<*readme> The `zhlipsum` package ====================== The `zhlipsum` package provides an interface to dummy text in Chinese language, which will be useful for testing Chinese documents. `zhlipsum` supports UTF-8, GBK and Big5 encodings. Basic usage ----------- \zhlipsum \zhlipsum*[1-5] \zhlipsum[6-10,18][name=trad] More information can be found in the package documentation [zhlipsum.pdf](http://mirror.ctan.org/macros/latex/contrib/zhlipsum/zhlipsum.pdf) (Chinese version) or [zhlipsum-en.pdf](http://mirror.ctan.org/macros/latex/contrib/zhlipsum/zhlipsum-en.pdf) (English version). Installation ------------ To install `zhlipsum`, you can use one of the following methods: - If you are running TeX Live, the simplest way is to run tlmgr install zhlipsum - Download [zhlipsum.tds.zip](http://mirror.ctan.org/install/macros/latex/contrib/zhlipsum.tds.zip) from CTAN, extract it in the root of one of your TDS trees, and update the filename database. Contributing ------------ [Issues](https://github.com/stone-zeng/zhlipsum/issues) and [pull requests](https://github.com/stone-zeng/zhlipsum/pulls) are always welcome. License ------- This work may be distributed and/or modified under the conditions of the [LaTeX Project Public License](http://www.latex-project.org/lppl.txt), either version 1.3c of this license or (at your option) any later version. ----- Copyright (C) 2017–2020 by Xiangdong Zeng <xdzeng96@gmail.com>. %</readme> % %<*internal> \fi \begingroup \def\NameOfLaTeXe{LaTeX2e} \expandafter\endgroup\ifx\NameOfLaTeXe\fmtname\else \csname fi\endcsname %</internal> % %<*install> \input ctxdocstrip.tex \keepsilent \preamble Copyright (C) 2017--2020 by Xiangdong Zeng <xdzeng96@gmail.com> This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or (at your option) any later version. The latest version of this license is in: http://www.latex-project.org/lppl.txt and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later. This work has the LPPL maintenance status `maintained'. The Current Maintainer of this work is Xiangdong Zeng. This work consists of the files zhlipsum.dtx, zhlipsum-text.dtx, and the derived files zhlipsum.ins, zhlipsum.sty, zhlipsum-utf8.def, zhlipsum-gbk.def, zhlipsum-big5.def, zhlipsum-en.tex, zhlipsum.pdf, zhlipsum-en.pdf, and README.md. \endpreamble \generate{ \usedir{tex/latex/zhlipsum} \file{\jobname.sty} {\from{\jobname.dtx}{package}} \file{\jobname-utf8.def} {\from{\jobname.dtx}{text,utf8} \from{\jobname-text.dtx}{text,utf8}} \file{\jobname-gbk.def} {\from{\jobname.dtx}{text,gbk} \from{\jobname-text.dtx}{text,gbk}} \file{\jobname-big5.def} {\from{\jobname.dtx}{text,big5} \from{\jobname-text.dtx}{text,big5}} %</install> %<*internal> \usedir{source/latex/zhlipsum} \file{\jobname.ins} {\from{\jobname.dtx}{install}} %</internal> %<*install> \usedir{doc/latex/zhlipsum} \nopreamble\nopostamble \file{README.md} {\from{\jobname.dtx}{readme}} } \obeyspaces \Msg{****************************************************} \Msg{* *} \Msg{* To finish the installation you have to move the *} \Msg{* following file into a directory searched by TeX: *} \Msg{* *} \Msg{* zhlipsum.sty *} \Msg{* zhlipsum-utf8.def *} \Msg{* zhlipsum-gbk.def *} \Msg{* zhlipsum-big5.def *} \Msg{* *} \Msg{* The recommended directory is *} \Msg{* TDS:tex/latex/zhlipsum *} \Msg{* *} \Msg{* To produce the documentation run the file *} \Msg{* zhlipsum.dtx through XeLaTeX. *} \Msg{* *} \Msg{* Happy TeXing! *} \Msg{* *} \Msg{****************************************************} \endbatchfile %</install> % %<*internal> \fi %</internal> % %<package>\NeedsTeXFormat{LaTeX2e} %<package>\RequirePackage{expl3} %<*!(driver|install)> %<!readme>\GetIdInfo $Id: zhlipsum.dtx 1.2.0 2020-04-10 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ %<package> {Chinese dummy text} %<package>\ProvidesExplPackage{\ExplFileName} %<utf8> {Chinese dummy text with UTF-8 encoding (for zhlipsum)} %<utf8>\ProvidesExplFile{\ExplFileName-utf8.def} %<gbk> {Chinese dummy text with GBK encoding (for zhlipsum)} %<gbk>\ProvidesExplFile{\ExplFileName-gbk.def} %<big5> {Chinese dummy text with Big5 encoding (for zhlipsum)} %<big5>\ProvidesExplFile{\ExplFileName-big5.def} %<!readme> {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} %</!(driver|install)> %<*driver> %^^A! \PassOptionsToPackage{scheme=plain, linespread=1.1}{ctex} %^^A+ \documentclass{ctxdoc} \usepackage{multirow} \setCJKmainfont{Source Han Serif SC}[ItalicFont=Kaiti SC] \setCJKmonofont{STFangsong}[ItalicFont=Kaiti SC] %^^A- \hypersetup{% pdftitle={zhlipsum: ���������������������Lorem ipsum���}, pdfauthor={���������}, bookmarksnumbered=true } %^^A! \hypersetup{% %^^A! pdftitle={zhlipsum: Chinese dummy text}, %^^A! pdfauthor={Xiangdong Zeng}, %^^A! bookmarksnumbered=true %^^A! } %^^A! \ctexset{% %^^A! section={name={}, format+=\raggedright}, %^^A! subsubsection/tocline={\CTEXnumberline{#1}#2} %^^A! } %^^A! \pagestyle{headings} %^^A+ % Use `!` for comment in `ctexexam`. \catcode`!=\active \RecustomVerbatimEnvironment{ctexexam}{Verbatim}{% frame=single, framesep=10pt, %^^A- gobble=4, label=\rule{0pt}{12pt}\textnormal{\bfseries ��� \arabic{ctexexam}}, defineactive=\def!{\color{gray}\%}, %^^A! gobble=2, %^^A! label=\rule{0pt}{12pt}\textnormal{\bfseries Example \arabic{ctexexam}}, %^^A! defineactive=\def!{\color{gray}\itshape\%}, %^^A+ listparameters=% \setlength\topsep{\bigskipamount}% \refstepcounter{ctexexam}\ctexexamlabelref} \preto\ctexexam{\catcode`!=\active} \preto\endctexexam{\catcode`!=12} \catcode`!=12 % Do not add hyperlink for `TF`, and do not change color. \ExplSyntaxOn \cs_set_protected:Npn \__codedoc_typeset_TF: { \group_begin: \exp_args:No \__codedoc_if_macro_internal:nT \l__codedoc_tmpa_tl { \color[gray]{0.5} } \itshape TF \makebox[0pt][r] { \color{red} \underline{\phantom{\itshape TF} \kern-0.1em} } \group_end: } \ExplSyntaxOff \makeatother \RenewDocumentEnvironment{arguments}{}% {\enumerate[label={\texttt{\#\arabic*:~}}, leftmargin=2em, labelsep=0pt, nolistsep]}% {\endenumerate} %^^A- \def\IndexLayout{% \newgeometry{hmargin=1.00in, vmargin={1.25in, 1.00in}}% \ctexset{section/numbering=false}% \StopSpecialIndexModule} \DoNotIndex{\\} \begin{document} \DocInput{\jobname.dtx} \IndexLayout \PrintChanges \PrintIndex \end{document} %</driver> % \fi % % \changes{v0.1}{2017/04/08}{���������������������} % \changes{v0.2}{2017/04/14}{������ \pkg{kantlipsum} ��������������� % ������������������������} % \changes{v0.2}{2017/04/14}{���������������������} % \changes{v0.4}{2017/09/16}{���������������������������������������������} % \changes{v0.4}{2017/09/16}{���������������������} % \changes{v0.5}{2018/01/06}{������������������������������} % \changes{v1.1.1}{2018/09/08}{���������������������������������������������������������} % % \CheckSum{0} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z % Digits \0\1\2\3\4\5\6\7\8\9 % Exclamation \! Double quote \" Hash (number) \# % Dollar \$ Percent \% Ampersand \& % Acute accent \' Left paren \( Right paren \) % Asterisk \* Plus \+ Comma \, % Minus \- Point \. Solidus \/ % Colon \: Semicolon \; Less than \< % Equals \= Greater than \> Question mark \? % Commercial at \@ Left bracket \[ Backslash \\ % Right bracket \] Circumflex \^ Underscore \_ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % % \title{\textbf{zhlipsum: ���������������������Lorem ipsum���}} % \author{���������} % \date{2020/04/10 \quad v1.2.0^^A % \thanks{\url{https://github.com/stone-zeng/zhlipsum}.}} %^^A! \title{\textbf{The \pkg{zhlipsum} Package: Chinese Dummy Text}} %^^A! \author{Xiangdong Zeng} %^^A! \date{2020/04/10 \quad v1.2.0% %^^A! \thanks{\url{https://github.com/stone-zeng/zhlipsum}.}} %^^A! % %^^A ������������������ % \newgeometry{hmargin={1.25in, 1.25in}, vmargin={1.25in, 1.00in}} % %^^A! \begin{document} %^^A! % % \maketitle % % \begin{minipage}{0.9\textwidth} % \small \itshape % \mbox{} \par \mbox{} \par % \qquad ������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ����������������������������������������������������������������������������������������������������� % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ������������������������������������������������������������������������������������������������������ % ��������������������������������������������������������������������������������������������������� % ��������������������������������������������������������������������������������� % \end{minipage} % % \begin{flushright} % \small \itshape �������������������������������������������� % \end{flushright} % %^^A ������������������������ %^^A+ % \newgeometry{% % hmargin={2.0in, 0.8in}, % vmargin={1.2in, 1.0in}, % marginpar=1.8in % } %^^A- %^^A! % %^^A! \maketitle %^^A! % % \section{������} %^^A! \section{Introduction} %^^A! % % \pkg{zhlipsum} ��������������������������������������������������� \emph{Lorem % ipsum}������������������������������������������������������������������������������������������ % ��������������������������������� \pkg{lipsum}���\pkg{kantlipsum}��� % \pkg{blindtext} ������ %^^A! The \pkg{zhlipsum} package is used for typesetting dummy text %^^A! (i.e.\ ``\emph{Lorem ipsum}'') as \pkg{lipsum}, %^^A! \pkg{kantlipsum}, \pkg{blindtext} etc., but for Chinese %^^A! language. Dummy text will be pretty useful, for example, when %^^A! testing fonts or page styles. %^^A! % % \pkg{zhlipsum} ������������ UTF-8���GBK ��� Big5 ��������������� \LaTeX3{} ������ % ������ \pkg{expl3}���\pkg{xparse} ��� \pkg{l3keys2e} ��������������������������� % ������\pkg{zhlipsum} ��������� \pkg{CJK} ��������� \CTeX{} ������������������������ %^^A! \pkg{zhlipsum} supports UTF-8, GBK and Big5 encodings. Packages %^^A! \pkg{expl3}, \pkg{xparse} and \pkg{l3keys2e} in the \LaTeX3{} %^^A! Project are required. To typeset Chinese properly, \pkg{zhlipsum} %^^A! should be used with \pkg{CJK} package or \CTeX{} bundle. %^^A! % % \section{������������} \label{sec:user-guide} %^^A! \section{User's guide} \label{sec:user-guide} %^^A! % %^^A+ % \begin{function}[added=2017-09-16,updated=2018-04-01]{encoding} % \begin{syntax} % encoding = <(utf8)|gbk|big5> % \end{syntax} %^^A- % ��������������������������������������������������������������������������������� % \opt{utf8}��������� \XeLaTeX{}���\LuaLaTeX{} ��� \upLaTeX{} ��� Unicode % ���������\opt{gbk} ��� \opt{big5} ������������������������������������ \opt{utf8} % ��������� % \end{function} %^^A! Package option for selecting encoding. Default value is %^^A! \opt{utf8}. For Unicode engines as \XeLaTeX{}, \LuaLaTeX{} and %^^A! \upLaTeX{}, \opt{gbk} / \opt{big5} encodings are invalid and %^^A! \opt{utf8} will be used forcibly. %^^A! \end{function} %^^A! % % ��������������� \CTeX{} ��������������������������� \CTeX{} ������������������������������ % ��� \CTeX{} ��������������������������������������������� \opt{UTF8} ��� \opt{GBK}��� % ������������������������������������������ %^^A! If you have loaded \CTeX{} bundle, then the encoding will be %^^A! selected automatically according to \CTeX{}. Note that in \CTeX{} %^^A! bundle, the correspoding options are \opt{UTF8} and \opt{GBK}, %^^A! while the options in \pkg{zhlipsum} are all in \emph{lowercase}. %^^A! % %^^A+ % \begin{function}[updated=2020-04-08]{\zhlipsum} %^^A- % \begin{syntax} % \cs{zhlipsum}\oarg{������}\oarg{������} % \cs{zhlipsum}*\oarg{������}\oarg{������} % \end{syntax} % ��������������������������� \meta{������} ��� \meta{������} ��������������������������� % ��������������������������������� % \end{function} %^^A! \begin{syntax} %^^A! \cs{zhlipsum}\oarg{paragraph}\oarg{options} %^^A! \cs{zhlipsum*}\oarg{paragraph}\oarg{options} %^^A! \end{syntax} %^^A! Produce dummy text. Both arguments \meta{paragraph} and %^^A! \meta{options} are optional. Note that spaces are not allowed %^^A! between the arguments. %^^A! \end{function} %^^A! % % ��������������������������������������� \cs{zhlipsum} ��������������������������������� % ������������������������ \tn{par}��������������������������� \cs{zhlipsum}|*| % ������������������������������������������������������ \opt{before}���\opt{after}��� % \opt{inter} ������������������������������ %^^A! By default, the \cs{zhlipsum} command will insert \tn{par} %^^A! after and between dummy text paragraphs, while \cs{zhlipsum}|*| %^^A! will not give any extra processing. To change the default %^^A! behavior, you can use the \opt{before}, \opt{after} and %^^A! \opt{inter} options described below. %^^A! % % ��������������������� \meta{������} ������������������������������������������������������������ %^^A! The first optional argument \meta{paragraph} should be a comma %^^A! list. It can be specified as the following: %^^A! % % \begin{ctexexam} % ! ������������������������������ 50 % \zhlipsum[2-4] ! ������ a-b ��������������� % \zhlipsum[4,12,3-8] ! ��������������������������� % \zhlipsum[-10,40-] ! ������ 1-10 ������ 40-50 ��� % \zhlipsum[-] ! ������������������������ 1-50 ��� % \zhlipsum ! ������������ 1-3 ��� % \zhlipsum[48-52] ! ������������������������������������������ 48-50 ��� % \end{ctexexam} %^^A! \begin{ctexexam} %^^A! ! Suppose the dummy text has 50 paragraphs. %^^A! \zhlipsum[2-4] ! Can be specified as a-b %^^A! \zhlipsum[4,12,3-8] ! A single number is also acceptable %^^A! \zhlipsum[-10,40-] ! Produce paragraphs 1-10 and 40-50 %^^A! \zhlipsum[-] ! Produce all paragraphs, i.e. 1-50 %^^A! \zhlipsum ! Default value is 1-3 %^^A! \zhlipsum[48-52] ! Numbers larger than 50 will not be considered %^^A! ! i.e. only paragraphs 48-50 are produced %^^A! \end{ctexexam} %^^A! % % ��������������������� \meta{������} ������������������������������������������������������ % ������������������������ %^^A! The second optional argument \meta{options} should be a %^^A! key-value list. Supported options are the listed below. %^^A! % %^^A+ % \begin{function}[added=2018-03-24]{name} %^^A- % \begin{syntax} % name = \meta{������������} % \end{syntax} % ������������������������������������������������������ 6 ������������~^^A % \ref{tab:pre-defined-dummy-text}������ |encoding=utf8| ��� |gbk| ������ % ������������������������ |simp|��������� |encoding=big5| ������������������ |trad|��� % \end{function} %^^A! \begin{syntax} %^^A! name = \meta{name} %^^A! \end{syntax} %^^A! Select the name of the dummy text. There are 6 pre-defined %^^A! dummy texts described in table~\ref{tab:pre-defined-dummy-text}. %^^A! The default text is |simp| when |encoding=utf8| or |gbk|, but %^^A! |trad| when |encoding=big5|. %^^A! \end{function} %^^A! % %^^A+ % \begingroup % \def\B{\bullet} % \def\M#1{\multirow{2}*{\textbf{#1}}} % \def\T#1{\textbf{#1}} % \begin{table}[htb] %^^A- % \caption{���������������} \label{tab:pre-defined-dummy-text} % \centering\small % \begin{tabular}{cccccccc} % \toprule % \M{������} & \M{���������} & \M{������ / ������} & \M{������} & % \multicolumn{3}{c}{\T{���������������������������}} \\ % & & & & |utf8| & |gbk| & |big5| \\ % \midrule % |simp| & 50 & ��� & ��������������������� & \B & \B & \\ % |trad| & 50 & ��� & ��������������������� & \B & \B & \B \\ % |nanshanjing| & 43 & ��� & �������������������������� & \B & & \\ % |xiangyu| & 45 & ��� & ����������������������������������� & \B & \B & \B \\ % |zhufu| & 110 & ��� & ������������������ & \B & \B & \\ % |aspirin| & 66 & ��� & ��������������������������������� & \B & \B & \\ % \bottomrule % \end{tabular} % \end{table} % \endgroup %^^A! \caption{Pre-defined dummy texts} \label{tab:pre-defined-dummy-text} %^^A! \centering\scriptsize %^^A! \begin{tabular}{cccccccc} %^^A! \toprule %^^A! \M{Name} & \T{Paragraph} & \T{Simplified /} & \M{Description} & %^^A! \multicolumn{3}{c}{\T{Encodings' support}} \\ %^^A! & \T{numbers} & \T{traditional} & & |utf8| & |gbk| & |big5| \\ %^^A! \midrule %^^A! |simp| & 50 & S & Random dummy text & \B & \B & \\ %^^A! |trad| & 50 & T & Random dummy text & \B & \B & \B \\ %^^A! |nanshanjing| & 43 & T & \emph{Shanhaijing: Nanshanjing} & \B & & \\ %^^A! |xiangyu| & 45 & T & \emph{Shiji: Xiang Yu Benji} by Sima Qian & \B & \B & \B \\ %^^A! |zhufu| & 110 & S & \emph{Zhufu} by Lu Xun & \B & \B & \\ %^^A! |aspirin| & 66 & S & Wikipedia: \emph{Aspirin} & \B & \B & \\ %^^A! \bottomrule %^^A! \end{tabular} %^^A! \end{table} %^^A! \endgroup %^^A! % % ������������������ \cs{newzhlipsum} ������������������������������ %^^A! You can use \cs{newzhlipsum} command to define new dummy text %^^A! as well. %^^A! % %^^A+ % \begin{function}[added=2018-03-29]{before,after,inter} %^^A- % \begin{syntax} % before = \meta{������} % after = \meta{������} % inter = \meta{������} % \end{syntax} % ��������������������������������������������������������������������������������� % \cs{zhlipsum} ������������������������������������������������������������ % \end{function} %^^A! \begin{syntax} %^^A! before = \meta{content} %^^A! after = \meta{content} %^^A! inter = \meta{content} %^^A! \end{syntax} %^^A! Insert contents before, after or between dummy text paragraphs. %^^A! Note that the \tn{par} command inserted when using \cs{zhlipsum} %^^A! will be overridden by the settings here. %^^A! \end{function} %^^A! % % \pagebreak[3] % %^^A+ % \begin{function}[added=2018-03-29]{\newzhlipsum} %^^A- % \begin{syntax} % \cs{newzhlipsum}\Arg{������������}\Arg{������������} % \end{syntax} % ������������������������������������������������������������������������������������������������������ % \end{function} %^^A! \begin{syntax} %^^A! \cs{newzhlipsum}\Arg{name}\Arg{paragraphs list} %^^A! \end{syntax} %^^A! Declare new dummy text. The \meta{name} is case sensitive and %^^A! the \meta{paragraphs list} is a comma list. An example is %^^A! shown below: %^^A! \end{function} %^^A! % % \begin{ctexexam} % ! ��������������������������������������� % \newzhlipsum{jingyesi}{! % {������������������}, {������������������}, {������������������}, {������������������}} % % \zhlipsum*[-][name=jingyesi] ! ��������������������������������������� % \end{ctexexam} %^^A! \begin{ctexexam} %^^A! ! Fullwidth comma `���' is used in Chinese language. %^^A! ! Normal comma `,' is used as separator. %^^A! \newzhlipsum{jingyesi}{! %^^A! {������������������}, {������������������}, {������������������}, {������������������}} %^^A! %^^A! \zhlipsum*[-][name=jingyesi] ! Print all the four sentences without `\par' %^^A! \end{ctexexam} %^^A! % % \section{������������} %^^A! \section{Programming interface} %^^A! % % ������������������~\ref{sec:user-guide} ������������������������������������������������ % ������������������������������������������������������������������������������������������������ % \LaTeX3 ��������� %^^A! Usually, the commands provided in section~\ref{sec:user-guide} %^^A! are sufficient for users. For programmers professional users, %^^A! however, the programming interface is also necessary and provided %^^A! here. \LaTeX3 syntax should be opened when using them. %^^A! % % %^^A+ % \begin{variable}{\g_zhlipsum_seq} %^^A- % ��������������������� %\end{variable} %^^A! A sequence of dummy text names. %^^A! \end{variable} %^^A! % %^^A+ % \begin{function}{\zhlipsum_use:nn} %^^A- % ��������������������� % \begin{arguments} % \item ������������ % \item ������������������ % \end{arguments} % \end{function} %^^A! Produce some dummy text paragraphs. %^^A! \begin{arguments} %^^A! \item Name %^^A! \item Comma list of aragraph numbers. %^^A! \end{arguments} %^^A! \end{function} %^^A! % %^^A+ % \begin{function}[TF]{\zhlipsum_if_exist:n} %^^A- % ������������������������������������������ % \begin{arguments} % \item ������������ % \end{arguments} % \end{function} %^^A! Test whether the name has been used for dummy text��� %^^A! \begin{arguments} %^^A! \item Name %^^A! \end{arguments} %^^A! \end{function} %^^A! % %^^A+ % \begin{function}{\zhlipsum_new:nn} %^^A- % ��������������� % \begin{arguments} % \item ������������ % \item ������������ % \end{arguments} % \end{function} %^^A! Declare dummy text. %^^A! \begin{arguments} %^^A! \item Name. %^^A! \item Comma list of texts. %^^A! \end{arguments} %^^A! \end{function} %^^A! % % \section{���������������} %^^A! \section{Compatibility information} %^^A! % % ������������������������ \pkg{zhlipsum} ������������������������ 1.0.0 ��������������� % ��������������������������������������������������������������������������������������������� %^^A! The following option exists in the beta version of \pkg{zhlipsum} %^^A! package, but has become deprecated after version 1.0.0. It is %^^A! reserved only for compatibility and may be removed in the future. %^^A! % % \begin{function}{script} % ������������������������������ \opt{name}��� % \end{function} %^^A! \begin{function}{script} %^^A! Deprecated option. Now it's the same as \opt{name}. %^^A! \end{function} %^^A! % % \section{������������} %^^A! \section{Known issues} %^^A! % % ��������� |nanshanjing| ��� |xiangyu| ��������������������������������������������������� % ������������������ \pkg{xeCJK} ��������������������������������� SimSun-ExtB���Hanazono % Mincho ��������������������������������������������� \pkg{xeCJK} ������������������������ % ��������� UTF-8������������ \XeLaTeX{} ��������������������� %^^A! Dummy text |nanshanjing| and |xiangyu| have some rarely used %^^A! characters. To display them correctly, you can use the \pkg{xeCJK} %^^A! package and set SimSun-ExtB or Hanazono Mincho as the fallback %^^A! font. Refer to the \pkg{xeCJK}'s user guide for specific methods %^^A! (only for UTF-8 encoding and \XeLaTeX{} engine). %^^A! % % GBK ��� Big5 ������������������������������������ ASCII ������������������������������������ % ��������������������������� ASCII ������������������������������������ |{|���|}|���|\| % ������������������������������������������������������������������ \file{.def} ��������������� %���������������������~\ref{subsec:dummy-text} ������������������������������������������ %^^A! GBK and Big5 encodings do not escape the ASCII range in the %^^A! second byte, so the second byte of some Chinese characters may %^^A! have the same encoding as special characters in ASCII like |{|, %^^A! |}|, |\| etc., which will lead to compilation failure. The %^^A! \file{.def} files in \pkg{zhlipsum} are created with special %^^A! techniques. Please do not modify them. %^^A! % % ������������������������������������������ UTF-8 ������������������ \XeLaTeX{}��� % \LuaLaTeX{} ��� Unicode ��������������� %^^A! If there is no special requirement, UTF-8 encoding and Unicode %^^A! engines as \XeLaTeX{} and \LuaLaTeX{} are always recommended. %^^A! % % ��������������������������������������� GBK ��� Big5 ��������������������������������������� % ��������������������������������������������������� %^^A! In special cases, if you must use GBK or Big5 encoding and need %^^A! to declare new dummy text, the following method can be taken in %^^A! order to avoid the problem temporarily. %^^A! % % \begin{ctexexam} % ! ��������������������� Big5 % ! \usepackage[encoding=big5]{zhlipsum} % % ! ������������ \newzhlipsum{big5}{���������, ���������, ���������} ��������� % ! ������������������������ < > + ������ { } \ ��������������������� { } \ ��������������������������� % ! ������������ 12��� % \begingroup % \catcode`\<=1 % \catcode`\>=2 % \catcode`\+=0 % \catcode`\{=12 % \catcode`\}=12 % \catcode`\\=12 % +newzhlipsum<big5><���������, ���������, ���������> % +endgroup % \zhlipsum[name=big5] % \end{ctexexam} %^^A! \begin{ctexexam} %^^A! ! File encoding should be Big5. %^^A! ! \usepackage[encoding=big5]{zhlipsum} %^^A! %^^A! ! Using `\newzhlipsum{big5}{���������, ���������, ���������}' directly will %^^A! ! lead to an error. %^^A! ! Use <, >, + to replace {, } and \, then set the original {, } and \ %^^A! ! to be `other' category (i.e. catcode=12). %^^A! \begingroup %^^A! \catcode`\<=1 %^^A! \catcode`\>=2 %^^A! \catcode`\+=0 %^^A! \catcode`\{=12 %^^A! \catcode`\}=12 %^^A! \catcode`\\=12 %^^A! +newzhlipsum<big5><���������, ���������, ���������> %^^A! +endgroup %^^A! \zhlipsum[name=big5] %^^A! \end{ctexexam} %^^A! % %^^A! \end{document} % % \StopEventually{} % % \begin{implementation} % % \section{������������} % % \begin{macrocode} %<*package> %<@@=zhlipsum> % \end{macrocode} % % ������ \LaTeX3 ��������������� % \begin{macrocode} \RequirePackage { xparse, l3keys2e } \msg_new:nnn { zhlipsum } { l3-too-old } { Package~ "#1"~ is~ too~ old. \\\\ Please~ update~ an~ up-to-date~ version~ of~ the~ bundles \\ "l3kernel"~ and~ "l3packages"~ using~ your~ TeX~ package \\ manager~ or~ from~ CTAN. } \clist_map_inline:nn { expl3, xparse, l3keys2e } { \@ifpackagelater {#1} { 2018/05/12 } { } { \msg_error:nnn { zhlipsum } { l3-too-old } {#1} } } % \end{macrocode} % % \subsection{���������������������} % % \begin{variable}{ % \l_@@_tmpa_tl, % \l_@@_tmpa_seq, % \l_@@_tmpb_seq, % \l_@@_tmpa_str} % ��������������� % \begin{macrocode} \tl_new:N \l_@@_tmpa_tl \seq_new:N \l_@@_tmpa_seq \seq_new:N \l_@@_tmpb_seq \str_new:N \l_@@_tmpa_str % \end{macrocode} % \end{variable} % % \begin{variable}{\g_zhlipsum_seq} % ��������������������� % \begin{macrocode} \seq_new:N \g_zhlipsum_seq % \end{macrocode} % \end{variable} % % \begin{variable}{\c_zhlipsum_simp_seq,\c_zhlipsum_trad_seq} % ��������������������������������������������������������������� % \begin{macrocode} \seq_const_from_clist:Nn \c_zhlipsum_simp_seq { simp, zhufu, aspirin } \seq_const_from_clist:Nn \c_zhlipsum_trad_seq { trad, xiangyu, nanshanjing } % \end{macrocode} % \end{variable} % % \begin{macro}[int]{\file_input:x} % \LaTeX3 ��������������� % \begin{macrocode} \cs_generate_variant:Nn \file_input:n { x } % \end{macrocode} % \end{macro} % % \begin{macro}[TF]{\@@_if_unicode_engine:} % ��������������� Unicode ������������������ \pkg{zhnumber} ��������� % \begin{macrocode} \prg_new_conditional:Npnn \@@_if_unicode_engine: { T, F, TF } { \bool_lazy_any:nTF { \sys_if_engine_xetex_p: \sys_if_engine_luatex_p: \sys_if_engine_uptex_p: } { \prg_return_true: } { \prg_return_false: } } % \end{macrocode} % \end{macro} % % \begin{macro}[TF]{\@@_if_encoding:n} % \begin{variable}{\g_@@_encoding_str} % ��������������������� % \begin{macrocode} \prg_new_conditional:Npnn \@@_if_encoding:n #1 { T, F, TF } { \str_if_eq:VnTF \g_@@_encoding_str {#1} { \prg_return_true: } { \prg_return_false: } } \prg_generate_conditional_variant:Nnn \@@_if_encoding:n { V } { T, F, TF } \str_new:N \g_@@_encoding_str % \end{macrocode} % \end{variable} % \end{macro} % % \begin{macro}{ % \@@_msg_new:nn, % \@@_error:n, % \@@_error:nn, % \@@_warning:n, % \@@_warning:nn, % \@@_warning:nnn, % \@@_warning:nxxx, % \@@_info:nn} % ������������������������������������ % \begin{macrocode} \cs_new:Npn \@@_msg_new:nn { \msg_new:nnn { zhlipsum } } \cs_new:Npn \@@_error:n { \msg_error:nn { zhlipsum } } \cs_new:Npn \@@_error:nn { \msg_error:nnn { zhlipsum } } \cs_new:Npn \@@_warning:n { \msg_warning:nn { zhlipsum } } \cs_new:Npn \@@_warning:nn { \msg_warning:nnn { zhlipsum } } \cs_new:Npn \@@_warning:nnn { \msg_warning:nnnn { zhlipsum } } \cs_new:Npn \@@_warning:nxxx { \msg_warning:nnxxx { zhlipsum } } \cs_new:Npn \@@_info:nn { \msg_info:nnn { zhlipsum } } % \end{macrocode} % \end{macro} % % \subsection{������������} % % \changes{v0.4}{2017/09/16}{������ \opt{encoding} ���������} % \changes{v0.5}{2017/12/22}{������ Big5 ���������} % \changes{v1.0.0}{2018/04/01}{������ \CTeX{} ������������������������������������} % \changes{v1.2.0}{2020/02/20}{���������������������} % % \begin{macro}{encoding} % ��������������� % \begin{macrocode} \keys_define:nn { zhlipsum / option } { encoding .choices:nn = { utf8, gbk, big5 } { \str_gset:Nn \g_@@_encoding_str {#1} }, encoding / unknown .code:n = { \@@_error:nn { invalid-encoding } {#1} }, encoding .value_required:n = true, % \end{macrocode} % \end{macro} % % ��������������������� % \begin{macrocode} unknown .code:n = { \@@_error:n { unknown-option } } } % \end{macrocode} % % ��������������� % \begin{macrocode} \@@_msg_new:nn { invalid-encoding } { Encoding~"#1"~is~invalid. \\ Available~encodings~are~"utf8",~"gbk"~and~"big5". } \@@_msg_new:nn { unknown-option } { Package~option~'\l_keys_key_tl'~is~unknown. } % \end{macrocode} % % \begin{macro}{\@@_check_unicode_engine_encoding:} % Unicode ��������������������������� UTF-8��� % \begin{macrocode} \cs_new_protected:Npn \@@_check_unicode_engine_encoding: { \@@_if_unicode_engine:T { \str_if_empty:NF \g_@@_encoding_str { \@@_if_encoding:nF { utf8 } { \@@_warning:n { unicode-engine } } } \str_gset:Nn \g_@@_encoding_str { utf8 } } } \@@_msg_new:nn { unicode-engine } { You~are~now~using~Unicode~engine~\c_sys_engine_str\c_space_tl~so~ encoding~"\g_@@_encoding_str"~is~invalid. \\ Changed~into~"utf8". } % \end{macrocode} % \end{macro} % % \begin{macro}{\@@_check_ctex_encoding:} % ��������������� \CTeX{} ��������������������������������� % \begin{macrocode} \cs_new_protected:Npn \@@_check_ctex_encoding: { \tl_if_exist:NT \l__ctex_encoding_tl { \str_set:Nx \l_@@_tmpa_str { \str_lower_case:f { \l__ctex_encoding_tl } } \str_if_empty:NF \g_@@_encoding_str { \@@_if_encoding:VF \l_@@_tmpa_str { \@@_warning:n { ctex-encoding-conflict } } } \str_gset_eq:NN \g_@@_encoding_str \l_@@_tmpa_str } } \@@_msg_new:nn { ctex-encoding-conflict } { Package~option~"encoding=\g_@@_encoding_str"~is~in~conflict~with~ ctex's~option~"\l__ctex_encoding_tl". \\ Changed~into~"encoding=\l_@@_tmpa_str". } % \end{macrocode} % \end{macro} % % ��������������������� |zhlipsum/option|��� % \begin{macrocode} \ProcessKeysOptions { zhlipsum / option } % \end{macrocode} % % ������������������������ % \begin{macrocode} \@@_check_unicode_engine_encoding: \@@_check_ctex_encoding: \str_if_empty:NT \g_@@_encoding_str { \str_gset:Nn \g_@@_encoding_str { utf8 } } % \end{macrocode} % % \subsection{������������} % % \begin{variable}{\l_@@_name_tl} % ��������������������� % \begin{macrocode} \tl_new:N \l_@@_name_tl % \end{macrocode} % \end{variable} % % \begin{variable}{\l_@@_before_tl,\l_@@_after_tl,\l_@@_inter_tl} % ������������������������������������������������������ % \begin{macrocode} \tl_new:N \l_@@_before_tl \tl_new:N \l_@@_after_tl \tl_new:N \l_@@_inter_tl % \end{macrocode} % \end{variable} % % \begin{macrocode} \keys_define:nn { zhlipsum } { % \end{macrocode} % % \changes{v1.0.0}{2018/03/24}{������������ \opt{name}���} % % \begin{macro}{name} % ���������������Big5 ������������������������������ % \begin{macrocode} name .code:n = { \tl_set:Nn \l_@@_name_tl {#1} \@@_if_encoding:nT { big5 } { \seq_if_in:NVT \c_zhlipsum_simp_seq \l_@@_name_tl { \@@_warning:nn { big5-require-trad } {#1} \tl_set:Nn \l_@@_name_tl { trad } } } }, % \end{macrocode} % \end{macro} % % \changes{v0.5}{2017/12/22}{������������ \opt{script}���������������������������������������������} % \changes{v1.0.0}{2018/03/24}{\opt{script} ���������������������} % % \begin{macro}{script} % ��������������������������������������������������������� % \begin{macrocode} script .code:n = { \@@_warning:nn { deprecated-option } { Option~ "name=#1"~ will~ be~ set. } \keys_set:nn { zhlipsum } { name = #1 } }, % \end{macrocode} % \end{macro} % % \changes{v1.0.0}{2018/03/23}{������������ \opt{before}���\opt{after}���} % \changes{v1.0.0}{2018/03/29}{������������ \opt{inter}���} % % \begin{macro}{before,after,inter} % ������������������������������������������������ % \begin{macrocode} before .tl_set:N = \l_@@_before_tl, after .tl_set:N = \l_@@_after_tl, inter .tl_set:N = \l_@@_inter_tl } % \end{macrocode} % \end{macro} % % ��������������� % \begin{macrocode} \@@_msg_new:nn { big5-require-trad } { Name~ "#1"~ is~ not~ available~ in~ "Big5"~ encoding. \\ Changed~ into~ "trad". } \@@_msg_new:nn { deprecated-option } { Option~ "\l_keys_key_tl"~ is~ deprecated. \\ #1 } % \end{macrocode} % % ��������������������� % \begin{macrocode} \@@_if_encoding:nTF { big5 } { \keys_set:nn { zhlipsum } { name = trad } } { \keys_set:nn { zhlipsum } { name = simp } } % \end{macrocode} % % \subsection{������������} % % \begin{macro}{\zhlipsum,\@@:n} % \changes{v0.5}{2018/01/05}{���������������������} % \changes{v1.0.0}{2018/03/23}{������������������������������������������������������������������} % \changes{v1.1.0}{2018/04/08}{������������������������������������������������} % \changes{v1.2.0}{2020/04/08}{������ \env{quote}/\env{quotation} ���������������������������������������} % \changes{v1.2.0}{2020/04/08}{��� \pkg{lipsum} ���������������������������������������������������������} % ��������������������������������������������������������������� |1-3|������������������������������������������ % \begin{macrocode} \NewDocumentCommand \zhlipsum { s o +o } { \group_begin: \IfBooleanF {#1} { \tl_set:Nn \l_@@_before_tl { } \tl_set:Nn \l_@@_after_tl { \par } \tl_set:Nn \l_@@_inter_tl { \par } } \IfValueTF {#3} { \keys_set:nn { zhlipsum } {#3} \@@:n {#2} } { \IfValueTF {#2} { % \end{macrocode} % ������������������������������������������������������ |=| ��������������������������������������������������� % \begin{macrocode} \@@_if_key_value_list:nTF {#2} { \keys_set:nn { zhlipsum } {#2} \@@:n { 1 - 3 } } { \@@:n {#2} } } { \@@:n { 1 - 3 } } } \group_end: } \cs_new_protected:Npn \@@:n #1 { \exp_args:No \zhlipsum_use:nn { \l_@@_name_tl } {#1} } % \end{macrocode} % \end{macro} % % \begin{macro}{\@@_if_key_value_list:nTF} % ��������������������������������������������� |=|��� % \begin{macrocode} \cs_new_protected:Npn \@@_if_key_value_list:nTF #1 { \tl_if_in:nnTF {#1} {=} } % \end{macrocode} % \end{macro} % % \begin{variable}{\l_@@_par_num_seq} % ��������������������� % \begin{macrocode} \seq_new:N \l_@@_par_num_seq % \end{macrocode} % \end{variable} % % \begin{macro}{\zhlipsum_use:nn} % \changes{v1.2.0}{2019/08/11}{������������������������������������������������} % ���������������������|#1| = ���������������|#2| = ������������������������������������������ % ������������������������������������������������������������������������������������������������������ % \begin{macrocode} \cs_new_protected:Npn \zhlipsum_use:nn #1#2 { \@@_if_cjk_valid_encoding:TF { \zhlipsum_if_exist:nTF {#1} { \@@_parse_par:nn {#1} {#2} \seq_if_empty:NF \l_@@_par_num_seq { \seq_pop_right:NN \l_@@_par_num_seq \l_@@_tmpa_tl \l_@@_before_tl \seq_map_inline:Nn \l_@@_par_num_seq { \@@_use:nn {#1} {##1} \l_@@_inter_tl } \@@_use:nn {#1} { \l_@@_tmpa_tl } \l_@@_after_tl } } { \@@_error:nn { invalid-name } {#1} } } { \@@_error:n { CJK-invalid-encoding } } } \@@_msg_new:nn { invalid-name } { Name~ "#1"~ is~ unknown. \\ Please~ use~ the~ pre-defined~ Chinese~ dummy~ texts~ or~ declare~ new~ one. } \@@_msg_new:nn { CJK-invalid-encoding } { The~ current~ CJK~ environment~ uses~ "\CJK@@@@@enc"~ encoding,~ but~ zhlipsum~ package~ has~ been~ loaded~ with~ the~ option~ "encoding=\g_@@_encoding_str". \\ Please~ check~ the~ package~ options. } % \end{macrocode} % \end{macro} % % \begin{macro}[TF]{\@@_if_cjk_valid_encoding:} % ������ \env{CJK} ��������������� % \begin{macrocode} \prg_new_protected_conditional:Npnn \@@_if_cjk_valid_encoding: { TF } { \tl_if_exist:NTF \CJK@@@@@enc { \exp_args:NV \str_case:nn \g_@@_encoding_str { { utf8 } { \str_if_eq:VnTF \CJK@@@@@enc { UTF8 } } { gbk } { \str_if_in:NnTF \CJK@@@@@enc { GB } } { big5 } { \str_if_eq:VnTF \CJK@@@@@enc { Bg5 } } } { \prg_return_true: } { \prg_return_false: } } { \prg_return_true: } } % \end{macrocode} % \end{macro} % % \begin{macro}[TF]{\zhlipsum_if_exist:n} % ������������������������������������������ % \begin{macrocode} \prg_new_protected_conditional:Npnn \zhlipsum_if_exist:n #1 { T, F, TF } { \seq_if_in:NnTF \g_zhlipsum_seq {#1} { \prg_return_true: } { \prg_return_false: } } % \end{macrocode} % \end{macro} % % \begin{variable}{\l_@@_begin_int,\l_@@_end_int,\l_@@_max_int} % \begin{macrocode} \int_new:N \l_@@_begin_int \int_new:N \l_@@_end_int \int_new:N \l_@@_max_int % \end{macrocode} % \end{variable} % % \begin{variable}{\l_@@_modified_range_bool,\l_@@_invalid_range_bool} % \begin{macrocode} \bool_new:N \l_@@_modified_range_bool \bool_new:N \l_@@_invalid_range_bool % \end{macrocode} % \end{variable} % % \begin{macro}{\@@_parse_par:nn} % ���������������������������|#1| = ���������������|#2| = ��������������������� % % ��������������������������������������������������������������������� |a-b| ��������������� % |a|���|b| ������������������������ 1 ��������������������������������������������������������� % ������������������ % \begin{macrocode} \cs_new_protected:Npn \@@_parse_par:nn #1#2 { \seq_clear:N \l_@@_par_num_seq \int_set_eq:Nc \l_@@_max_int { g_@@_ #1 _int } \clist_map_inline:nn {#2} { \@@_parse_par_aux:n {##1} \bool_if:NTF \l_@@_invalid_range_bool { \@@_warning:nnn { invalid-range } {##1} {#2} } { \bool_if:NT \l_@@_modified_range_bool { \@@_warning:nxxx { modified-range } {##1} {#2} { \@@_par_range: } } \seq_concat:NNN \l_@@_par_num_seq \l_@@_par_num_seq \l_@@_tmpa_seq } } } % \end{macrocode} % \end{macro} % % \begin{macro}{\@@_parse_par_aux:n} % \begin{macrocode} \cs_new_protected:Npn \@@_parse_par_aux:n #1 { \bool_set_false:N \l_@@_modified_range_bool \bool_set_false:N \l_@@_invalid_range_bool \seq_clear:N \l_@@_tmpa_seq \tl_if_in:nnTF {#1} { - } { \seq_set_split:Nnn \l_@@_tmpb_seq { - } {#1} % \end{macrocode} % ���|-|��� ������������������ % \begin{macrocode} \seq_pop_left:NN \l_@@_tmpb_seq \l_@@_tmpa_tl \tl_if_empty:NTF \l_@@_tmpa_tl { \int_set_eq:NN \l_@@_begin_int \c_one_int } { \int_set:Nn \l_@@_begin_int { \l_@@_tmpa_tl } \int_compare:nNnT \l_@@_begin_int < \c_one_int { \int_set_eq:NN \l_@@_begin_int \c_one_int \bool_set_true:N \l_@@_modified_range_bool } } % \end{macrocode} % ���|-|��� ������������������������������������������ \cs{seq_pop_left:NN} ��������������� % |-3-4| ��������������� |-3|��������������������� |1-3|��� % \begin{macrocode} \seq_pop_left:NN \l_@@_tmpb_seq \l_@@_tmpa_tl \tl_if_empty:NTF \l_@@_tmpa_tl { \int_set_eq:NN \l_@@_end_int \l_@@_max_int } { \int_set:Nn \l_@@_end_int { \l_@@_tmpa_tl } \int_compare:nNnT \l_@@_end_int > \l_@@_max_int { \int_set_eq:NN \l_@@_end_int \l_@@_max_int \bool_set_true:N \l_@@_modified_range_bool } } % \end{macrocode} % ��������������������� % \begin{macrocode} \bool_lazy_or:nnTF { \int_compare_p:nNn \l_@@_begin_int > \l_@@_max_int } { \int_compare_p:nNn \l_@@_begin_int > \l_@@_end_int } { \bool_set_true:N \l_@@_invalid_range_bool } { \int_step_inline:nnn { \l_@@_begin_int } { \l_@@_end_int } { \seq_put_right:Nn \l_@@_tmpa_seq {##1} } } } { % \end{macrocode} % ������������������������ % \begin{macrocode} \bool_lazy_or:nnTF { \int_compare_p:nNn {#1} > \l_@@_max_int } { \int_compare_p:nNn {#1} < \c_one_int } { \bool_set_true:N \l_@@_invalid_range_bool } { \seq_put_right:Nn \l_@@_tmpa_seq {#1} } } } % \end{macrocode} % \end{macro} % % \begin{macro}{\@@_par_range:} % ��������������������������������������������������������������������� % \begin{macrocode} \cs_new:Npn \@@_par_range: { \int_compare:nNnTF \l_@@_begin_int = \l_@@_end_int { \int_use:N \l_@@_begin_int } { \int_use:N \l_@@_begin_int - \int_use:N \l_@@_end_int } } % \end{macrocode} % \end{macro} % % ��������������� % \begin{macrocode} \@@_msg_new:nn { modified-range } { Your~ required~ range~ "#1"~ in~ "#2"~ will~ be~ modified. \\ Changed~ into~ "#3". } \@@_msg_new:nn { invalid-range } { Your~ required~ range~ "#1"~ in~ "#2"~ is~ invalid. \\ Nothing~ will~ be~ output. } % \end{macrocode} % % \begin{macro}{\@@_use:nn} % ���������������������|#1| = ���������������|#2| = ��������������� % \begin{macrocode} \cs_new_protected:Npn \@@_use:nn #1#2 { \tl_use:c { c_@@_ #1 @ #2 _tl } } % \end{macrocode} % \end{macro} % % \subsection{������������} % % \begin{macro}{\newzhlipsum,\zhlipsum_new:nn} % ���������������|#1| = ���������������|#2| = ������ clist��� % \begin{macrocode} \NewDocumentCommand \newzhlipsum { m m } { \zhlipsum_new:nn {#1} {#2} } \cs_new_protected:Npn \zhlipsum_new:nn #1#2 { \zhlipsum_if_exist:nTF {#1} { \@@_error:nn { already-defined } {#1} } { \seq_gput_left:Nn \g_zhlipsum_seq {#1} \int_new:c { g_@@_ #1 _int } \clist_map_inline:nn {#2} { \@@_new:nn {#1} {##1} } \@@_info:nn { defining-text } {#1} } } \@@_msg_new:nn { already-defined } { Chinese~ dummy~ text~ "#1"~ has~ been~ used.~ Please~ use~ another~ name. } \@@_msg_new:nn { defining-text } { Chinese~ dummy~ text~ "#1"~ is~ created.~ It~ has~ \int_use:c { g_@@_ #1 _int }~ paragraphs. } % \end{macrocode} % \end{macro} % % \begin{macro}{\@@_new:nn} % ���������������������������|#1| = ���������������|#2| = ��������� % \begin{macrocode} \cs_new_protected:Npn \@@_new:nn #1#2 { \int_gincr:c { g_@@_ #1 _int } \tl_const:cn { c_@@_ #1 @ \int_use:c { g_@@_ #1 _int } _tl } {#2} } % \end{macrocode} % \end{macro} % % ��������������������������������������������� % \begin{macrocode} \file_input:x { zhlipsum- \g_@@_encoding_str .def } %</package> % \end{macrocode} % % \subsection{������������} \label{subsec:dummy-text} % % \changes{v1.0.0}{2018/03/27}{��������������������������� \pkg{CJK} ��������� % ������������������} % % \begin{macro}{\@@_set_special_catcode:} % ������������������������������������������ \pkg{CJK} ������������������������������������������ % ������������������������������ GBK/Big5 ������������������������������������������������ % \TeX{} ������������������ |\|���|{|���|}|���|~| ������������������������������������������ % ������ 12��������������������������� |+|���|<|���|>| ��� |*| ��������������� |*| ��� % ������ \LaTeX3 ��������������������������������������������� 10������ % \begin{macrocode} %<*text> \cs_new_protected:Npn \@@_set_special_catcode: { %<!utf8> \@@_active_first_byte: \char_set_catcode_escape:N \+ \char_set_catcode_group_begin:N \< \char_set_catcode_group_end:N \> \char_set_catcode_space:N \* \char_set_catcode_other:N \\ \char_set_catcode_other:N \{ \char_set_catcode_other:N \} \char_set_catcode_other:N \~ } % \end{macrocode} % \end{macro} % % \begin{macro}{\@@_active_first_byte:} % ��������������������������������������������������� 12������UTF-8 ������������������������������ % \begin{macrocode} %<*!utf8> \cs_new_protected:Npx \@@_active_first_byte: { \int_step_function:nnN { "81 } { "FE } \char_set_catcode_active:n } %</!utf8> %</text> % \end{macrocode} % \end{macro} % % \changes{v1.0.0}{2018/03/26}{������������������������} % \changes{v1.1.1}{2018/07/19}{���������������������} % % ��������������������������������������������������� \cs{@@_set_special_catcode:} ������ % ������������������������������ \pkg{CJK} ������������������������������������������������������ % % \end{implementation} %