From 4dcb0e470437016f028d4a7e29fd31b9185a48b6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 28 Dec 2019 22:24:07 +0000 Subject: diffcoeff (28dec19) git-svn-id: svn://tug.org/texlive/trunk@53244 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/diffcoeff/diffcoeff.sty | 26 +++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'Master/texmf-dist/tex/latex/diffcoeff') diff --git a/Master/texmf-dist/tex/latex/diffcoeff/diffcoeff.sty b/Master/texmf-dist/tex/latex/diffcoeff/diffcoeff.sty index 71689c911e7..3d952355faf 100644 --- a/Master/texmf-dist/tex/latex/diffcoeff/diffcoeff.sty +++ b/Master/texmf-dist/tex/latex/diffcoeff/diffcoeff.sty @@ -9,7 +9,7 @@ % \RequirePackage{expl3} \RequirePackage{xparse,l3keys2e,xtemplate} -\ProvidesExplPackage {diffcoeff} {2019/03/10} {3.1} +\ProvidesExplPackage {diffcoeff} {2019/12/28} {3.2} {Write differential coefficients consistently and easily.} % \keys_define:nn { diffcoeff } @@ -116,7 +116,7 @@ } { \AssignTemplateKeys - + \bool_if:NF\l__diffcoeff_integ_bool { \int_compare:nNnT { \l__diffcoeff_format_int } > { 1 } @@ -260,20 +260,22 @@ % differential % #1 variant; #2 = space in mu before d (0--9) % note \group_end placement for \vec{x} etc -\NewDocumentCommand \dl { d.. m } +\NewDocumentCommand \dl { d.. t- m } { \group_begin: \bool_set_true:N \l__diffcoeff_integ_bool \bool_set_true:N \l__diffcoeff_single_var_bool \seq_set_from_clist:Nn \l__diffcoeff_orders_seq { 1 } \tl_set:Nn \l__diffcoeff_tot_order_tl { 1 } - \IfValueT { #1 } { \tl_set:Nn \l__diffcoeff_type_tl { .#1 } } + \IfValueTF { #1 } + { \tl_set:Nn \l__diffcoeff_type_tl { .#1 } } + { \tl_set:Nn \l__diffcoeff_type_tl { } } \UseInstance { derivative } { ord\l__diffcoeff_type_tl } \l__diffcoeff_orders_seq \l__diffcoeff_tot_order_tl \c_empty_tl \c_empty_seq \c_empty_tl - \tl_if_in:NnTF \c__diffcoeff_digits_tl { #2 } - { \mkern #2 mu \l__diffcoeff_op_tl \group_end: } - { \l__diffcoeff_op_tl \group_end: #2 } + \tl_if_in:NnTF \c__diffcoeff_digits_tl { #3 } + { \mkern \IfBooleanT #2 { - }#3 mu \l__diffcoeff_op_tl \group_end: } + { \l__diffcoeff_op_tl \group_end: {} #3 } } \NewDocumentCommand \negmu {} { \mkern -1 mu } \NewDocumentCommand \nilmu {} { \mkern 0 mu } @@ -285,7 +287,7 @@ % #5(tl) = diff'iand; #6( / ) = slash boolean % #7(clist) = vars of diff.; #8(tl) = pt of eval./vars held const % #9(tl) = as #8 (for backwards compat) -\NewDocumentCommand \diff{ d.. s O{1} o m t/ m !O{#9} g } +\NewDocumentCommand \diff { d.. s O{1} o m t/ m !O{#9} g } { \group_begin: \tl_set:Nn \l__diffcoeff_differentiand_tl { #5 } @@ -322,9 +324,11 @@ \l__diffcoeff_tot_order_tl } } - \IfValueT { #1 } { \tl_set:Nn \l__diffcoeff_type_tl { .#1 } } - \int_zero:N \l__diffcoeff_format_int + \IfValueTF { #1 } + { \tl_set:Nn \l__diffcoeff_type_tl { .#1 } } + { \tl_set:Nn \l__diffcoeff_type_tl { } } % append? slash? + \int_zero:N \l__diffcoeff_format_int \IfBooleanT #2 { \int_incr:N \l__diffcoeff_format_int } \IfBooleanT #6 { \int_add:Nn \l__diffcoeff_format_int { 2 } } @@ -614,7 +618,7 @@ \DeclareInstance { derivative } { ord } { DERIV } { } \bool_if:NTF \g__diffcoeff_ISO_bool { - \diffdef {} + \diffdef { } { op-symbol = \mathrm{d}, op-order-sep = 0 mu , -- cgit v1.2.3