summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/derivative/derivative.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/derivative/derivative.sty')
-rw-r--r--Master/texmf-dist/tex/latex/derivative/derivative.sty26
1 files changed, 24 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/latex/derivative/derivative.sty b/Master/texmf-dist/tex/latex/derivative/derivative.sty
index 2305aa9d6bc..f805cbbf86d 100644
--- a/Master/texmf-dist/tex/latex/derivative/derivative.sty
+++ b/Master/texmf-dist/tex/latex/derivative/derivative.sty
@@ -16,7 +16,7 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{xparse}[2018/05/09]
-\ProvidesExplPackage{derivative}{2019/09/21}{0.95b}{Nice and easy derivatives}
+\ProvidesExplPackage{derivative}{2019/12/22}{0.96}{Nice and easy derivatives}
%%%%% Useful conditionals %%%%%
@@ -845,7 +845,27 @@
\bool_set_false:c { l__deriv_#1_mics_var_bool }
\__deriv_add_delims:nnn {#1} { var } {#2}
}
- { #2 }
+ { \__deriv_handle_double_sp:n {#2} }
+}
+% variable
+\cs_new:Npn \__deriv_handle_double_sp:n #1
+{
+ \tl_set:Nn \l_tmpa_tl {#1}
+ \str_set:Nn \l_tmpa_str {#1}
+
+ \str_if_in:NnTF \l_tmpa_str { ^ }
+ {
+ \exp_args:Nf
+ \str_if_eq:nnTF { \tl_item:Nn \l_tmpa_tl {-2} } { ^ }
+ { {#1} }
+ {
+ \exp_args:Nf
+ \str_if_eq:nnTF { \tl_item:Nn \l_tmpa_tl {-4} } { ^ }
+ { {#1} }
+ { #1 }
+ }
+ }
+ {#1}
}
% dv , code-for-fraction
\cs_new:Npn \__deriv_fraction:nn #1 #2
@@ -1326,4 +1346,6 @@
}
\derivset{all}
+
\endinput
+