summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/skmath
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-06-18 23:08:35 +0000
committerKarl Berry <karl@freefriends.org>2014-06-18 23:08:35 +0000
commit6271138aedb2f61eee0225300db1569008084a10 (patch)
tree5662b0f680b563f8fb10a07a6f719263186370b8 /Master/texmf-dist/tex/latex/skmath
parentd9ded1f7a86fd5831eedd265ad79ab666a390684 (diff)
skmath (14jun14)
git-svn-id: svn://tug.org/texlive/trunk@34297 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/skmath')
-rw-r--r--Master/texmf-dist/tex/latex/skmath/skmath.sty66
1 files changed, 40 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/skmath/skmath.sty b/Master/texmf-dist/tex/latex/skmath/skmath.sty
index b5e29a7c07f..c833b397a3f 100644
--- a/Master/texmf-dist/tex/latex/skmath/skmath.sty
+++ b/Master/texmf-dist/tex/latex/skmath/skmath.sty
@@ -1,7 +1,7 @@
%% This is file `skmath.sty', generated from `skmath.tex' (key `package').
%% skmath improved math commands
%%
-%% Copyright (C) 2012-2013 by Simon Sigurdhsson <sigurdhsson@gmail.com>
+%% Copyright (C) 2012-2014 by Simon Sigurdhsson <sigurdhsson@gmail.com>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -20,9 +20,23 @@
\RequirePackage{expl3,l3keys2e,xparse}
\ProvidesExplPackage{skmath}
- {2013/06/24}{0.3a}{improved math commands}
+ {2014/06/13}{0.3b}{improved math commands}
\PassOptionsToPackage{intlimits,sumlimits,namelimits}{amsmath}
\RequirePackage{amssymb,mathtools,xfrac,isomath}
+\prg_new_conditional:Npnn\__skmath_if_novalue_or_empty:n#1{F}{
+ \IfNoValueTF{#1}{
+ \prg_return_true:
+ }{
+ \tl_if_empty:nTF{#1}{
+ \prg_return_true:
+ }{
+ \prg_return_false:
+ }
+ }
+}
+\cs_new_nopar:Npn\__skmath_parens:n#1{
+ \__skmath_if_novalue_or_empty:nF{#1}{\left(#1\right)}
+}
\cs_new:Nn\__skmath_define_common_sets:{
\NewDocumentCommand\N{}{\ensuremath{\mathbb{N}}}
\NewDocumentCommand\Z{}{\ensuremath{\mathbb{Z}}}
@@ -63,7 +77,7 @@
\cs_new_eq:NN\__skmath_sinh:\sinh
\cs_new_eq:NN\__skmath_cosh:\cosh
\cs_new_eq:NN\__skmath_tanh:\tanh
-\cs_new_eq:NN\__skmath_ln:\log
+\cs_new_eq:NN\__skmath_ln:\ln
\cs_new_eq:NN\__skmath_log:\log
\cs_new_eq:NN\__skmath_exp:\exp
\cs_new_eq:NN\__skmath_min:\min
@@ -72,59 +86,59 @@
\cs_new_eq:NN\__skmath_inf:\inf
\RenewDocumentCommand\sin{om}{%
\IfNoValueTF{#1}
- {\ensuremath{\__skmath_sin:\left(#2\right)}}
- {\ensuremath{\__skmath_sin:\c_math_superscript_token{#1}\left(#2\right)}}%
+ {\ensuremath{\__skmath_sin:\__skmath_parens:n{#2}}}
+ {\ensuremath{\__skmath_sin:\c_math_superscript_token{#1}\__skmath_parens:n{#2}}}%
}
\RenewDocumentCommand\cos{om}{%
\IfNoValueTF{#1}
- {\ensuremath{\__skmath_cos:\left(#2\right)}}
- {\ensuremath{\__skmath_cos:\c_math_superscript_token{#1}\left(#2\right)}}%
+ {\ensuremath{\__skmath_cos:\__skmath_parens:n{#2}}}
+ {\ensuremath{\__skmath_cos:\c_math_superscript_token{#1}\__skmath_parens:n{#2}}}%
}
\RenewDocumentCommand\tan{om}{%
\IfNoValueTF{#1}
- {\ensuremath{\__skmath_tan:\left(#2\right)}}
- {\ensuremath{\__skmath_tan:\c_math_superscript_token{#1}\left(#2\right)}}%
+ {\ensuremath{\__skmath_tan:\__skmath_parens:n{#2}}}
+ {\ensuremath{\__skmath_tan:\c_math_superscript_token{#1}\__skmath_parens:n{#2}}}%
}
\RenewDocumentCommand\cot{om}{%
\IfNoValueTF{#1}
- {\ensuremath{\__skmath_cot:\left(#2\right)}}
- {\ensuremath{\__skmath_cot:\c_math_superscript_token{#1}\left(#2\right)}}%
+ {\ensuremath{\__skmath_cot:\__skmath_parens:n{#2}}}
+ {\ensuremath{\__skmath_cot:\c_math_superscript_token{#1}\__skmath_parens:n{#2}}}%
}
\RenewDocumentCommand\arcsin{m}{%
- \ensuremath{\__skmath_arcsin:\left(#1\right)}%
+ \ensuremath{\__skmath_arcsin:\__skmath_parens:n{#1}}%
}
\RenewDocumentCommand\arccos{m}{%
- \ensuremath{\__skmath_arccos:\left(#1\right)}%
+ \ensuremath{\__skmath_arccos:\__skmath_parens:n{#1}}%
}
\RenewDocumentCommand\arctan{m}{%
- \ensuremath{\__skmath_arctan:\left(#1\right)}%
+ \ensuremath{\__skmath_arctan:\__skmath_parens:n{#1}}%
}
\RenewDocumentCommand\sinh{om}{%
\IfNoValueTF{#1}
- {\ensuremath{\__skmath_sinh:\left(#2\right)}}
- {\ensuremath{\__skmath_sinh:\c_math_superscript_token{#1}\left(#2\right)}}%
+ {\ensuremath{\__skmath_sinh:\__skmath_parens:n{#2}}}
+ {\ensuremath{\__skmath_sinh:\c_math_superscript_token{#1}\__skmath_parens:n{#2}}}%
}
\RenewDocumentCommand\cosh{om}{%
\IfNoValueTF{#1}
- {\ensuremath{\__skmath_cosh:\left(#2\right)}}
- {\ensuremath{\__skmath_cosh:\c_math_superscript_token{#1}\left(#2\right)}}%
+ {\ensuremath{\__skmath_cosh:\__skmath_parens:n{#2}}}
+ {\ensuremath{\__skmath_cosh:\c_math_superscript_token{#1}\__skmath_parens:n{#2}}}%
}
\RenewDocumentCommand\tanh{om}{%
\IfNoValueTF{#1}
- {\ensuremath{\__skmath_tanh:\left(#2\right)}}
- {\ensuremath{\__skmath_tanh:\c_math_superscript_token{#1}\left(#2\right)}}%
+ {\ensuremath{\__skmath_tanh:\__skmath_parens:n{#2}}}
+ {\ensuremath{\__skmath_tanh:\c_math_superscript_token{#1}\__skmath_parens:n{#2}}}%
}
\RenewDocumentCommand\ln{m}{%
- \ensuremath{\__skmath_ln:\left(#1\right)}%
+ \ensuremath{\__skmath_ln:\__skmath_parens:n{#1}}%
}
\RenewDocumentCommand\log{om}{%
\IfNoValueTF{#1}
- {\ensuremath{\__skmath_log:\left(#2\right)}}
- {\ensuremath{\__skmath_log:\c_math_subscript_token{#1}\left(#2\right)}}%
+ {\ensuremath{\__skmath_log:\__skmath_parens:n{#2}}}
+ {\ensuremath{\__skmath_log:\c_math_subscript_token{#1}\__skmath_parens:n{#2}}}%
}
\RenewDocumentCommand\exp{sm}{\ensuremath{
\IfBooleanTF{#1}{
- \__skmath_exp:\left(#2\right)
+ \__skmath_exp:\__skmath_parens:n{#2}
}{
\mathchoice
{e\c_math_superscript_token{#2}}
@@ -149,7 +163,7 @@
\ensuremath{\arg\__skmath_minmax_backend:nnnn{min}{#1}{#2}{#3}}
}
\RenewDocumentCommand\max{som}{%
- \ensuremath{\__skmath_max_minbackend:nnnn{max}{#1}{#2}{#3}}
+ \ensuremath{\__skmath_minmax_backend:nnnn{max}{#1}{#2}{#3}}
}
\NewDocumentCommand\argmax{som}{%
\ensuremath{\arg\__skmath_minmax_backend:nnnn{max}{#1}{#2}{#3}}
@@ -268,7 +282,7 @@
{\__skmath_pd_fraction:nn{#2}{#3}}
}
}
-\DeclareDocumentCommand\d{m}{\ensuremath{\,\mathrm{d}#1%
+\DeclareDocumentCommand\d{m}{\ensuremath{\,{\operator@font d}#1%
\peek_meaning_ignore_spaces:NT\d{\!}}}
}
\cs_set_eq:NN\vec\vectorsym