summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/zhlipsum/zhlipsum.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/zhlipsum/zhlipsum.sty')
-rw-r--r--Master/texmf-dist/tex/latex/zhlipsum/zhlipsum.sty28
1 files changed, 24 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/zhlipsum/zhlipsum.sty b/Master/texmf-dist/tex/latex/zhlipsum/zhlipsum.sty
index e2819da5521..4797617e17f 100644
--- a/Master/texmf-dist/tex/latex/zhlipsum/zhlipsum.sty
+++ b/Master/texmf-dist/tex/latex/zhlipsum/zhlipsum.sty
@@ -36,7 +36,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo $Id: zhlipsum.dtx 1.0.0 2018-04-03 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $
+\GetIdInfo $Id: zhlipsum.dtx 1.1.0 2018-04-08 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $
{Chinese dummy text}
\ProvidesExplPackage{\ExplFileName}
{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -188,7 +188,7 @@
\__zhlipsum_if_encoding:nTF { big5 }
{ \keys_set:nn { zhlipsum } { name = trad } }
{ \keys_set:nn { zhlipsum } { name = simp } }
-\NewDocumentCommand \zhlipsum { s G { 1 - 3 } +o }
+\NewDocumentCommand \zhlipsum { s o +o }
{
\group_begin:
\IfBooleanF {#1}
@@ -197,10 +197,30 @@
\tl_set:Nn \l__zhlipsum_after_tl { \__zhlipsum_par: }
\tl_set:Nn \l__zhlipsum_inter_tl { \__zhlipsum_par: }
}
- \IfValueT {#3} { \keys_set:nn { zhlipsum } {#3} }
- \zhlipsum_use:Vn \l__zhlipsum_name_tl {#2}
+ \IfValueTF {#3}
+ {
+ \keys_set:nn { zhlipsum } {#3}
+ \zhlipsum_use:Vn \l__zhlipsum_name_tl {#2}
+ }
+ {
+ \IfValueTF {#2}
+ {
+ \__zhlipsum_if_key_value_list:nTF {#2}
+ {
+ \keys_set:nn { zhlipsum } {#2}
+ \zhlipsum_use:Vn \l__zhlipsum_name_tl { 1 - 3 }
+ }
+ { \zhlipsum_use:Vn \l__zhlipsum_name_tl {#2} }
+ }
+ { \zhlipsum_use:Vn \l__zhlipsum_name_tl { 1 - 3 } }
+ }
\group_end:
}
+\prg_new_protected_conditional:Npnn \__zhlipsum_if_key_value_list:n #1 { TF }
+ {
+ \tl_if_in:nnTF {#1} { = }
+ { \prg_return_true: } { \prg_return_false: }
+ }
\seq_new:N \l__zhlipsum_par_num_seq
\cs_new_protected:Npn \zhlipsum_use:nn #1#2
{