diff options
author | Karl Berry <karl@freefriends.org> | 2019-12-22 21:55:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-12-22 21:55:36 +0000 |
commit | a89d1e178e0653d79abc0282a99b7727d0911bc1 (patch) | |
tree | 15f96657e91cf7c72a2e35513dcfa718a1421d71 /Master/texmf-dist/tex/latex/derivative | |
parent | e9b1cf1cbeb6521132ab49705e472b9683c8f859 (diff) |
derivative (22dec19)
git-svn-id: svn://tug.org/texlive/trunk@53210 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/derivative')
-rw-r--r-- | Master/texmf-dist/tex/latex/derivative/derivative.sty | 26 |
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 + |