summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ducksay/ducksay.code.v2.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/ducksay/ducksay.code.v2.tex')
-rw-r--r--Master/texmf-dist/tex/latex/ducksay/ducksay.code.v2.tex45
1 files changed, 19 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/ducksay/ducksay.code.v2.tex b/Master/texmf-dist/tex/latex/ducksay/ducksay.code.v2.tex
index df1e7f870b2..44cd4a1c4b7 100644
--- a/Master/texmf-dist/tex/latex/ducksay/ducksay.code.v2.tex
+++ b/Master/texmf-dist/tex/latex/ducksay/ducksay.code.v2.tex
@@ -22,11 +22,6 @@
%%
%% http://www.latex-project.org/lppl.txt
%%
-%% Alternatively you can use this work under the terms of the GNU General Public
-%% Licensce (GPL), version 3 or later, except that you might not redistribute it
-%% under the same name if you change its functionality. Choose which of these
-%% licenses fits your needs the best.
-%%
%% This work is "maintained" (as per LPPL maintenance status) by
%% Jonathan P. Spratte.
%%
@@ -37,7 +32,7 @@
%% ducksay.code.v2.tex and
%% ducksay.animals.tex.
%%
-\RequirePackage{array}
+\RequirePackage{array,grabbox}
\msg_new:nnn { ducksay } { justify~unavailable }
{
Justified~content~is~not~available~for~tabular~argument~mode~without~fixed~
@@ -162,6 +157,7 @@
,bubble-delim-right-2 .initial:n = \c_backslash_str
,bubble-delim-right-3 .initial:n = |
,bubble-delim-right-4 .initial:n = /
+ ,strip-spaces .bool_set:N = \l_ducksay_msg_strip_spaces_bool
}
\cs_new:Npn \ducksay_evaluate_message_alignment_fixed_width_tabular:
{
@@ -459,30 +455,27 @@
{ \ducksay_eat_argument_tabular_inner:w { #1 } }
\cs_new_protected_nopar:Npn \ducksay_eat_argument_hbox:w
{
- \afterassignment \ducksay_eat_argument_hbox_inner:w
- \let \l_ducksay_nothing =
- }
-\cs_new_protected_nopar:Npn \ducksay_eat_argument_hbox_inner:w
- {
- \setbox \l_ducksay_msg_box \hbox \c_group_begin_token
- \group_insert_after:N \ducksay_shipout:
- \l_ducksay_msg_fount_tl
+ \bool_if:NTF \l_ducksay_msg_strip_spaces_bool
+ { \grabbox }
+ { \grabbox* }
+ \l_ducksay_msg_box [ \l_ducksay_msg_fount_tl ] \hbox \ducksay_shipout:
}
\cs_new_protected_nopar:Npn \ducksay_eat_argument_vbox:w
{
\ducksay_evaluate_message_alignment_fixed_width_vbox:
- \afterassignment \ducksay_eat_argument_vbox_inner:w
- \let \l_ducksay_nothing =
- }
-\cs_new_protected_nopar:Npn \ducksay_eat_argument_vbox_inner:w
- {
- \setbox \l_ducksay_msg_box \vbox \c_group_begin_token
- \hsize \l_ducksay_msg_width_dim
- \group_insert_after:N \ducksay_shipout:
- \l_ducksay_msg_fount_tl
- \l_ducksay_msg_align_vbox_tl
- \@afterindentfalse
- \@afterheading
+ \bool_if:NTF \l_ducksay_msg_strip_spaces_bool
+ { \grabbox }
+ { \grabbox* }
+ \l_ducksay_msg_box
+ [
+ \hsize \l_ducksay_msg_width_dim
+ \linewidth \hsize
+ \l_ducksay_msg_fount_tl
+ \l_ducksay_msg_align_vbox_tl
+ \@afterindentfalse
+ \@afterheading
+ ]
+ \vbox \ducksay_shipout:
}
\cs_generate_variant:Nn \coffin_join:NnnNnnnn { NVnNVnnn }
\cs_generate_variant:Nn \coffin_attach:NnnNnnnn { NVnNVnnn }