diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/duckuments/duckuments.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/duckuments/duckuments.sty | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/duckuments/duckuments.sty b/Master/texmf-dist/tex/latex/duckuments/duckuments.sty index 41cfe9c32ea..7cadc5ca753 100644 --- a/Master/texmf-dist/tex/latex/duckuments/duckuments.sty +++ b/Master/texmf-dist/tex/latex/duckuments/duckuments.sty @@ -33,8 +33,8 @@ %% \RequirePackage{xparse}[2019-05-03] \RequirePackage{letltxmacro,l3keys2e} -\def\duckuments@version{0.4d} -\def\duckuments@date{2019/06/02} +\def\duckuments@version{0.4e} +\def\duckuments@date{2019-09-28} \ProvidesExplPackage {duckuments} {\duckuments@date} {\duckuments@version} {minimal working duckuments} @@ -116,7 +116,7 @@ \bool_new:N \l_duckuments_blindduck_pars_bool \seq_new:N \l_duckuments_range_seq \int_new:N \g_duckuments_blindduck_start_int -\int_gset:Nn \g_duckuments_blindduck_start_int { \c_one } +\int_gset:Nn \g_duckuments_blindduck_start_int { \c_one_int } \int_new:N \g_duckuments_blindduck_end_int \regex_const:Nn \c_duckuments_example_regex { @@ -126,13 +126,13 @@ |example-image-duck-portrait.pdf } \regex_const:Nn \c_duckuments_range_regex { (\d+|\d+-|-\d+|\d+-\d+|-) } -\int_const:Nn \c_duckuments_blindduck_pars_int { \c_five } +\int_const:Nn \c_duckuments_blindduck_pars_int { 5 } \bool_if:nTF { \str_if_eq_p:Vn \c_sys_jobname_str { example-image-duck } || \str_if_eq_p:Vn \c_sys_jobname_str { example-image-duck-portrait } } - { \int_const:Nn \c_duckuments_example_pages_int { 1 } } + { \int_const:Nn \c_duckuments_example_pages_int { \c_one_int } } { \group_begin: \sys_if_engine_pdftex:T @@ -428,16 +428,16 @@ { >{\duckuments_starred:n}s O{} o m } { \IfValueTF { ##3 } - { \duckuments@includegraphicsBAK##1[##2][##3]{##4} } + { \duckuments@includegraphicsBAK##1[{##2}][{##3}]{##4} } { \regex_match:NnTF \c_duckuments_example_regex { ##4 } { \duckuments@includegraphicsBAK##1 - [page=\duckuments_random_page:,##2] + [{page=\duckuments_random_page:,##2}] { ##4 } } { - \duckuments@includegraphicsBAK##1[##2]{##4} + \duckuments@includegraphicsBAK##1[{##2}]{##4} } } } @@ -449,7 +449,8 @@ \regex_match:NnTF \c_duckuments_range_regex { #1 } { \seq_set_split:Nnn \l_duckuments_range_seq { - } { #1 } - \int_compare:nNnTF { 1 } = { \seq_count:N \l_duckuments_range_seq } + \int_compare:nNnTF + { \c_one_int } = { \seq_count:N \l_duckuments_range_seq } { \cs_set:Npn \duckuments@blindduck@text { @@ -460,13 +461,14 @@ { \bool_set_true:N \l_duckuments_blindduck_pars_bool \exp_args:Nx - \tl_if_empty:nF { \seq_item:Nn \l_duckuments_range_seq { \c_one } } + \tl_if_empty:nF + { \seq_item:Nn \l_duckuments_range_seq { \c_one_int } } { \int_gset:Nn \g_duckuments_blindduck_start_int - { \seq_item:Nn \l_duckuments_range_seq { \c_one } } + { \seq_item:Nn \l_duckuments_range_seq { \c_one_int } } } \exp_args:Nx - \tl_if_empty:nTF { \seq_item:Nn \l_duckuments_range_seq { \c_two } } + \tl_if_empty:nTF { \seq_item:Nn \l_duckuments_range_seq { 2 } } { \int_gset_eq:NN \g_duckuments_blindduck_end_int @@ -474,7 +476,7 @@ } { \int_set:Nn \g_duckuments_blindduck_end_int - { \seq_item:Nn \l_duckuments_range_seq { \c_two } } + { \seq_item:Nn \l_duckuments_range_seq { 2 } } } \duckuments_blindduck_set_text:xx { \int_use:N \g_duckuments_blindduck_start_int } @@ -491,7 +493,7 @@ {%>>> \def \duckuments@blindduck@text { - \int_step_function:nnnN { #1 } { \c_one } { #2 } + \int_step_function:nnnN { #1 } { \c_one_int } { #2 } \duckuments_blindduck_par_loop:n \duckuments_blindduck_set_next_start:n { #2 } } @@ -500,14 +502,14 @@ \cs_new:Npn \duckuments_blindduck_set_next_start:n #1 {%>>> \int_gset:Nn \g_duckuments_blindduck_start_int - { \int_mod:nn { #1 } { \c_duckuments_blindduck_pars_int } + \c_one } + { \int_mod:nn { #1 } { \c_duckuments_blindduck_pars_int } + \c_one_int } }%<<< \cs_new:Npn \duckuments_blindduck_single_par:n #1 {%>>> \bool_if:nTF { \int_compare_p:nNn { #1 } > { \c_duckuments_blindduck_pars_int } - || \int_compare_p:nNn { #1 } < { \c_one } + || \int_compare_p:nNn { #1 } < { \c_one_int } } { \msg_error:nnxxxx { duckuments } { out~of~range } |