diff options
author | Karl Berry <karl@freefriends.org> | 2019-06-03 21:34:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-06-03 21:34:56 +0000 |
commit | 2303aa63c28269972f5897573075238b9d80d5b2 (patch) | |
tree | a6d234fc4f1688a9f9d257bd8b090e1ad90a8ce8 /Master/texmf-dist/tex/latex/duckuments | |
parent | fa8e65f7158e48d4ef9cdd5caf6eee4d143bf8d1 (diff) |
duckuments (3jun19)
git-svn-id: svn://tug.org/texlive/trunk@51308 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/duckuments')
-rw-r--r-- | Master/texmf-dist/tex/latex/duckuments/duckuments.sty | 116 |
1 files changed, 6 insertions, 110 deletions
diff --git a/Master/texmf-dist/tex/latex/duckuments/duckuments.sty b/Master/texmf-dist/tex/latex/duckuments/duckuments.sty index 8f2d66435a6..41cfe9c32ea 100644 --- a/Master/texmf-dist/tex/latex/duckuments/duckuments.sty +++ b/Master/texmf-dist/tex/latex/duckuments/duckuments.sty @@ -31,9 +31,10 @@ %% example-image-duck.tex and %% example-image-duck-portrait.tex %% -\RequirePackage{xparse,letltxmacro,l3keys2e} -\def\duckuments@version{0.4c} -\def\duckuments@date{2019/02/03} +\RequirePackage{xparse}[2019-05-03] +\RequirePackage{letltxmacro,l3keys2e} +\def\duckuments@version{0.4d} +\def\duckuments@date{2019/06/02} \ProvidesExplPackage {duckuments} {\duckuments@date} {\duckuments@version} {minimal working duckuments} @@ -431,7 +432,6 @@ { \regex_match:NnTF \c_duckuments_example_regex { ##4 } { - \duckuments_get_random_page: \duckuments@includegraphicsBAK##1 [page=\duckuments_random_page:,##2] { ##4 } @@ -530,112 +530,8 @@ { \def\ProcessedArgument{*} } { \def\ProcessedArgument{} } }%<<< -\sys_if_engine_xetex:TF - { - \int_new:N \g_duckuments_RCiv_i_int - \int_new:N \g_duckuments_RCiv_j_int - \int_new:N \g_duckuments_RCiv_keylength_int - \int_new:N \g_duckuments_tmpa_int - \int_const:Nn \c_duckuments_RCiv_Slength_int { 256 } - \tl_new:N \l_duckuments_tmpa_tl - \tl_new:N \l_duckuments_tmpb_tl - \cs_new_protected_nopar:Npn \duckuments_RCiv_S_new:n #1 - { \int_new:c { g_duckuments_RCiv_S_ \int_eval:n { #1 } _int } } - \cs_new_protected_nopar:Npn \duckuments_RCiv_S_set:nn #1 #2 - { \int_gset:cn { g_duckuments_RCiv_S_ \int_eval:n { #1 } _int } { #2 } } - \cs_new_nopar:Npn \duckuments_RCiv_S_get:n #1 - { \int_use:c { g_duckuments_RCiv_S_ \int_eval:n { #1 } _int } } - \cs_new_protected_nopar:Npn \duckuments_RCiv_key_new:n #1 - { \int_new:c { g_duckuments_RCiv_key_ \int_eval:n { #1 } _int } } - \cs_new_protected_nopar:Npn \duckuments_RCiv_key_set:nn #1 #2 - { \int_gset:cn { g_duckuments_RCiv_key_ \int_eval:n { #1 } _int } { #2 } } - \cs_new_nopar:Npn \duckuments_RCiv_key_get:n #1 - { \int_use:c { g_duckuments_RCiv_key_ \int_eval:n { #1 } _int } } - \int_step_inline:nnnn { 0 } { 1 } { 255 } - { - \duckuments_RCiv_S_new:n { #1 } - \duckuments_RCiv_S_set:nn { #1 } { #1 } - } - \int_step_inline:nnnn { 0 } { 1 } { 4 } - { \duckuments_RCiv_key_new:n { #1 } } - \duckuments_RCiv_key_set:nn { 0 } { \c_sys_minute_int } - \duckuments_RCiv_key_set:nn { 1 } { \c_sys_hour_int } - \duckuments_RCiv_key_set:nn { 2 } { \c_sys_day_int } - \duckuments_RCiv_key_set:nn { 3 } { \c_sys_month_int } - \duckuments_RCiv_key_set:nn { 4 } - { \int_mod:nn { \c_sys_year_int } { \c_duckuments_RCiv_Slength_int } } - \int_gset:Nn \g_duckuments_RCiv_keylength_int { 5 } - \str_map_inline:Nn \c_sys_jobname_str - { - \duckuments_RCiv_key_new:n { \g_duckuments_RCiv_keylength_int } - \duckuments_RCiv_key_set:nn - { \g_duckuments_RCiv_keylength_int } - { \int_from_alph:n { #1 } } - \int_gincr:N \g_duckuments_RCiv_keylength_int - } - \cs_new_protected_nopar:Npn \duckuments_swap_S_entries:nn #1 #2 - { - \int_set_eq:Nc - \g_duckuments_tmpa_int - { g_duckuments_RCiv_S_ \int_eval:n { #1 } _int } - \int_set_eq:cc - { g_duckuments_RCiv_S_ \int_eval:n { #1 } _int } - { g_duckuments_RCiv_S_ \int_eval:n { #2 } _int } - \int_set_eq:cN - { g_duckuments_RCiv_S_ \int_eval:n { #2 } _int } - \g_duckuments_tmpa_int - } - \int_gset:Nn \g_duckuments_RCiv_keylength_int { 5 } - \cs_new:Npn \duckuments_gadd_mod:Nnn #1 #2 #3 - { \int_gset:Nn #1 { \int_mod:nn { #1 + ( #2 ) } { #3 } } } - \cs_new:Npn \duckuments_gadd_mod_Slength:Nn #1 #2 - { - \duckuments_gadd_mod:Nnn #1 - { #2 } { \c_duckuments_RCiv_Slength_int } - } - \int_step_inline:nnnn { 0 } { 1 } { 255 } - { - \int_gset:Nn \g_duckuments_tmpa_int - { \int_mod:nn { #1 } { \g_duckuments_RCiv_keylength_int } } - \duckuments_gadd_mod_Slength:Nn \g_duckuments_RCiv_j_int - { - \duckuments_RCiv_S_get:n { #1 } - + \duckuments_RCiv_key_get:n { \g_duckuments_tmpa_int } - } - \duckuments_swap_S_entries:nn { #1 } { \g_duckuments_RCiv_j_int } - } - \int_gzero:N \g_duckuments_RCiv_i_int - \int_gzero:N \g_duckuments_RCiv_j_int - \cs_new_protected_nopar:Npn \duckuments_get_random_page: - { - \duckuments_gadd_mod_Slength:Nn \g_duckuments_RCiv_i_int { \c_one } - \duckuments_gadd_mod_Slength:Nn \g_duckuments_RCiv_j_int - { \duckuments_RCiv_S_get:n { \g_duckuments_RCiv_i_int } } - \duckuments_swap_S_entries:nn - { \g_duckuments_RCiv_i_int } - { \g_duckuments_RCiv_j_int } - \int_gset:Nn \g_duckuments_tmpa_int - { \duckuments_RCiv_S_get:n { \g_duckuments_RCiv_i_int } } - \duckuments_gadd_mod_Slength:Nn \g_duckuments_tmpa_int - { \duckuments_RCiv_S_get:n { \g_duckuments_RCiv_j_int } } - \cs_set:Nx \duckuments_random_page: - { - \int_eval:n - { - \int_mod:nn - { \duckuments_RCiv_S_get:n { \g_duckuments_tmpa_int } } - { \c_duckuments_example_pages_int } - + \c_one - } - } - } - \cs_new:Npn \duckuments_random_page: { 1 } - } - { - \cs_new:Npn \duckuments_get_random_page: {} - \cs_new:Npn \duckuments_random_page: - { \int_rand:nn { 1 } { \c_duckuments_example_pages_int } } - } +\cs_new:Npn \duckuments_random_page: + { \int_rand:n { \c_duckuments_example_pages_int } } \ExplSyntaxOff \newcommand*\duckuments@blindduck@text{\duckuments@blindduck@text@i} \newcommand*\duckuments@blindduck@text@i |