texlive[53244] Master/texmf-dist: diffcoeff (28dec19)
commits+karl at tug.org
commits+karl at tug.org
Sat Dec 28 23:24:07 CET 2019
Revision: 53244
http://tug.org/svn/texlive?view=revision&revision=53244
Author: karl
Date: 2019-12-28 23:24:07 +0100 (Sat, 28 Dec 2019)
Log Message:
-----------
diffcoeff (28dec19)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/diffcoeff/README.txt
trunk/Master/texmf-dist/doc/latex/diffcoeff/diffcoeff.pdf
trunk/Master/texmf-dist/doc/latex/diffcoeff/diffcoeff.tex
trunk/Master/texmf-dist/tex/latex/diffcoeff/diffcoeff.sty
Modified: trunk/Master/texmf-dist/doc/latex/diffcoeff/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/diffcoeff/README.txt 2019-12-28 22:23:55 UTC (rev 53243)
+++ trunk/Master/texmf-dist/doc/latex/diffcoeff/README.txt 2019-12-28 22:24:07 UTC (rev 53244)
@@ -1,7 +1,7 @@
diffcoeff: a package to ease the writing of a variety
of differential coefficients (derivatives)
-Andrew Parsloe (ajparsloe at gmail.com) 3 December 2018
+Andrew Parsloe (ajparsloe at gmail.com) 28 December 2020
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -11,13 +11,12 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-This is version 3 of diffcoeff.sty, and associated files,
+This is version 3.2 of diffcoeff.sty, and associated files,
and requires the LaTeX3 bundles l3kernel and l3packages.
-Version 3 adds a command for writing differentials like dx
-(in integralsf for instance) in the same form (math-italic
-or upright) as for derivatives. Some simple spacing commands
-are also added.
+Version 3.2 corrects a bug when an ordinary derivative is in
+the differentiand of a partial derivative. Possible negative
+spacing before a differential is also now available.
Manifest
%%%%%%%%
@@ -27,4 +26,4 @@
diffcoeff.tex LaTeX source of documentation
diffcoeff-doc.def definition file to be placed
in same directory as the .pdf
- and .tex files
+ and .tex files
\ No newline at end of file
Modified: trunk/Master/texmf-dist/doc/latex/diffcoeff/diffcoeff.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/diffcoeff/diffcoeff.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/diffcoeff/diffcoeff.tex 2019-12-28 22:23:55 UTC (rev 53243)
+++ trunk/Master/texmf-dist/doc/latex/diffcoeff/diffcoeff.tex 2019-12-28 22:24:07 UTC (rev 53244)
@@ -1,4 +1,4 @@
-%% LyX 2.3.2-2 created this file. For more info, see http://www.lyx.org/.
+%% LyX 2.3.3 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage{lmodern}
@@ -6,6 +6,7 @@
\renewcommand{\ttdefault}{lmtt}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
+\synctex=-1
\usepackage{color}
\usepackage{babel}
\usepackage{wrapfig}
@@ -52,7 +53,7 @@
a \LaTeX{} package to ease\texttt{ }the~\\
writing of differential coefficients \\
in all their variety\\
- Version 3.1}
+ Version 3.2}
\author{Andrew Parsloe\\
{\small{}(ajparsloe at gmail.com)}}
\maketitle
@@ -144,6 +145,11 @@
error in version 3).
\item Version 3 also provides some simple spacing commands that can be useful
for tweaking standard spacing.
+\item Version 3.2 fixes a bug in which an ordinary derivative as the differentiand
+of a partial derivative displayed as a partial derivative. It now displays,
+as it should, as an ordinary derivative.
+\item In version 3.2, the differential command \texttt{\textbackslash dl} now
+also allows negative spacing before it.
\end{enumerate}
\subsubsection*{Note on terminology}
@@ -161,11 +167,11 @@
Multi-character variables of differentiation un-parenthesized:
\begin{equation}
-\diffp{\frac{\psi}{\Theta}}{\frac{1}{\Theta}},\quad\diffp{E/T}{1/T},\quad\diffp{\ln f}{\ln x_{0}},\quad\diffp\psi{a_{i},\frac{1}{\Theta}},\quad\diffp{\mathcal{L}}{\eta_{,i}^{(r)}}\label{eq:eg1}
+\diffp{\frac{\psi}{\Theta}}{\frac{1}{\Theta}},\quad\diffp{E/T}{1/T},\quad\diffp{\ln f}{\ln x_{0}},\quad\diffp\psi{a_{i},\frac{1}{\Theta}},\quad\diffp{\mathcal{L}}{\eta_{,i}^{(r)}}.\label{eq:eg1}
\end{equation}
Multi-character variables of differentiation parenthesized:
\begin{equation}
-\diffp H{\displaystyle \diffp S{q_{k}}[]},\quad\diffp\varepsilon{(1/\Theta)},\label{eq:eg2}
+\diffp H{\displaystyle \diffp S{q_{k}}[]},\quad\diffp\varepsilon{(1/\Theta)}.\label{eq:eg2}
\end{equation}
Higher-order derivatives where the parentheses do not or do include the
operator:
@@ -553,6 +559,24 @@
\noindent where the starring automatically takes care of the parentheses
and subscripts.
+\subsection{Iterated derivatives}
+
+Derivatives can be the differentiands of derivatives, as seen above when
+writing Lagrange's equations,
+\begin{example}
+\textbackslash diffp L\{q\_k\}-\textbackslash diff{*}\{\textbackslash diffp
+L\{\textbackslash dot\{q\}\_k\}{[}{]}\}t = 0 $\Longrightarrow\quad{\displaystyle \diffp L{q_{k}}-\diff*{\diffp L{\dot{q}_{k}}[]}t}=0.$
+\end{example}
+
+\noindent However, in versions of \texttt{diffcoeff} before version 3.2,
+an ordinary derivative within a partial derivative rendered as a partial
+derivative. That is now corrected, the ordinary derivative rendering correctly:
+\begin{example}
+\textbackslash diffp{*}\{\textbackslash diff\{x\textasciicircum\textbackslash mu\}\{\textbackslash lambda\}\}\{x\textasciicircum\textbackslash sigma\}
+$\Longrightarrow\quad{\displaystyle \diffp*{\diff{x^{\mu}}{\lambda}}{x^{\sigma}}}$
+\end{example}
+
+
\subsection{Mixed partial derivatives}
The new thing with partial derivatives, not present with ordinary derivatives,
@@ -714,8 +738,8 @@
In tensor calculus the differentiations are almost always in terms of super-
or subscripted coordinates. In many other contexts this is the case too
-- the reciprocal of the temperature in thermodynamics or generalized
-cooredinates in analytical mechanics. This is why a comma list is used
-in \texttt{diffcoeff} for specifying variables of differentiation for mixed
+coordinates in analytical mechanics. This is why a comma list is used in
+\texttt{diffcoeff} for specifying variables of differentiation for mixed
partial derivatives. Although it would be nice to write the minimal \texttt{\{xy\}}
rather than \texttt{\{x,y}\} when two variables $x$ and $y$ are involved,
the extra writing is trivial and the comma list allows a simpler handling
@@ -879,36 +903,6 @@
\section{Changing defaults; variant forms\label{sec:Changing-defaults}}
-\begin{wraptable}[22]{o}{0.5\columnwidth}%
-\vspace{-4.5ex}
- \caption{{\small{}Defaults (ordinary derivatives})\label{tab:Ordinary-derivatives}}
-
-\abovetopsep=.5ex{}%
-\begin{tabular}{lr}
-\toprule
-{\small{}key} & {\small{}default}\tabularnewline
-\midrule
-{\small{}op-symbol } & \texttt{\small{}d}\tabularnewline
-{\small{}op-symbol-alt} & \texttt{\small{}= op-symbol}\tabularnewline
-{\small{}op-order-sep } & \texttt{\small{}1 mu}\tabularnewline
-{\small{}{*}-op-left } & \texttt{\small{}false}\tabularnewline
-{\small{}{*}-italic-nudge} & \texttt{\small{}3 mu}\tabularnewline
-{\small{}{*}/-op-wrap} & \texttt{\small{}true}\tabularnewline
-{\small{}long-var-wrap } & \texttt{\small{}d(v)}\tabularnewline
-{\small{}denom-term-sep} & \texttt{\small{}2 mu}\tabularnewline
-{\small{}/-denom-term-sep } & \texttt{\small{}1 mu}\tabularnewline
-term-sep-adjust & \texttt{-1 mu}\tabularnewline
-{\small{}left-delim} & \texttt{\small{}\textbackslash left .}\tabularnewline
-{\small{}right-delim} & \texttt{\small{}\textbackslash right |}\tabularnewline
-{\small{}elbowroom} & \texttt{\small{}0 mu}\tabularnewline
-{\small{}subscr-nudge } & \texttt{\small{}0 mu}\tabularnewline
-{\small{}/-left-delim} & \texttt{\small{}(}\tabularnewline
-{\small{}/-right-delim } & \texttt{\small{})}\tabularnewline
-{\small{}/-elbowroom} & \texttt{\small{}0 mu}\tabularnewline
-{\small{}/-subscr-nudge } & \texttt{\small{}0 mu}\tabularnewline
-\bottomrule
-\end{tabular}\end{wraptable}%
-
To write the range of different examples displayed in the Rogues' Gallery
(Section~\ref{sec:Rogues'-gallery}) I have had to make extensive use
of forms of derivative other than the default. \texttt{Diffcoeff} is built
@@ -937,6 +931,36 @@
keys with an opening asterisk, {*}, apply only when the differentiand is
appended.
+\begin{wraptable}[22]{o}{0.5\columnwidth}%
+\noindent \begin{centering}
+\vspace{-4.5ex}
+ \caption{{\small{}Defaults (ordinary derivatives})\label{tab:Ordinary-derivatives}}
+\par\end{centering}
+\noindent \centering{}\abovetopsep=.5ex{}%
+\begin{tabular}{lr}
+\toprule
+{\small{}key} & {\small{}default}\tabularnewline
+\midrule
+{\small{}op-symbol} & \texttt{\small{}d}\tabularnewline
+{\small{}op-symbol-alt} & \texttt{\small{}= op-symbol}\tabularnewline
+{\small{}op-order-sep} & \texttt{\small{}1 mu}\tabularnewline
+{\small{}{*}-op-left} & \texttt{\small{}false}\tabularnewline
+{\small{}{*}-italic-nudge} & \texttt{\small{}3 mu}\tabularnewline
+{\small{}{*}/-op-wrap} & \texttt{\small{}true}\tabularnewline
+{\small{}long-var-wrap} & \texttt{\small{}d(v)}\tabularnewline
+{\small{}denom-term-sep} & \texttt{\small{}2 mu}\tabularnewline
+{\small{}/-denom-term-sep} & \texttt{\small{}1 mu}\tabularnewline
+term-sep-adjust & \texttt{-1 mu}\tabularnewline
+{\small{}left-delim} & \texttt{\small{}\textbackslash left .}\tabularnewline
+{\small{}right-delim} & \texttt{\small{}\textbackslash right |}\tabularnewline
+{\small{}elbowroom} & \texttt{\small{}0 mu}\tabularnewline
+{\small{}subscr-nudge} & \texttt{\small{}0 mu}\tabularnewline
+{\small{}/-left-delim} & \texttt{\small{}(}\tabularnewline
+{\small{}/-right-delim} & \texttt{\small{})}\tabularnewline
+{\small{}/-elbowroom} & \texttt{\small{}0 mu}\tabularnewline
+{\small{}/-subscr-nudge} & \texttt{\small{}0 mu}\tabularnewline
+\bottomrule
+\end{tabular}\end{wraptable}%
Note that these settings are, in general, font dependent. The values given
are (in the author's opinion) appropriate for the default \LaTeX{} math
fonts. There are also likely to be variations required for whether a derivative
@@ -954,6 +978,10 @@
denominator while \textbf{op-symbol} is used in the numerator; e.g. for
$\diff.nabla.{v^{i}}t$, \texttt{op-symbol = \textbackslash nabla} and
\texttt{op-symbol-alt = d}; otherwise (and usually) defaults to \textbf{op-symbol}
+\end{description}
+~\vspace{-5ex}
+
+\begin{description}
\item [{op-order-sep}] extra horizontal space added between the op-symbol and
the superscripted order of differentiation in higher order derivatives;
compare $d^{2}$ with $d^{\mkern1mu 2}$, $\partial^{2}$ with $\partial^{\mkern1mu 2}$
@@ -1251,7 +1279,7 @@
it qualifies -- is it perhaps a typo? -- and `adrift in a sea of whitespace'.
This is to be compared with the default
\begin{example}
-\noindent \textbackslash diffpFx{[}y{]} $\Longrightarrow{\displaystyle \diffp Fx[y]}$
+\noindent \textbackslash diffp Fx{[}y{]} $\Longrightarrow{\displaystyle \diffp Fx[y]}$
\end{example}
\noindent where the subscript is tucked in close to the right parenthesis
@@ -1545,10 +1573,11 @@
\end{example}
\noindent It is also possible\footnote{\noindent From version 3.1 of \texttt{diffcoeff}; version 3.0 of the package
-produced a \LaTeX{} error.} to use the command before \texttt{\textbackslash vec\{x\}} or \texttt{\textbackslash mathbf\{x\}}:
+produced a \LaTeX{} error.} to use the command before, for instance, \texttt{\textbackslash vec\{x\}}
+or \texttt{\textbackslash mathbf\{x\}}:
\begin{example}
-\textbackslash dl \textbackslash vec\{x\} $\Longrightarrow\dl\vec{{x}},$
-~~~~\textbackslash dl \textbackslash mathbf\{x\} $\Longrightarrow\dl\mathbf{x}.$
+\textbackslash dl \textbackslash vec\{x\} $\Longrightarrow\dl\vec{x}$~~~~\textbackslash dl
+\textbackslash mathbf\{x\} $\Longrightarrow\dl0\mathbf{x}.$
\end{example}
@@ -1576,6 +1605,8 @@
is because of the convenience offered by the second option to the \texttt{\textbackslash dl}
command.
+\subsubsection{Spacing}
+
This second option inserts spacing before the `d'. If \texttt{\textbackslash dl}
is followed by a digit (0, 1, 2, ..., 9) it will insert a horizontal space
of that number of mu before the `d'; (\texttt{\textbackslash dl0x} has
@@ -1598,10 +1629,26 @@
distinct from the preceding fraction forms $\diff.ptxt.Px$ etc., and \texttt{\textbackslash dl2x}
when writing $\int\sin x\dl2x$.
-As remarked above, the \texttt{\textbackslash dl.p.} alternative to \texttt{\textbackslash partial
-}is unlikely to be of use except for a document, like the present one,
-illustrating various points of usage. Thus, to illustrate spacing in the
-denominator of a mixed partial derivative, I have earlier used \texttt{\textbackslash dl.p.x\textbackslash dl.p.2y\textbackslash dl.p.2z},
+Note that only \emph{one} digit can be used. If two are used, as here,
+\begin{example}
+\textbackslash dl20x $\Longrightarrow\dl20x$
+\end{example}
+
+\noindent the effect is unlikely to be what is wanted.
+
+From version 3.2 of \texttt{diffcoeff} it is possible to also add \emph{negative}
+space before the differential, which might be useful in special contexts,
+perhaps to construct a symbol:
+\begin{example}
+/\textbackslash dl-9x $\Longrightarrow/\dl-9x.$
+\end{example}
+
+\noindent For negative space before the differential, add a minus sign
+before the (single) digit.
+
+The spacing digit option \emph{follows} the dot-delimited name option.
+For example, to illustrate spacing in the denominator of a mixed partial
+derivative, I have earlier used \texttt{\textbackslash dl.p.x\textbackslash dl.p.2y\textbackslash dl.p.2z},
and the variation to that spacing when a higher-order differentiation occurs:
\begin{example}
\textbackslash dl.p.x\textasciicircum 2\textbackslash dl.p.1y\textbackslash dl.p.2z
@@ -1608,8 +1655,6 @@
$\Longrightarrow\dl.p.x^{2}\dl.p.1y\dl.p.2z.$
\end{example}
-\noindent Note here that the spacing digit option \emph{follows} the dot-delimited
-name option.
\section{Rationale}
@@ -1765,6 +1810,8 @@
\item [{\texttt{\textbackslash dl}}] options:
\begin{enumerate}
\item .\emph{name}. (as for \texttt{\textbackslash diff})
+\item \emph{minus sign} (optional, use only if negative spacing before the `d'
+is wanted)
\item \emph{digit} (insert spacing of this number of mu before the `d')
\end{enumerate}
\item [{\texttt{\textbackslash negmu}}] insert a $-1$ mu space
Modified: trunk/Master/texmf-dist/tex/latex/diffcoeff/diffcoeff.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/diffcoeff/diffcoeff.sty 2019-12-28 22:23:55 UTC (rev 53243)
+++ trunk/Master/texmf-dist/tex/latex/diffcoeff/diffcoeff.sty 2019-12-28 22:24:07 UTC (rev 53244)
@@ -9,7 +9,7 @@
%
\RequirePackage{expl3}
\RequirePackage{xparse,l3keys2e,xtemplate}
-\ProvidesExplPackage {diffcoeff} {2019/03/10} {3.1}
+\ProvidesExplPackage {diffcoeff} {2019/12/28} {3.2}
{Write differential coefficients consistently and easily.}
%
\keys_define:nn { diffcoeff }
@@ -116,7 +116,7 @@
}
{
\AssignTemplateKeys
-
+
\bool_if:NF\l__diffcoeff_integ_bool
{
\int_compare:nNnT { \l__diffcoeff_format_int } > { 1 }
@@ -260,7 +260,7 @@
% differential
% #1 variant; #2 = space in mu before d (0--9)
% note \group_end placement for \vec{x} etc
-\NewDocumentCommand \dl { d.. m }
+\NewDocumentCommand \dl { d.. t- m }
{
\group_begin:
\bool_set_true:N \l__diffcoeff_integ_bool
@@ -267,13 +267,15 @@
\bool_set_true:N \l__diffcoeff_single_var_bool
\seq_set_from_clist:Nn \l__diffcoeff_orders_seq { 1 }
\tl_set:Nn \l__diffcoeff_tot_order_tl { 1 }
- \IfValueT { #1 } { \tl_set:Nn \l__diffcoeff_type_tl { .#1 } }
+ \IfValueTF { #1 }
+ { \tl_set:Nn \l__diffcoeff_type_tl { .#1 } }
+ { \tl_set:Nn \l__diffcoeff_type_tl { } }
\UseInstance { derivative } { ord\l__diffcoeff_type_tl }
\l__diffcoeff_orders_seq \l__diffcoeff_tot_order_tl
\c_empty_tl \c_empty_seq \c_empty_tl
- \tl_if_in:NnTF \c__diffcoeff_digits_tl { #2 }
- { \mkern #2 mu \l__diffcoeff_op_tl \group_end: }
- { \l__diffcoeff_op_tl \group_end: #2 }
+ \tl_if_in:NnTF \c__diffcoeff_digits_tl { #3 }
+ { \mkern \IfBooleanT #2 { - }#3 mu \l__diffcoeff_op_tl \group_end: }
+ { \l__diffcoeff_op_tl \group_end: {} #3 }
}
\NewDocumentCommand \negmu {} { \mkern -1 mu }
\NewDocumentCommand \nilmu {} { \mkern 0 mu }
@@ -285,7 +287,7 @@
% #5(tl) = diff'iand; #6( / ) = slash boolean
% #7(clist) = vars of diff.; #8(tl) = pt of eval./vars held const
% #9(tl) = as #8 (for backwards compat)
-\NewDocumentCommand \diff{ d.. s O{1} o m t/ m !O{#9} g }
+\NewDocumentCommand \diff { d.. s O{1} o m t/ m !O{#9} g }
{
\group_begin:
\tl_set:Nn \l__diffcoeff_differentiand_tl { #5 }
@@ -322,9 +324,11 @@
\l__diffcoeff_tot_order_tl
}
}
- \IfValueT { #1 } { \tl_set:Nn \l__diffcoeff_type_tl { .#1 } }
+ \IfValueTF { #1 }
+ { \tl_set:Nn \l__diffcoeff_type_tl { .#1 } }
+ { \tl_set:Nn \l__diffcoeff_type_tl { } }
+ % append? slash?
\int_zero:N \l__diffcoeff_format_int
- % append? slash?
\IfBooleanT #2 { \int_incr:N \l__diffcoeff_format_int }
\IfBooleanT #6 { \int_add:Nn \l__diffcoeff_format_int { 2 } }
@@ -614,7 +618,7 @@
\DeclareInstance { derivative } { ord } { DERIV } { }
\bool_if:NTF \g__diffcoeff_ISO_bool
{
- \diffdef {}
+ \diffdef { }
{
op-symbol = \mathrm{d},
op-order-sep = 0 mu ,
More information about the tex-live-commits
mailing list