Skip to content

Commit b906af3

Browse files
authored
Add files via upload
1 parent 29a7fd0 commit b906af3

File tree

4 files changed

+23
-16
lines changed

4 files changed

+23
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## README for derivative package v0.97 dated 2020-02-03
1+
## README for derivative package v0.98 dated 2020-07-20
22

33
The package provides a set of commands `\NewOdvVariant`, `\NewPdvVariant` etc. that can be used to define a variant of a derivative. The package have already defined several derivatives:
44

derivative.pdf

289 Bytes
Binary file not shown.

derivative.sty

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
\NeedsTeXFormat{LaTeX2e}
1717

1818
\RequirePackage{xparse}[2018/05/09]
19-
\ProvidesExplPackage{derivative}{2020/02/03}{0.97}{Nice and easy derivatives}
19+
\ProvidesExplPackage{derivative}{2020/07/20}{0.98}{Nice and easy derivatives}
2020

2121
%%%%% Useful conditionals %%%%%
2222

@@ -451,7 +451,8 @@
451451
% dv , new/delare/renew/provide , macro , inf
452452
\cs_new_protected:Npn \deriv_d_define:nnnn #1 #2 #3 #4
453453
{
454-
\use:c { #2 DocumentCommand }{#3}{ s o m t/ m !e{\sb^} }
454+
\exp_args:Nnnx
455+
\use:c { #2 DocumentCommand }{#3}{ s o m t/ m !e{\char_generate:nn {`_}{8}^} }
455456
{
456457
\group_begin:
457458
\exp_args:Nnc \bool_xor:nnTF {##4} { l__deriv_#1_switch_slash_bool }
@@ -484,7 +485,8 @@
484485
% dv , new/delare/renew/provide , macro , inf
485486
\cs_new_protected:Npn \deriv_p_define:nnnn #1 #2 #3 #4
486487
{
487-
\use:c { #2 DocumentCommand }{#3}{ s o o m t/ m !e{\sb^} }
488+
\exp_args:Nnnx
489+
\use:c { #2 DocumentCommand }{#3}{ s o o m t/ m !e{\char_generate:nn {`_}{8}^} }
488490
{
489491
\group_begin:
490492
\exp_args:Nnc \bool_xor:nnTF {##5} { l__deriv_#1_switch_slash_bool }

derivative.tex

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,8 +1082,8 @@
10821082
\Titel{The \pakkenavn{} package}
10831083
\Forfatter{Simon Jensen}
10841084
1085-
\Dato{2020/02/03}
1086-
\Version{0.97}
1085+
\Dato{2020/07/20}
1086+
\Version{0.98}
10871087

10881088
\RequirePackage{derivative}[\dato]
10891089
\derivset{all}[scale-auto = mleftmright]
@@ -2063,14 +2063,14 @@
20632063
\item The sorting by \val{abs} separates the terms by their absolute value, where the terms are ordered in a descending manner according to their absolute value. Using the option \keyval{sort-abs-reverse}{true}, then the terms are ordered in an ascending manner instead.
20642064
\end{itemize}
20652065

2066-
When using the option \keyval{sort-method}{\{...\}}, the number of algorithms determines the number of layers e.g. \keyval{sort-method}{sign,symbol} is a sorting method with two layers, where the algorithms \val{sign} and \val{symbol} are applied in layer \num{1} and layer \num{2}, respectively. It should be understood as that the \val{sign} algorithm splits the terms into two groups, one with positive terms and one with negative terms. Then the \val{symbol} algorithm will order the terms within each groups according to the terms symbolic length. The mixed order is then formed by combining these two groups such that the positive terms comes first.
2066+
When using the option \keyval{sort-method}{\{...\}}, the number of algorithms determines the number of layers e.g. \keyval{sort-method}{\{sign,symbol\}} is a sorting method with two layers, where the algorithms \val{sign} and \val{symbol} are applied in layer \num{1} and layer \num{2}, respectively. It should be understood as that the \val{sign} algorithm splits the terms into two groups, one with positive terms and one with negative terms. Then the \val{symbol} algorithm will order the terms within each groups according to the terms symbolic length. The mixed order is then formed by combining these two groups such that the positive terms comes first.
20672067

20682068
The next subsubsection is dedicated to give some examples of how the algorithms in this package sorts the mixed order.
20692069

20702070
\subsubsection{Examples}
20712071
The examples are constructed of a partial derivative with the comma separated list of orders given by \texttt{[3a-3hh-2b, 4c+4gg+2ff, -5d-5ee]} and a close up view of the mixed order. Square brackets are used to indicate grouping of terms and the text below a group refers to the algorithm applied. Here the words positive and negative, long and short, and big and low refers to the \val{sign}, \val{symbol}, and \val{abs} algorithms, respectively. A row of square brackets represents a layer.
20722072

2073-
The packages default sorting method is \keyval{sort-method}{sign,symbol,abs}, which is used below. The \val{sign} algorithm separate the positive and negative terms in the first layer. While in the second layer, the terms are separated by symbol length etc.
2073+
The packages default sorting method is \keyval{sort-method}{\{sign,symbol,abs\}}, which is used below. The \val{sign} algorithm separate the positive and negative terms in the first layer. While in the second layer, the terms are separated by symbol length etc.
20742074
\begin{equation*}
20752075
\derivset{\pdv}[sort-method = {sign,symbol,abs}]
20762076
\pdv[3a-3hh-2b, 4c+4gg+2ff, -5d-5ee]{f}{x,y,z}
@@ -2097,7 +2097,7 @@
20972097
}{short}
20982098
}{negative}
20992099
\end{equation*}
2100-
as expected. Interchanging \val{sign} and \val{symbol} algorithms from the previous example i.e \keyval{sort-method}{symbol, sign, abs}, then the \val{symbol} \cal{sign} algorithms are now applied in the first and second layer, respectively. The result is shown below
2100+
as expected. Interchanging \val{sign} and \val{symbol} algorithms from the previous example i.e \keyval{sort-method}{\{symbol,sign,abs\}}, then the \val{symbol} \cal{sign} algorithms are now applied in the first and second layer, respectively. The result is shown below
21012101
\begin{equation*}
21022102
\derivset{\pdv}[sort-method = {symbol,sign,abs}]
21032103
\pdv[3a-3hh-2b, 4c+4gg+2ff, -5d-5ee]{f}{x,y,z}
@@ -2126,7 +2126,7 @@
21262126
\end{equation*}
21272127
where a clear difference is seen between the above two examples.
21282128

2129-
The above two examples used 3-layer sorting methods but as mentioned earlier, the sorting method can also be constructed with one and two algorithms i.e. 1-layer and 2-layer sorting methods. A sorting method with two layers could be constructed as \keyval{sort-method}{sign,symbol} and with it, the terms are ordered by sign and then symbolic length. In this case, there is not a third layer. Instead, the terms \enquote{appear randomly} according to their absolute value as shown below
2129+
The above two examples used 3-layer sorting methods but as mentioned earlier, the sorting method can also be constructed with one and two algorithms i.e. 1-layer and 2-layer sorting methods. A sorting method with two layers could be constructed as \keyval{sort-method}{\{sign,symbol\}} and with it, the terms are ordered by sign and then symbolic length. In this case, there is not a third layer. Instead, the terms \enquote{appear randomly} according to their absolute value as shown below
21302130
\begin{equation*}
21312131
\derivset{\pdv}[sort-method = {sign,symbol}]
21322132
\pdv[3a-3hh-2b, 4c+4gg+2ff, -5d-5ee]{f}{x,y,z}
@@ -2223,7 +2223,7 @@
22232223
\clearpage
22242224
\section{To do}\label{sec:todo}
22252225

2226-
Entries marked with \cmark{} will be implemented in a future release specified in the entry. Entries marked with \xmark{} will not be implemented.
2226+
Entries marked with \cmark{} will be implemented in a future release. Entries marked with \xmark{} will not be implemented.
22272227

22282228
\subsection{Future implementation}
22292229
The list describes what \emph{will be added} to the package in a later release.
@@ -2247,10 +2247,10 @@
22472247
%
22482248
\item Such an option should not be possible to be set with \macro[index=false]{\derivset} or in the definition of a new derivative (or maybe if one really needs a lot of higher order derivative).
22492249
\end{itemize}
2250-
\answer{\cmark}{I truly believe this is the right way forward and is coming in the next release. More features can easily be added in a key-value style. The order argument will be replaced with a key-value argument and a order key introduced; \texttt{ord=\meta{order}}.}
2250+
\answer{\cmark}{I truly believe this is the right way forward and is coming in version 1.0. More features can easily be added in a key-value style. The order argument will be replaced with a key-value argument and a order key introduced; \texttt{ord=\meta{order}}.}
22512251
%
22522252
\item With the above consideration, than it would only be natural to remove the mixed order and then have an option \keyval[index=false]{mixed-order}{\marg{mixed-order}}. Likewise, it should not be possible to be set with \macro[index=false]{\derivset} or in the definition of a new derivative. \label{consid:RemoveMixedOrder} \\
2253-
\answer{\cmark}{The mixed order argument will be removed due to the introduction of a key-value argument as mentioned above in the next release. The mixed order can be set with the knew key \texttt{m-ord=\meta{mixed-order}}.}
2253+
\answer{\cmark}{The mixed order argument will be removed due to the introduction of a key-value argument as mentioned above in version 1.0. The mixed order can be set with the knew key \texttt{m-ord=\meta{mixed-order}}.}
22542254
%
22552255
\item Currently \macro[index=false]{\derivset}'s optional argument \oarg{key=val}, when not given, sets the derivatives options to the package default settings. This should probably be changed to the options set in the definition of the derivative. \label{consid:DerivsetOptional} \\
22562256
\answer{\cmark}{I believe this would a nice change for the future, but I do not have the time to make the implementation for the next release.}
@@ -2263,13 +2263,13 @@
22632263
\answer{\cmark}{This have already been changed in version 0.95, since it is an unnecessary constraint.}
22642264
%
22652265
\item Should I add the option to \key[index=false]{sort-numerical}, so that it is treated as a symbolic term instead of a numerical term? \label{consid:sort_numerical}
2266-
\\ \answer{\cmark}{Yes. Yes I should. This feature will be added in the next release.}
2266+
\\ \answer{\cmark}{Yes. Yes I should. This feature will be added in version 1.0.}
22672267
%
22682268
\item Should I add a sorting algorithm that order the terms according to their number (including sign)? \label{consid:sort_number}
2269-
\\ \answer{\cmark}{Yes. Yes I should. This feature will be added in the next release.}
2269+
\\ \answer{\cmark}{Yes. Yes I should. This feature will be added in version 1.0.}
22702270
%
22712271
\item I am considering making the optional argument of \macro[index=false]{\slashfrac} into a \oarg{key=value} argument with something like \keyval[index=false]{scale}{\marg{scaling}}. \label{consid:slashfrac_opt} \\
2272-
\answer{\cmark}{I want an key-value implementation like this in the future, but it will not be added it the next release.}
2272+
\answer{\cmark}{I want an key-value implementation like this in the future, but it will not be added it version 1.0.}
22732273
%
22742274
\item Should the default scaling for \macro[index=false]{\slashfrac} be \val{auto} or \val{none}? Or should it be possible to set it with something like \cs{slashfracset}\oarg{key=value}? \label{consid:slashfrac_def_scale} \\
22752275
\answer{\xmark}{The package default should be \val{auto}, but it will be possible to change it, when the key-value is implemented or \macro[index=false]{\slashfrac}.}
@@ -2316,8 +2316,13 @@
23162316
\begin{change}[version = 0.96, date = 2019-12-22, beta = true]
23172317
\item Fixed the double superscript issue for higher order derivative when the variable contained a superscript.
23182318
\end{change}
2319+
\smallskip
23192320
\begin{change}[version = 0.97, date = 2020-02-03, beta = true]
23202321
\item Fixed the argument specifier of {\small\verb|\__deriv_scale_big:nnnn|} when it was used (it was used with \texttt{:nnnm}).
23212322
\end{change}
2323+
\smallskip
2324+
\begin{change}[version = 0.98, date = 2020-07-20, beta = true]
2325+
\item Fixed a bug concerning the subscript argument due to recent changes to the \pkg{xparse} package dated 2020-05-14 (the fix works with earlier versions of xparse as well).
2326+
\end{change}
23222327
\end{changelog}
23232328
\end{document}

0 commit comments

Comments
 (0)