From 490b8e30b99e65ac349903c552abb9066baab619 Mon Sep 17 00:00:00 2001 From: PhelypeOleinik Date: Sun, 8 Aug 2021 21:45:40 -0300 Subject: [PATCH] Fix argument counting after copying E-type --- base/ltcmd.dtx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/ltcmd.dtx b/base/ltcmd.dtx index 23a3056d9..cdec69eee 100644 --- a/base/ltcmd.dtx +++ b/base/ltcmd.dtx @@ -1083,11 +1083,15 @@ \cs_new_eq:NN \@@_copy_grabber_R_alt:w \@@_copy_grabber_D_alt:w % \end{macrocode} % -% |E| is also straightforward: we just copy the embellishments over: +% |E| is straightforward: we just copy the embellishments over, and +% increase the current argument number \cs{l_@@_current_arg_int} by +% the number of embellishments (minus one because there is a +% \cs{int_incr:N} down the line). % \begin{macrocode} \cs_new_protected:Npn \@@_copy_grabber_E:w #1 #2 #3 #4 { \tl_put_right:Nn \l_@@_tmpa_tl { {#3} {#4} } + \int_add:Nn \l_@@_current_arg_int { \tl_count:n {#4} - 1 } \@@_copy_expandable:nnN {#1} {#2} } \cs_new_eq:NN \@@_copy_grabber_E_long:w \@@_copy_grabber_E:w