summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/diffcoeff/diffcoeff.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/diffcoeff/diffcoeff.sty')
-rw-r--r--macros/latex/contrib/diffcoeff/diffcoeff.sty26
1 files changed, 15 insertions, 11 deletions
diff --git a/macros/latex/contrib/diffcoeff/diffcoeff.sty b/macros/latex/contrib/diffcoeff/diffcoeff.sty
index 71689c911e..3d952355fa 100644
--- a/macros/latex/contrib/diffcoeff/diffcoeff.sty
+++ b/macros/latex/contrib/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 ,