summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-12-30 22:14:46 +0000
committerKarl Berry <karl@freefriends.org>2018-12-30 22:14:46 +0000
commit15511bd89c498bd45f96d60182fb2ef8245041ab (patch)
treec6f504180a284a6bef9da8b7dee0d49ea960a541 /Master/texmf-dist
parent5892a627fcfd12a74574492588a18d1b5ca0c9f1 (diff)
skmath (30dec18)
git-svn-id: svn://tug.org/texlive/trunk@49550 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/skmath/README4
-rw-r--r--Master/texmf-dist/doc/latex/skmath/skmath.pdfbin215467 -> 283968 bytes
-rw-r--r--Master/texmf-dist/source/latex/skmath/skmath.tex75
-rw-r--r--Master/texmf-dist/tex/latex/skmath/skmath.sty34
4 files changed, 103 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/latex/skmath/README b/Master/texmf-dist/doc/latex/skmath/README
index 81a018c49c7..6c27ea912e8 100644
--- a/Master/texmf-dist/doc/latex/skmath/README
+++ b/Master/texmf-dist/doc/latex/skmath/README
@@ -1,6 +1,6 @@
%% skmath improved math commands
%%
-%% Copyright (C) 2012-2016 by Simon Sigurdhsson <sigurdhsson@gmail.com>
+%% Copyright (C) 2012-2019 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
@@ -17,7 +17,7 @@
%% This work consists of the file skmath.tex
%% and the derived file skmath.sty.
-This is version 0.4b of the skmath package, a package which provides
+This is version 0.5 of the skmath package, a package which provides
improved and new math commands for superior typesetting with lower effort.
The following files are enclosed.
diff --git a/Master/texmf-dist/doc/latex/skmath/skmath.pdf b/Master/texmf-dist/doc/latex/skmath/skmath.pdf
index e160ccde722..170c185bd5d 100644
--- a/Master/texmf-dist/doc/latex/skmath/skmath.pdf
+++ b/Master/texmf-dist/doc/latex/skmath/skmath.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/skmath/skmath.tex b/Master/texmf-dist/source/latex/skmath/skmath.tex
index 83fe206908a..424e795f6b6 100644
--- a/Master/texmf-dist/source/latex/skmath/skmath.tex
+++ b/Master/texmf-dist/source/latex/skmath/skmath.tex
@@ -1,6 +1,6 @@
%% skmath improved math commands
%%
-%% Copyright (C) 2012-2016 by Simon Sigurdhsson <sigurdhsson@gmail.com>
+%% Copyright (C) 2012-2019 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
@@ -22,6 +22,7 @@
\usepackage{csquotes}
\ProvideDocumentCommand\d{m}{#1}
\ProvideDocumentCommand\pd{smm}{#2#3}
+\ProvideDocumentCommand\td{mm}{#1#2}
\ProvideDocumentCommand\abs{m}{#1}
\ProvideDocumentCommand\norm{m}{#1}
\ProvideDocumentCommand\abs{m}{#1}
@@ -37,6 +38,7 @@
\ProvideDocumentCommand\C{}{}
\ProvideDocumentCommand\ii{}{i}
\ProvideDocumentCommand\jj{}{j}
+\ProvideDocumentCommand\ee{}{e}
\ProvideDocumentCommand\sfrac{mm}{#1#2}
\ProvideDocumentCommand\argmin{om}{#1}
\ProvideDocumentCommand\argmax{om}{#1}
@@ -56,7 +58,7 @@
% This is where the documentation begins
\begin{document}
% Change & version info
- \version{0.4b}
+ \version{0.5}
\changes{0.1}{Initial version}
\changes{0.1c}{Moved package from \pkg{docstrip} to \pkg{skdoc}}
\changes{0.1d}{Fixed fatal documentation and package errors}
@@ -69,6 +71,7 @@
\changes{0.4}{Added \opt{notation} option, macros for complex numbers}
\changes{0.4a}{Replaced deprecated/removed \pkg{expl3} constructs}
\changes{0.4b}{Track \pkg{expl3} changes (thanks to Joseph Wright)}
+ \changes{0.5}{Added \cs{td} and \cs{ee}}
% Don't forget to update the version number and release date of
% the package declaration in the implementation!
@@ -131,6 +134,10 @@
of the package simply results in italic characters, setting the \opt{notation}
option to \texttt{iso} will set these upright.
+ \DescribeMacro\ee
+ This command typesets Euler's number \(\ee = \sum_{n=0}^\infty\frac{1}{n!}\).
+ The style is affected by the \opt{notation} option in the same way as \Macro\exp.
+
\DescribeMacro\norm{<expression>}
\DescribeMacro\abs{<expression>}
The commands \Macro\norm and \Macro\abs, quite expectedly, typeset
@@ -169,6 +176,15 @@
supports superscripts to denote the number of derivatives, and the
sum of the variables is automatically calculated.
+ \DescribeMacro\td{<function>}{<var>}
+ This macro typesets a total derivative. Unlike \Macro\pd, this macro does
+ not have a starred variant, and only typesets full fractions:
+\begin{example}
+\begin{equation*}
+ \td{f}{x^m}
+\end{equation*}
+\end{example}
+
\DescribeMacro\E{<expression>}
The command \Macro\E typesets the expectation of a random variable.
\begin{example}
@@ -232,7 +248,7 @@
\DescribeMacro\exp*{<expression>}
The exponential, \Macro\exp, is redefined to typeset its argument as a
- superscript of \(e\) in some display styles, and as an argument of
+ superscript of \(\ee\) in some display styles, and as an argument of
\(\mathrm{exp}\) otherwise:
\begin{equation*}
\exp{\sqrt{2}\exp{x}}
@@ -303,7 +319,7 @@
\begin{MacroCode}{package}
\RequirePackage{expl3,l3keys2e,xparse}
\ProvidesExplPackage{skmath}
- {2017/01/08}{0.4b}{improved math commands}
+ {2018/12/29}{0.5}{improved math commands}
\PassOptionsToPackage{intlimits,sumlimits,namelimits}{amsmath}
\RequirePackage{amssymb,mathtools,xfrac}
\end{MacroCode}
@@ -324,6 +340,9 @@ First, some placeholders to detect failures.
\cs_gset_nopar:Npn\__skmath_imaginary_unit:n#1{
\msg_critical:nnn{skmath}{undefined-macro}{\__skmath_imaginary_unit:n}
}
+\cs_gset_nopar:Npn\__skmath_total_derivative_d:{
+ \msg_critical:nnn{skmath}{undefined-macro}{\__skmath_total_derivative_d:n}
+}
\end{MacroCode}
Then, the key-value options.
\begin{MacroCode}{package}
@@ -349,6 +368,10 @@ Then, the key-value options.
imaginary-unit / slanted .code:n = { \cs_gset_nopar:Npn\__skmath_imaginary_unit:n##1{{##1}} },
complex-part-symbols .bool_set_inverse:N = \g__skmath_iso_complex_parts_bool,
complex-part-symbols .value_required:n = true,
+ total-derivative-d .choice:,
+ total-derivative-d .value_required:n = true,
+ total-derivative-d / upright .code:n = { \cs_gset_nopar:Npn\__skmath_total_derivative_d:{{\operator@font d}} },
+ total-derivative-d / slanted .code:n = { \cs_gset_nopar:Npn\__skmath_total_derivative_d:{{d}} },
}
\end{MacroCode}
@@ -366,6 +389,7 @@ We also declare the \enquote{public} options.
natural-log = upright,
imaginary-unit = upright,
complex-part-symbols = false,
+ total-derivative-d = upright,
},
notation / german .meta:nn = {skmath / internal}{
integral-d = upright,
@@ -373,6 +397,7 @@ We also declare the \enquote{public} options.
natural-log = slanted, %???
imaginary-unit = slanted, %???
complex-part-symbols = true, %???
+ total-derivative-d = upright, %???
},
notation / english .meta:nn = {skmath / internal}{
integral-d = slanted,
@@ -380,6 +405,7 @@ We also declare the \enquote{public} options.
natural-log = slanted, %???
imaginary-unit = slanted, %???
complex-part-symbols = true, %???
+ total-derivative-d = slanted, %???
},
notation / legacy .meta:nn = {skmath / internal}{
integral-d = upright,
@@ -387,6 +413,7 @@ We also declare the \enquote{public} options.
natural-log = slanted,
imaginary-unit = slanted,
complex-part-symbols = true,
+ total-derivative-d = slanted,
},
% Possibly more style sets... ?
notation .initial:n = legacy, % Or is it? Perhaps a legacy option is required.
@@ -696,6 +723,11 @@ We optionally load \pkg{isomath}, depending on notation style.
}
\end{MacroCode}
\end{macro}
+ \begin{macro}{\ee}
+ \begin{MacroCode}{package}
+ \DeclareDocumentCommand\ee{}{\ensuremath{\__skmath_natural_log_e:}}
+ \end{MacroCode}
+ \end{macro}
\begin{macro}{\exp}
\changes{0.1b}{Moved to \textsf{xparse} command definition}
\changes{0.3a}{Added starred variant}
@@ -778,7 +810,7 @@ We optionally load \pkg{isomath}, depending on notation style.
\end{MacroCode}
\end{macro}
- We introduce a couple of helper macros for the \cs{pd} macro backend.
+ We introduce a couple of helper macros for \cs{pd} and \cs{td}.
\begin{macro*}{\__skmath_if_numerical_p:n}
\begin{macro*}{\__skmath_if_numerical:nT}
\begin{macro*}{\__skmath_if_numerical:nF}
@@ -926,8 +958,26 @@ We optionally load \pkg{isomath}, depending on notation style.
}
\end{MacroCode}
\end{macro*}
+ \begin{macro*}{\__skmath_td_fraction:nn}[2]
+ {Tokens representing a mathematical function}
+ {A single variable, possibly with a superscript}
+\begin{MacroCode}{package}
+\cs_new_nopar:Npn\__skmath_td_fraction:nn#1#2{
+ \frac{
+ \__skmath_total_derivative_d:
+ \__skmath_pd_if_vars_sum_above_one:nT{#2}{
+ \c_math_superscript_token{\__skmath_pd_vars_sum:n{#2}}
+ }
+ {#1}
+ }{
+ \__skmath_total_derivative_d:
+ #2
+ }
+}
+\end{MacroCode}
+ \end{macro*}
- Definition of \cs{bar}, \cs{pd} and \cs{d} is deferred until after all
+ Definition of \cs{bar}, \cs{pd}, \cs{td} and \cs{d} is deferred until after all
packages are loaded to avoid collisions with other packages.
\begin{MacroCode}{package}
\AtBeginDocument{%
@@ -959,6 +1009,19 @@ We optionally load \pkg{isomath}, depending on notation style.
\end{MacroCode}
\end{macro}
+ We also have the total derivative macro,
+ \begin{macro}{\td}[2]
+ {Tokens representing a mathematical function}
+ {A single variable, possibly with a superscript}
+\begin{MacroCode}{package}
+\DeclareDocumentCommand\td{mm}{
+ \ensuremath{
+ \__skmath_td_fraction:nn{#1}{#2}
+ }
+}
+\end{MacroCode}
+ \end{macro}
+
We introduce a command to typeset the differential part
of integrals, shamefully stolen from an answer on \TeX.SE.
\begin{macro}{\d}
diff --git a/Master/texmf-dist/tex/latex/skmath/skmath.sty b/Master/texmf-dist/tex/latex/skmath/skmath.sty
index 57a8fd6c3b7..e856f324f67 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-2016 by Simon Sigurdhsson <sigurdhsson@gmail.com>
+%% Copyright (C) 2012-2019 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,7 +20,7 @@
\RequirePackage{expl3,l3keys2e,xparse}
\ProvidesExplPackage{skmath}
- {2017/01/08}{0.4b}{improved math commands}
+ {2018/12/29}{0.5}{improved math commands}
\PassOptionsToPackage{intlimits,sumlimits,namelimits}{amsmath}
\RequirePackage{amssymb,mathtools,xfrac}
\msg_new:nnnn{skmath}{undefined-macro}{The~macro~`\token_to_str:N#1'~was~undefined!}
@@ -36,6 +36,9 @@
\cs_gset_nopar:Npn\__skmath_imaginary_unit:n#1{
\msg_critical:nnn{skmath}{undefined-macro}{\__skmath_imaginary_unit:n}
}
+\cs_gset_nopar:Npn\__skmath_total_derivative_d:{
+ \msg_critical:nnn{skmath}{undefined-macro}{\__skmath_total_derivative_d:n}
+}
\keys_define:nn{skmath / internal}{
% More on this:
% * http://en.wikipedia.org/wiki/Typographical_conventions_in_mathematical_formulae
@@ -58,6 +61,10 @@
imaginary-unit / slanted .code:n = { \cs_gset_nopar:Npn\__skmath_imaginary_unit:n##1{{##1}} },
complex-part-symbols .bool_set_inverse:N = \g__skmath_iso_complex_parts_bool,
complex-part-symbols .value_required:n = true,
+ total-derivative-d .choice:,
+ total-derivative-d .value_required:n = true,
+ total-derivative-d / upright .code:n = { \cs_gset_nopar:Npn\__skmath_total_derivative_d:{{\operator@font d}} },
+ total-derivative-d / slanted .code:n = { \cs_gset_nopar:Npn\__skmath_total_derivative_d:{{d}} },
}
\keys_define:nn{skmath}{
commonsets .bool_set:N = \g__skmath_define_common_sets_bool,
@@ -71,6 +78,7 @@
natural-log = upright,
imaginary-unit = upright,
complex-part-symbols = false,
+ total-derivative-d = upright,
},
notation / german .meta:nn = {skmath / internal}{
integral-d = upright,
@@ -78,6 +86,7 @@
natural-log = slanted, %???
imaginary-unit = slanted, %???
complex-part-symbols = true, %???
+ total-derivative-d = upright, %???
},
notation / english .meta:nn = {skmath / internal}{
integral-d = slanted,
@@ -85,6 +94,7 @@
natural-log = slanted, %???
imaginary-unit = slanted, %???
complex-part-symbols = true, %???
+ total-derivative-d = slanted, %???
},
notation / legacy .meta:nn = {skmath / internal}{
integral-d = upright,
@@ -92,6 +102,7 @@
natural-log = slanted,
imaginary-unit = slanted,
complex-part-symbols = true,
+ total-derivative-d = slanted,
},
% Possibly more style sets... ?
notation .initial:n = legacy, % Or is it? Perhaps a legacy option is required.
@@ -231,6 +242,8 @@
{\ensuremath{\__skmath_log:\__skmath_parens:n{#2}}}
{\ensuremath{\__skmath_log:\c_math_subscript_token{#1}\__skmath_parens:n{#2}}}%
}
+ \DeclareDocumentCommand\ee{}{\ensuremath{\__skmath_natural_log_e:}}
+
\RenewDocumentCommand\exp{sm}{\ensuremath{
\IfBooleanTF{#1}{
\__skmath_exp:\__skmath_parens:n{#2}
@@ -369,6 +382,18 @@
\__skmath_pd_subscript_vars:n{#2}
}
}
+\cs_new_nopar:Npn\__skmath_td_fraction:nn#1#2{
+ \frac{
+ \__skmath_total_derivative_d:
+ \__skmath_pd_if_vars_sum_above_one:nT{#2}{
+ \c_math_superscript_token{\__skmath_pd_vars_sum:n{#2}}
+ }
+ {#1}
+ }{
+ \__skmath_total_derivative_d:
+ #2
+ }
+}
\AtBeginDocument{%
\DeclareDocumentCommand\bar{m}{%
\ensuremath{\mkern 1.5mu\overline{\mkern-1.5mu{#1}\mkern-1.5mu}\mkern 1.5mu}}
@@ -379,6 +404,11 @@
{\__skmath_pd_fraction:nn{#2}{#3}}
}
}
+\DeclareDocumentCommand\td{mm}{
+ \ensuremath{
+ \__skmath_td_fraction:nn{#1}{#2}
+ }
+}
\DeclareDocumentCommand\d{m}{\ensuremath{\,\__skmath_integral_d: #1%
\peek_meaning_ignore_spaces:NT\d{\!}}}
}