|
1 | 1 | % derivative.tex |
2 | | -% Copyright 2019-2023 Simon Jensen |
| 2 | +% Copyright 2019-2024 Simon Jensen |
3 | 3 | % |
4 | 4 | % This work may be distributed and/or modified under the |
5 | 5 | % conditions of the LaTeX Project Public License, either version 1.3 |
|
42 | 42 | \RequirePackage[style=english,english=british]{csquotes} |
43 | 43 | \RequirePackage[final,babel,auto]{microtype} |
44 | 44 | \RequirePackage{xcolor} |
45 | | -% \definecolor{RoyalGray}{RGB}{127, 144, 158} |
46 | | -% \definecolor{RoyalDarkGray}{RGB}{78, 93, 104} |
47 | | -% \definecolor{RoyalLightGray}{RGB}{250, 250, 250} |
48 | | -% \definecolor{RoyalRed}{RGB}{157, 16, 45} |
49 | | -% \definecolor{RoyalBlue}{RGB}{0, 35, 102} |
50 | | -% \definecolor{RoyalGreen}{RGB}{32, 77, 2} |
51 | | - |
52 | | - \definecolor{RoyalGray}{RGB}{75, 75, 75} |
53 | | - \definecolor{RoyalDarkGray}{RGB}{225, 225, 225} |
54 | | - \definecolor{RoyalLightGray}{RGB}{30, 30, 30} |
55 | | - \definecolor{RoyalRed}{RGB}{255, 177, 151} % 207, 102, 121 |
56 | | - \definecolor{RoyalBlue}{RGB}{187, 134, 252} % 55, 185, 255 |
57 | | - \definecolor{RoyalGreen}{RGB}{3, 218, 198} % 52, 177, 20 |
58 | | - \definecolor{RoyalPageCoulor}{RGB}{18, 18, 18} % 30, 30, 30 |
59 | | - \definecolor{RoyalTextCoulor}{RGB}{225, 225, 225} |
60 | | - \pagecolor{RoyalPageCoulor} |
61 | | - \color{RoyalTextCoulor} |
| 45 | + \definecolor{RoyalGray}{RGB}{127, 144, 158} |
| 46 | + \definecolor{RoyalDarkGray}{RGB}{78, 93, 104} |
| 47 | + \definecolor{RoyalLightGray}{RGB}{250, 250, 250} |
| 48 | + \definecolor{RoyalRed}{RGB}{157, 16, 45} |
| 49 | + \definecolor{RoyalBlue}{RGB}{0, 35, 102} |
| 50 | + \definecolor{RoyalGreen}{RGB}{32, 77, 2} |
| 51 | + |
| 52 | +% \definecolor{RoyalGray}{RGB}{75, 75, 75} |
| 53 | +% \definecolor{RoyalDarkGray}{RGB}{225, 225, 225} |
| 54 | +% \definecolor{RoyalLightGray}{RGB}{30, 30, 30} |
| 55 | +% \definecolor{RoyalRed}{RGB}{255, 177, 151} % 207, 102, 121 |
| 56 | +% \definecolor{RoyalBlue}{RGB}{187, 134, 252} % 55, 185, 255 |
| 57 | +% \definecolor{RoyalGreen}{RGB}{3, 218, 198} % 52, 177, 20 |
| 58 | +% \definecolor{RoyalPageCoulor}{RGB}{18, 18, 18} % 30, 30, 30 |
| 59 | +% \definecolor{RoyalTextCoulor}{RGB}{225, 225, 225} |
| 60 | +% \pagecolor{RoyalPageCoulor} |
| 61 | +% \color{RoyalTextCoulor} |
62 | 62 |
|
63 | 63 | \RequirePackage{amsmath, amsthm} |
64 | 64 | \allowdisplaybreaks |
|
1220 | 1220 | \mydoc_narg:n {#1} |
1221 | 1221 | \group_end: |
1222 | 1222 | } |
1223 | | -\DeclareDocumentCommand{\oarg}{ m } |
| 1223 | +\DeclareDocumentCommand{\oarg}{ s m } |
1224 | 1224 | { |
1225 | 1225 | \group_begin: |
1226 | | - \mydoc_oarg:n {#1} |
| 1226 | + \bool_if:nTF {#1} |
| 1227 | + { \mydoc_oarg_star:n {#2} } |
| 1228 | + { \mydoc_oarg:n {#2} } |
1227 | 1229 | \group_end: |
1228 | 1230 | } |
1229 | 1231 | \DeclareDocumentCommand{\earg}{ m } |
|
1282 | 1284 | \mydoc_arg_delim_format:n { ] } |
1283 | 1285 | } |
1284 | 1286 |
|
| 1287 | +\cs_new:Npn \mydoc_oarg_star:n #1 |
| 1288 | +{ |
| 1289 | + \__mydoc_oarg_font: |
| 1290 | + \mydoc_arg_delim_format:n { [ } |
| 1291 | + #1 |
| 1292 | + \mydoc_arg_delim_format:n { ] } |
| 1293 | +} |
| 1294 | + |
1285 | 1295 | \cs_new:Npn \mydoc_earg:n #1 |
1286 | 1296 | { |
1287 | 1297 | \seq_set_from_clist:Nn \l__deriv_earg_seq {#1} |
|
1369 | 1379 | \Titel{The \pakkenavn{} package} |
1370 | 1380 | \Forfatter{Simon Jensen} |
1371 | 1381 | |
1372 | | -\Dato{2023/11/04} |
1373 | | -\Version{1.31} |
| 1382 | +\Dato{2024/02/08} |
| 1383 | +\Version{1.4} |
1374 | 1384 |
|
1375 | 1385 | \RequirePackage{derivative}[\dato] |
1376 | 1386 |
|
|
1445 | 1455 | The behavior of the star can be reversed by setting \keyval{switch-*}{true}. In other words, the equations in the previous example will be interchanged. |
1446 | 1456 | \end{argument} |
1447 | 1457 |
|
1448 | | - \begin{argument}{2}[updated = v1.0] |
| 1458 | + \begin{argument}{2}[updated = v1.4] |
1449 | 1459 | The second argument of \macro{1}, enclosed in square brackets, is optional and used to specify options for the derivative using a \keyval[index=false]{key}{value} syntax. For instance, the order of differentiation can be set using the \key[cat=misc]{order} option. Here is an example: |
1450 | 1460 | \begin{example} |
1451 | 1461 | \pdv[order={2,3}]{f}{x,y,z} \\ |
1452 | 1462 | \pdv[order={\beta,a,n+2a}]{f}{x,y,z} \\ |
1453 | | - \pdv[order={2,n^2,n^2-1}]{f}{x,y,z} \\ |
| 1463 | + \pdv[sep-var-inf=0]{f}{x,y,z} \\ |
1454 | 1464 | \pdv[order={3/2-n/3,n/2,1/3}]{f}{x,y,z} |
1455 | 1465 | \end{example} |
| 1466 | + To ease the cumbersome order key, implicit orders can now be given: |
| 1467 | + \begin{example} |
| 1468 | + \pdv[n+2, \alpha]{f}{x,y,z} |
| 1469 | + \end{example} |
1456 | 1470 | For a comprehensive list of available options that can be applied to derivatives, please refer to \cref{ssec:options_dv}. |
1457 | 1471 | %The order may be a number, a symbol and a combination hereof. Note that the total order of differentiation (i.e $\odif[order=n+2]{}$) is automatically calculated and sorted. This is particularly useful when dealing with mixed partial derivatives which is further described in \cref{ssec:DV_pdv,ssec:overall_order} |
1458 | 1472 | \end{argument} |
@@ -1632,14 +1646,18 @@ \subsection{Other derivatives} |
1632 | 1646 | The behavior of the star can be reversed by setting \keyval{switch-*}{true}. In other words, the equations in the previous example will be interchanged. |
1633 | 1647 | \end{argument} |
1634 | 1648 |
|
1635 | | - \begin{argument}{2} |
| 1649 | + \begin{argument}{2}[updated = v1.4] |
1636 | 1650 | The second argument, enclosed in square brackets, is optional and is used to specify options for the differential using the \keyval[index=false]{key}{value} syntax. Here are some examples: |
1637 | 1651 | \begin{example} |
1638 | 1652 | \odif[order={n,3}]{x,y,z} \\ |
1639 | 1653 | \odif[sep-var-inf=0]{x,y,z} \\ |
1640 | 1654 | \odif*[sep-var-var=0]{x,y,z} |
1641 | 1655 | \end{example} |
1642 | | - The available options for the differential can be found in \cref{ssec:options_inf} |
| 1656 | + To ease the cumbersome order key, implicit orders can now be given: |
| 1657 | + \begin{example} |
| 1658 | + \odif[n+2, \alpha]{x,y,z} |
| 1659 | + \end{example} |
| 1660 | + For a comprehensive list of available options that can be applied to differentials, please refer to \cref{ssec:options_inf} |
1643 | 1661 | \end{argument} |
1644 | 1662 |
|
1645 | 1663 | \begin{argument}{3} |
@@ -3049,6 +3067,10 @@ \subsection{Slashfrac}\label{ssec:slashfrac} |
3049 | 3067 | \begin{change}[version=1.31, date=2023-11-04, beta=false] |
3050 | 3068 | \item Fixed issue relating to the order when nesting derivatives (issues \#14). |
3051 | 3069 | \end{change} |
| 3070 | + \bigskip |
| 3071 | + \begin{change}[version=1.4, date=2024-02-08, beta=false] |
| 3072 | + \item Introduced implicit order parameter to simplify specifying the order of differentiation, for example: \cs{pdv}\oarg*{n,2}\narg{f}\narg{x,y} (issues \#2 and \#10). |
| 3073 | + \end{change} |
3052 | 3074 | \end{changelog} |
3053 | 3075 |
|
3054 | 3076 |
|
|
0 commit comments