diff options
author | Karl Berry <karl@freefriends.org> | 2024-03-30 19:54:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-03-30 19:54:38 +0000 |
commit | 22009c604af0e0e4520a29a3f28d52dcaacf293f (patch) | |
tree | 468b285b5fa2040bbcf70835866c6c85af62f6dc | |
parent | ceb60a889a9349b5f17a956471d750f5a7653619 (diff) |
ducksay (30mar24)
git-svn-id: svn://tug.org/texlive/trunk@70816 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/ducksay/ducksay.pdf | bin | 543677 -> 545970 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/ducksay/ducksay.dtx | 94 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ducksay/ducksay.animals.tex | 40 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ducksay/ducksay.sty | 36 |
4 files changed, 111 insertions, 59 deletions
diff --git a/Master/texmf-dist/doc/latex/ducksay/ducksay.pdf b/Master/texmf-dist/doc/latex/ducksay/ducksay.pdf Binary files differindex 6f54d4a73be..a5211c64e55 100644 --- a/Master/texmf-dist/doc/latex/ducksay/ducksay.pdf +++ b/Master/texmf-dist/doc/latex/ducksay/ducksay.pdf diff --git a/Master/texmf-dist/source/latex/ducksay/ducksay.dtx b/Master/texmf-dist/source/latex/ducksay/ducksay.dtx index 98700c2b74b..95ffcdfe1c7 100644 --- a/Master/texmf-dist/source/latex/ducksay/ducksay.dtx +++ b/Master/texmf-dist/source/latex/ducksay/ducksay.dtx @@ -200,10 +200,10 @@ and the derived files ducksay.pdf %</driver>^^A=<< %<*pkg>^^A>>= \NeedsTeXFormat{LaTeX2e} -\RequirePackage{xparse,l3keys2e} +\@ifundefined{NewDocumentCommand}{\RequirePackage{xparse}}{} -\def\ducksay@version{2.6} -\def\ducksay@date{2022-10-08} +\def\ducksay@version{2.7} +\def\ducksay@date{2024-03-29} \ProvidesExplPackage {ducksay} {\ducksay@date} @@ -320,7 +320,7 @@ and the derived files ducksay.pdf % \sinceversion{2.4} % The |add-think| key was deprecated in v2.3 and was removed in v2.4 since % the output symbols of the bubble tail are handled differently and more -% efficient now. +% efficiently now. % \end{itemize}^^A=<< % % \subsection{Shared between versions}^^A>>= @@ -944,9 +944,9 @@ and the derived files ducksay.pdf % {We rely on you}% % }% % } -% The package depends on the two packages \pkg{xparse} and \pkg{l3keys2e} -% and all of their dependencies. Version 2 additionally depends on \pkg{array} -% and \pkg{grabbox}. +% The package depends on the \LaTeX\ kernel, for older versions of \LaTeX\ the +% two packages \pkg{xparse} and \pkg{l3keys2e} and all of their dependencies are +% loaded. Version 2 additionally depends on \pkg{array} and \pkg{grabbox}. %^^A=<< % % \subsection{Available Animals}\label{sec:animals}^^A>>= @@ -954,11 +954,8 @@ and the derived files ducksay.pdf % {% % \tiny % \hfill -% \ducksay[platypus,MSG=\footnotesize,msg-align=c] -% {Quack?}\\ -% \hspace*{1cm}% -% \ducksay[small-horse,MSG=\footnotesize,msg-align=c,body-mirrored] -% {Neigh, we're new!} +% \ducksay[turtle,MSG=\footnotesize,msg-align=c] +% {Slowly new animals\\are added.}% % } % The following animals are provided by this package. I did not create them (but % altered some), they belong to their original creators. @@ -984,6 +981,7 @@ and the derived files ducksay.pdf % ,sodomized^^A % ,hedgehog^^A % ,platypus^^A +% ,turtle^^A % ,kangaroo^^A % ,small-horse^^A % ,dog^^A @@ -1182,7 +1180,12 @@ and the derived files ducksay.pdf % \end{macrocode} % % \begin{macrocode} -\ProcessKeysOptions { ducksay } +\cs_if_exist:NTF \ProcessKeyOptions + { \ProcessKeyOptions [ ducksay ] } + { + \RequirePackage { l3keys2e } + \ProcessKeysOptions { ducksay } + } % \end{macrocode} % % Undefine the load-time-only keys @@ -1238,19 +1241,32 @@ and the derived files ducksay.pdf % % \begin{macro}[internal]{\ducksay_replace_verb_newline:Nn}^^A>>= % \begin{macrocode} -\cs_new_protected:Npx \ducksay_replace_verb_newline:Nn #1 #2 +\IfFormatAtLeastTF{2024-06-01} { - \tl_replace_all:Nnn #1 { \char_generate:nn { 13 } { 12 } } { #2 } + \cs_new_protected:Npn \ducksay_replace_verb_newline:Nn #1 #2 + { \tl_replace_all:Nnn #1 \obeyedline {#2} } + } + { + \cs_new_protected:Npx \ducksay_replace_verb_newline:Nn #1 #2 + { \tl_replace_all:Nnn #1 { \char_generate:nn { 13 } { 12 } } {#2} } } % \end{macrocode} % \end{macro}^^A=<< % % \begin{macro}[internal]{\ducksay_replace_verb_newline_newline:Nn}^^A>>= % \begin{macrocode} -\cs_new_protected:Npx \ducksay_replace_verb_newline_newline:Nn #1 #2 +\IfFormatAtLeastTF{2024-06-01} { - \tl_replace_all:Nnn #1 - { \char_generate:nn { 13 } { 12 } \char_generate:nn { 13 } { 12 } } { #2 } + \cs_new_protected:Npn \ducksay_replace_verb_newline_newline:Nn #1 #2 + { \tl_replace_all:Nnn #1 { \obeyedline \obeyedline } {#2} } + } + { + \cs_new_protected:Npx \ducksay_replace_verb_newline_newline:Nn #1 #2 + { + \tl_replace_all:Nnn #1 + { \char_generate:nn { 13 } { 12 } \char_generate:nn { 13 } { 12 } } + {#2} + } } % \end{macrocode} % \end{macro}^^A=<< @@ -2693,7 +2709,7 @@ and the derived files ducksay.pdf s s}%=<< %^^A head taken from https://www.asciiart.eu/animals/reptiles/snakes -\AddAnimal[tail-symbol=s,tail-count=3]{snake} +\AddAnimal[tail-symbol=s,tail-count=3]{snake}% >>= { s s /^\/^\ s _|__| O | @@ -2704,9 +2720,9 @@ and the derived files ducksay.pdf / / _---_ | | / / / __ "-_ ," | | "--" / "-_ "--" ," - "-_____-" "-___-"} + "-_____-" "-___-"}% =<< %^^A http://www.ascii-art.de/ascii/c/cat.txt -\AddAnimal{cat} +\AddAnimal{cat}% >>= + \ \ _ ___ .--. \`.|\..----...-'` `-._.-' .-' @@ -2714,15 +2730,15 @@ and the derived files ducksay.pdf )/' _/ \ `-_, / `-'" `"\_ ,_.-;_.-\_ ', _.-'_./ {_.' ; / - {_.-``-' {_/+ + {_.-``-' {_/+% =<< %^^A https://www.asciiart.eu/animals/cats -\AddAnimal{sleepy-cat} +\AddAnimal{sleepy-cat}% >>= { \ \ |\ _,,,---,,_ _._ /,`.-'`' -. )'._,'.-,) |,4- ) )-,_. ,\ ( `-.-' - '---''(_/--' `-'\_)} -\AddAnimal{schroedinger-dead} + '---''(_/--' `-'\_)}% =<< +\AddAnimal{schroedinger-dead}% >>= { \ \ _.--"""--._ | | @@ -2733,9 +2749,9 @@ and the derived files ducksay.pdf __|___________|__ _ o . . . ~ . o o - . ~ .} + . ~ .}% =<< %^^A https://www.asciiart.eu/animals/cats -\AddAnimal{schroedinger-alive} +\AddAnimal{schroedinger-alive}% >>= { \ \ ,_ _ |\\__,'/ @@ -2746,10 +2762,10 @@ and the derived files ducksay.pdf | _ \ | \ \ , / | || |-_\__ / - ((_/`(____,-'} + ((_/`(____,-'}% =<< %^^A provided by Plergux %^^A (https://chat.stackexchange.com/transcript/message/55986902#55986902) -\AddAnimal{sheep} +\AddAnimal{sheep}% >>= { \ _,_,_,_,_, \ .:( ,) ), (__, (, ), @@ -2757,21 +2773,31 @@ and the derived files ducksay.pdf (___(, (, ,) (, ,) ,) `-_,---_,-' - || ||} + || ||}% =<< %^^A based on joe schmuck (http://www.ascii-art.de/ascii/pqr/platypus.txt) -\AddAnimal[tail-symbol=s]{platypus} +\AddAnimal[tail-symbol=s]{platypus}% >>= | s _.-^~~^^`~-,,,~~''```~-''``~'``~, s ______,' -o :. _ . ; ,'`, `. ( -\.._,.;;'._,( } _`_-_,, `, `, - ``~~~~~~' ((/'(((____/~~'(,(,___> `~'| -\AddAnimal[tail-symbol=s]{small-horse} + ``~~~~~~' ((/'(((____/~~'(,(,___> `~'|% =<< +\AddAnimal[tail-symbol=s]{small-horse}% >>= { s _,_ s /._ \\ /_/ |_\\ _ __ / \\ \\ \ _ __ _ /|| | | | | || - | | | |} + | | | |}% =<< +%^^A based on art by Joan Stark (jgs) +%^^A (https://www.asciiart.eu/animals/reptiles/turtles) +\AddAnimal[tail-symbol=s]{turtle} +{ s + s __ + /_'\ .,-;-;-,. + \ (/_/_|_\_\_\_ + /\=<_><_><_><_>-' + /_/'-\_\====\_\' + "" "" ""} %</animals> % \end{macrocode}^^A=<< %^^A%^^A https://www.asciiart.eu/mythology/fairies diff --git a/Master/texmf-dist/tex/latex/ducksay/ducksay.animals.tex b/Master/texmf-dist/tex/latex/ducksay/ducksay.animals.tex index b42307e7305..3c07a4dcd00 100644 --- a/Master/texmf-dist/tex/latex/ducksay/ducksay.animals.tex +++ b/Master/texmf-dist/tex/latex/ducksay/ducksay.animals.tex @@ -362,7 +362,7 @@ { s s s}%=<< -\AddAnimal[tail-symbol=s,tail-count=3]{snake} +\AddAnimal[tail-symbol=s,tail-count=3]{snake}% >>= { s s /^\/^\ s _|__| O | @@ -373,8 +373,8 @@ / / _---_ | | / / / __ "-_ ," | | "--" / "-_ "--" ," - "-_____-" "-___-"} -\AddAnimal{cat} + "-_____-" "-___-"}% =<< +\AddAnimal{cat}% >>= + \ \ _ ___ .--. \`.|\..----...-'` `-._.-' .-' @@ -382,14 +382,14 @@ )/' _/ \ `-_, / `-'" `"\_ ,_.-;_.-\_ ', _.-'_./ {_.' ; / - {_.-``-' {_/+ -\AddAnimal{sleepy-cat} + {_.-``-' {_/+% =<< +\AddAnimal{sleepy-cat}% >>= { \ \ |\ _,,,---,,_ _._ /,`.-'`' -. )'._,'.-,) |,4- ) )-,_. ,\ ( `-.-' - '---''(_/--' `-'\_)} -\AddAnimal{schroedinger-dead} + '---''(_/--' `-'\_)}% =<< +\AddAnimal{schroedinger-dead}% >>= { \ \ _.--"""--._ | | @@ -400,8 +400,8 @@ __|___________|__ _ o . . . ~ . o o - . ~ .} -\AddAnimal{schroedinger-alive} + . ~ .}% =<< +\AddAnimal{schroedinger-alive}% >>= { \ \ ,_ _ |\\__,'/ @@ -412,8 +412,8 @@ | _ \ | \ \ , / | || |-_\__ / - ((_/`(____,-'} -\AddAnimal{sheep} + ((_/`(____,-'}% =<< +\AddAnimal{sheep}% >>= { \ _,_,_,_,_, \ .:( ,) ), (__, (, ), @@ -421,20 +421,28 @@ (___(, (, ,) (, ,) ,) `-_,---_,-' - || ||} -\AddAnimal[tail-symbol=s]{platypus} + || ||}% =<< +\AddAnimal[tail-symbol=s]{platypus}% >>= | s _.-^~~^^`~-,,,~~''```~-''``~'``~, s ______,' -o :. _ . ; ,'`, `. ( -\.._,.;;'._,( } _`_-_,, `, `, - ``~~~~~~' ((/'(((____/~~'(,(,___> `~'| -\AddAnimal[tail-symbol=s]{small-horse} + ``~~~~~~' ((/'(((____/~~'(,(,___> `~'|% =<< +\AddAnimal[tail-symbol=s]{small-horse}% >>= { s _,_ s /._ \\ /_/ |_\\ _ __ / \\ \\ \ _ __ _ /|| | | | | || - | | | |} + | | | |}% =<< +\AddAnimal[tail-symbol=s]{turtle} +{ s + s __ + /_'\ .,-;-;-,. + \ (/_/_|_\_\_\_ + /\=<_><_><_><_>-' + /_/'-\_\====\_\' + "" "" ""} %% %% %% End of file `ducksay.animals.tex'. diff --git a/Master/texmf-dist/tex/latex/ducksay/ducksay.sty b/Master/texmf-dist/tex/latex/ducksay/ducksay.sty index b55dcd8f5a1..9d6c4637135 100644 --- a/Master/texmf-dist/tex/latex/ducksay/ducksay.sty +++ b/Master/texmf-dist/tex/latex/ducksay/ducksay.sty @@ -33,10 +33,10 @@ %% ducksay.animals.tex. %% \NeedsTeXFormat{LaTeX2e} -\RequirePackage{xparse,l3keys2e} +\@ifundefined{NewDocumentCommand}{\RequirePackage{xparse}}{} -\def\ducksay@version{2.6} -\def\ducksay@date{2022-10-08} +\def\ducksay@version{2.7} +\def\ducksay@date{2024-03-29} \ProvidesExplPackage {ducksay} {\ducksay@date} @@ -123,7 +123,12 @@ } ,version .initial:n = 2 } -\ProcessKeysOptions { ducksay } +\cs_if_exist:NTF \ProcessKeyOptions + { \ProcessKeyOptions [ ducksay ] } + { + \RequirePackage { l3keys2e } + \ProcessKeysOptions { ducksay } + } \keys_define:nn { ducksay } { version .code:n = \msg_error:nnn { ducksay } { load-time-only } { version } @@ -141,14 +146,27 @@ \cs_generate_variant:Nn \keys_set:nn { nx } \cs_set_eq:NN \__ducksay_everyeof:w \tex_everyeof:D \cs_set_eq:NN \__ducksay_scantokens:w \tex_scantokens:D -\cs_new_protected:Npx \ducksay_replace_verb_newline:Nn #1 #2 +\IfFormatAtLeastTF{2024-06-01} + { + \cs_new_protected:Npn \ducksay_replace_verb_newline:Nn #1 #2 + { \tl_replace_all:Nnn #1 \obeyedline {#2} } + } { - \tl_replace_all:Nnn #1 { \char_generate:nn { 13 } { 12 } } { #2 } + \cs_new_protected:Npx \ducksay_replace_verb_newline:Nn #1 #2 + { \tl_replace_all:Nnn #1 { \char_generate:nn { 13 } { 12 } } {#2} } } -\cs_new_protected:Npx \ducksay_replace_verb_newline_newline:Nn #1 #2 +\IfFormatAtLeastTF{2024-06-01} { - \tl_replace_all:Nnn #1 - { \char_generate:nn { 13 } { 12 } \char_generate:nn { 13 } { 12 } } { #2 } + \cs_new_protected:Npn \ducksay_replace_verb_newline_newline:Nn #1 #2 + { \tl_replace_all:Nnn #1 { \obeyedline \obeyedline } {#2} } + } + { + \cs_new_protected:Npx \ducksay_replace_verb_newline_newline:Nn #1 #2 + { + \tl_replace_all:Nnn #1 + { \char_generate:nn { 13 } { 12 } \char_generate:nn { 13 } { 12 } } + {#2} + } } \cs_new_protected:Npn \ducksay_process_verb_newline:nnn #1 #2 #3 { |