summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/derivative
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-05-29 03:01:39 +0000
committerNorbert Preining <norbert@preining.info>2021-05-29 03:01:39 +0000
commitc735cad430ba6a619963ad7248020b781a0a45f3 (patch)
treeea6084fa9eea4a658d4f3eb9f2495cf269c7f790 /macros/latex/contrib/derivative
parentfd03eb3aab9edb9b15484a1130509cebe187d8bd (diff)
CTAN sync 202105290301
Diffstat (limited to 'macros/latex/contrib/derivative')
-rw-r--r--macros/latex/contrib/derivative/README.md2
-rw-r--r--macros/latex/contrib/derivative/derivative.pdfbin179334 -> 179298 bytes
-rw-r--r--macros/latex/contrib/derivative/derivative.sty23
-rw-r--r--macros/latex/contrib/derivative/derivative.tex55
4 files changed, 32 insertions, 48 deletions
diff --git a/macros/latex/contrib/derivative/README.md b/macros/latex/contrib/derivative/README.md
index 94ee7eff7a..72d73433ed 100644
--- a/macros/latex/contrib/derivative/README.md
+++ b/macros/latex/contrib/derivative/README.md
@@ -1,4 +1,4 @@
-## README for derivative package v1.0 dated 2021-05-25
+## README for derivative package v1.01 dated 2021-05-28
The package provides a set of commands `\NewDerivative`, `\NewDifferential` etc. that can be used to define a derivative or a differential operator, respectively. The package have already defined several derivatives and differentials:
diff --git a/macros/latex/contrib/derivative/derivative.pdf b/macros/latex/contrib/derivative/derivative.pdf
index 8f97eaa120..c18c477ca4 100644
--- a/macros/latex/contrib/derivative/derivative.pdf
+++ b/macros/latex/contrib/derivative/derivative.pdf
Binary files differ
diff --git a/macros/latex/contrib/derivative/derivative.sty b/macros/latex/contrib/derivative/derivative.sty
index 6994b23a95..13eac36065 100644
--- a/macros/latex/contrib/derivative/derivative.sty
+++ b/macros/latex/contrib/derivative/derivative.sty
@@ -16,7 +16,7 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{xparse}[2018/05/09]
-\ProvidesExplPackage{derivative}{2021/05/25}{1.0}{Nice and easy derivatives and differentials for LaTeX}
+\ProvidesExplPackage{derivative}{2021/05/28}{1.01}{Nice and easy derivatives and differentials for LaTeX}
%%%%% Useful conditionals %%%%%
@@ -147,6 +147,7 @@
\prop_const_from_keyval:Nn \c__deriv_dv_pkg_keys_prop
{
+ style-inf = d,
style-frac = \frac,
style-frac-/ = \slashfrac,
style-var = single,
@@ -188,12 +189,9 @@
mixed-order = 1
}
-\bool_lazy_or:nnTF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: }
-{ \prop_gput:Nnn \c__deriv_dv_pkg_keys_prop { style-inf } { \symnormal } }
-{ \prop_gput:Nnn \c__deriv_dv_pkg_keys_prop { style-inf } { \mathnormal } }
-
\prop_const_from_keyval:Nn \c__deriv_i_pkg_keys_prop
{
+ style-inf = d,
style-notation = multiple,
style-notation-* = single,
scale-var = auto,
@@ -207,16 +205,12 @@
sep-var-inf = \mathop{}\!,
sep-var-var = {,},
sep-ord-ord = {,},
- sep-end = \mathop{}\!,
+ sep-end = 0,
switch-* = false,
var = none,
order = 1
}
-\bool_lazy_or:nnTF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: }
-{ \prop_gput:Nnn \c__deriv_i_pkg_keys_prop { style-inf } { \symnormal } }
-{ \prop_gput:Nnn \c__deriv_i_pkg_keys_prop { style-inf } { \mathnormal } }
-
%%%%%% Key-val for all %%%%%%
\prop_const_from_keyval:Nn \c__deriv_all_pkg_keys_prop
@@ -387,12 +381,13 @@
\cs_new_protected:Npn \deriv_preamble:NNnnn #1 #2 #3 #4 #5
{
\tl_set:Nx #1 { \cs_to_str:N #2 }
- \__deriv_preamble_aux:Vnn #1 {#4} {#5}
- \exp_args:NV \deriv_set_style_inf:nnn {#1} {#3} {#5}
+ \tl_if_novalue:nTF {#4}
+ { \__deriv_preamble_aux:Vnn #1 { style-inf={#3} } {#5} }
+ { \__deriv_preamble_aux:Vnn #1 { style-inf={#3}, #4} {#5} }
}
-% dv/i, variant, inf
+% variant, inf, dv/i
\cs_new_protected:Npn \deriv_set_style_inf:nnn #1 #2 #3
-{ \keys_set:nn { deriv/#3/#1 } { style-inf = {#2} } }
+{ \__deriv_set_default:nnn {#1} { style-inf = {#2} } {#3} }
% variant, key-value, dv/i
\cs_new_protected:Npn \__deriv_preamble_aux:nnn #1 #2 #3
{
diff --git a/macros/latex/contrib/derivative/derivative.tex b/macros/latex/contrib/derivative/derivative.tex
index fe7cf2ddc9..840b868396 100644
--- a/macros/latex/contrib/derivative/derivative.tex
+++ b/macros/latex/contrib/derivative/derivative.tex
@@ -50,17 +50,6 @@ indent_length "2"
\definecolor{RoyalBlue}{RGB}{0, 35, 102}
\definecolor{RoyalGreen}{RGB}{32, 77, 2}
- %\definecolor{RoyalGray}{RGB}{75, 75, 75}
- %\definecolor{RoyalDarkGray}{RGB}{225, 225, 225}
- %\definecolor{RoyalLightGray}{RGB}{30, 30, 30}
- %\definecolor{RoyalRed}{RGB}{255, 177, 151} % 207, 102, 121
- %\definecolor{RoyalBlue}{RGB}{187, 134, 252} % 55, 185, 255
- %\definecolor{RoyalGreen}{RGB}{3, 218, 198} % 52, 177, 20
- %\definecolor{RoyalPageCoulor}{RGB}{18, 18, 18} % 30, 30, 30
- %\definecolor{RoyalTextCoulor}{RGB}{225, 225, 225}
- %\pagecolor{RoyalPageCoulor}
- %\color{RoyalTextCoulor}
-
\RequirePackage{amsmath, amsthm}
\allowdisplaybreaks
\theoremstyle{remark}
@@ -103,7 +92,7 @@ indent_length "2"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\NewDocumentCommand{\forside}{}
+\NewDocumentCommand{\forside}{ m }
{
\thispagestyle{empty}
@@ -134,7 +123,7 @@ indent_length "2"
\begin{abstract}
\noindent \ignorespaces
- The~\mypackage{}~package~provides~a~set~of~commands~which~makes~writing~ordinary~and~partial~derivatives~of~arbitrary~order~in~a~straight~forward~manner.~Additionally,~this~package~provides~a~set~of~commands~to~define~variants~of~the~aforementioned~derivatives.~A~set~of~optional~arguments~along~with~lots~of~package~options~allow~for~easy~and~great~flexibility~over~the~derivative's~format,~such~as~where~the~function~is~positioned,~point~of~evaluation,~and~switching~between~fraction~styles.~Moreover,~the~mixed~order~of~the~partial~derivative~and~variants~hereof~is~automatically~computed.~This~package~is~written~in~the~\pkg{expl3}~language~and~requires~therefore~the~\LaTeX3~package~bundles~\pkg{l3kernel}~and~\pkg{l3package}.~Additionally,~the~\pkg{mleftright}~package~is~optional~and~provides~the~improved~automatically~scaling~\cs{mleft}~and~\cs{mright}.
+ #1
\end{abstract}
\vfill
@@ -394,7 +383,6 @@ indent_length "2"
{
}
-
\tl_new:N \l__mydoc_number_tl
\tl_new:N \l_mydoc_index_item_tl
\tl_new:N \l_mydoc_index_subitem_tl
@@ -1319,14 +1307,12 @@ indent_length "2"
\ExplSyntaxOff
\makeatother
-
-
\Pakkenavn{derivative}
\Titel{The \pakkenavn{} package}
\Forfatter{Simon Jensen}
\Email{sjelatex@gmail.com}
-\Dato{2021/05/25}
-\Version{1.0}
+\Dato{2021/05/28}
+\Version{1.01}
\RequirePackage{derivative}[\dato]
\derivset{all}[scale-auto = mleftmright]
@@ -1362,13 +1348,14 @@ indent_length "2"
\begin{document}
- \forside
+ \forside{%
+ The \mypackage{} package provides a set of commands which makes writing ordinary and partial derivatives of arbitrary order in a straight forward manner. Additionally, this package provides a set of commands to define variants of the aforementioned derivatives. A set of optional arguments along with lots of package options allow for easy and great flexibility over the derivative's format, such as where the function is positioned, point of evaluation, and switching between fraction styles. Moreover, the mixed order of the partial derivative and variants hereof is automatically computed. This package is written in the \pkg{expl3} language and requires therefore the \LaTeX3 package bundles \pkg{l3kernel} and \pkg{l3package}. Additionally, the \pkg{mleftright} package is optional and provides the improved automatically scaling \cs{mleft} and \cs{mright}.%
+ }
\clearpage
\tableofcontents
\clearpage
- \section{Introduction}
This package started as a personal package a few years ago that I used in various projects. Firstly, it was written in \tex{} and \latex, which gave rise to various errors as the complexity of the package grew larger and ended up as a spaghetti code. Therefore, the code was rewritten into the \latex3 language and may now be easily maintained. Originally this package was written because there did not exist any great package for derivatives. It was first much later that I discovered the \pkg{diffcoeff} package, which does a good job. However, at this time, I had already written much of the code with no documentation. So I decided to write one and make it into a package for the public.
As a note on terminology, I use the wording \emph{infinitesimal} abbreviated as \texttt{inf} for the operator symbols $d, \partial, \delta$ etc. that used in derivatives like $\odv{y}{x}, \pdv{y}{x}, \fdv{y}{x}$ and in differentials like $\odif{x}, \pdif{x}, \fdif{x}$. In the description of macros and options, I often write \emph{cs-\meta{placeholder}} to denote a comma-separated list of \meta{placeholder}. For example, \oarg{cs-numbers} is used in the option section for math space keys to denote comma-separated list of numbers. It should also be noted that whenever an argument reads \meta{keyvalue list}, it means that it is a comma-separated list of keyvalue pairs.
@@ -2041,7 +2028,7 @@ indent_length "2"
\subsubsection*{Miscellaneous}
\begin{option}*{fun}[cat=misc, new = v1.0]
- \begin{values}
+ \begin{values}[default = false]
true, false
\end{values}
Adds or remove delimiters around the function.
@@ -2054,7 +2041,7 @@ indent_length "2"
\end{option}
\begin{option}{frac}[cat=misc, new = v1.0]
- \begin{values}
+ \begin{values}[default = false]
true, false
\end{values}
Adds or remove delimiters around the fractional part of the derivative.
@@ -2232,7 +2219,7 @@ indent_length "2"
\end{option}
\begin{option}{sep-end}
- \begin{values}[default = \cs{mathop}\{\}\cs{!}]
+ \begin{values}[default = 0]
\meta{cs-number}, \marg{mspace}, \marg{delimiter}
\end{values}
Sets the math space that is inserted to the right of the last differential. The key's default value is \val{\default}.
@@ -2288,7 +2275,6 @@ indent_length "2"
\end{option}
-
\clearpage
\section{Defining variants} \label{sec:defvar}
This section goes into detail with how to define derivative and differential variants based on the package's internal commands, as mentioned earlier. The \mypackage{} package provides a \latex2 way of defining the derivatives.
@@ -2485,6 +2471,8 @@ indent_length "2"
\pdv[order={n+3k, n-k}, mixed-order={2(n+k)}]{f}{x,y}
\end{example}
+
+
\clearpage
\section{Miscellaneous}
@@ -2518,7 +2506,6 @@ indent_length "2"
\end{function}
-
\clearpage
\section{To do}\label{sec:todo}
@@ -2531,11 +2518,11 @@ indent_length "2"
\answer{\cmark\xmark}{There could be an draft/final option for the package. But what is should turn off/on is harder to say.}
\end{todo}
- \subsection{Future changes}
- The list describes what \emph{will be changed} in the package in a later release.
- \begin{changes}
- \item
- \end{changes}
+ %\subsection{Future changes}
+ %The list describes what \emph{will be changed} in the package in a later release.
+ %\begin{changes}
+ % \item
+ %\end{changes}
\subsection{Future considerations}
The list describes what \emph{might be changed or added} to the package in a later release.
@@ -2547,7 +2534,6 @@ indent_length "2"
\end{consideration}
-
\clearpage
\addsec{Index}
Numbers in bold refer to the page where the entry is defined.
@@ -2558,8 +2544,6 @@ indent_length "2"
\printindex[macro]
-
-
\clearpage
\addsec{Change history}
@@ -2610,6 +2594,11 @@ indent_length "2"
\item Fixed Documentation errors
\item Enhanced support for preventing options effecting nested derivatives/differentials
\end{change}
+ \begin{change}[version = 1.01, date = 2021-05-28, beta = false]
+ \item Changed the option \key[index=false]{sep-end} default value because it caused issues
+ \item Fixed code errors due to changes introduced in version 1.0 to the option \key[index=false]{style-inf}
+ \item Fixed documentation errors
+ \end{change}
\end{changelog}
\end{document} \ No newline at end of file