texlive[65676] Master/texmf-dist: diffcoeff (24jan23)

commits+karl at tug.org commits+karl at tug.org
Sun Jan 29 23:32:30 CET 2023


Revision: 65676
          http://tug.org/svn/texlive?view=revision&revision=65676
Author:   karl
Date:     2023-01-29 23:32:30 +0100 (Sun, 29 Jan 2023)
Log Message:
-----------
diffcoeff (24jan23)

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	2023-01-29 22:21:52 UTC (rev 65675)
+++ trunk/Master/texmf-dist/doc/latex/diffcoeff/README.txt	2023-01-29 22:32:30 UTC (rev 65676)
@@ -10,12 +10,15 @@
   http://www.latex-project.org/lppl.txt
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-Version 5.1 of diffcoeff adds a version-conflict message if the 
-now redundant ISO package option of earlier versions is used, 
-and tweaks documentation. Version 5.0 of diffcoeff introduced 
-many interface incompatibilities with version 4, which is still 
-available through the trailing optional argument in the 
-\usepackage statement, e.g., \usepackage{diffcoeff}[=v4] 
+Version 5.2 of diffcoeff initializes two variables that other-
+wise can conflict with other packages and improves handling 
+of an empty differentiation variable argument. There are some
+small additions to the documentation.
+
+Version 5.0 of diffcoeff introduced many interface incompat-
+ibilities with version 4, which is still available through 
+the trailing optional argument in the \usepackage statement, 
+e.g., \usepackage{diffcoeff}[=v4] 
 Version 5 requires xtemplate from the l3packages bundle and 
 the mleftright package. 
 

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	2023-01-29 22:21:52 UTC (rev 65675)
+++ trunk/Master/texmf-dist/doc/latex/diffcoeff/diffcoeff.tex	2023-01-29 22:32:30 UTC (rev 65676)
@@ -1,4 +1,4 @@
-%% LyX 2.4.0-alpha3 created this file.  For more info, see https://www.lyx.org/.
+%% LyX 2.4.0-beta2 created this file.  For more info, see https://www.lyx.org/.
 %% Do not edit unless you really know what you are doing.
 \documentclass[english]{report}
 \usepackage{lmodern}
@@ -22,7 +22,7 @@
 \usepackage{amssymb}
 \usepackage{stmaryrd}
 \usepackage{esint}
-\usepackage[unicode=true,pdfusetitle,
+\usepackage[pdfusetitle,
  bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=2,
  breaklinks=true,pdfborder={0 0 1},backref=section,colorlinks=true,pdfpagemode=FullScreen]
  {hyperref}
@@ -113,12 +113,12 @@
 \title{\texttt{diffcoeff}~\\
  a \LaTeX{} package to ease\texttt{ }the~\\
  writing of differential coefficients \\
- Version 5.1}
+ Version 5.2}
 \author{Andrew Parsloe\\
 {\small (ajparsloe at gmail.com)}}
 \maketitle
 \begin{abstract}
-\noindent \verb`diffcoeff` is a \LaTeX{} package to ease the writing
+\noindent\verb`diffcoeff` is a \LaTeX{} package to ease the writing
 of ordinary, partial and other derivatives of arbitrary algebraic
 or numeric order. For mixed partial derivatives, the total order of
 differentiation is calculated by the package. Optional arguments allow
@@ -266,7 +266,7 @@
 \end{shaded}%
 \end{minipage}
 
-\noindent %
+\noindent{}%
 \noindent\begin{minipage}[t]{1\columnwidth}%
 \begin{shaded}%
 If you put \verb`\mleftright` in the preamble, which is what the
@@ -437,6 +437,11 @@
 derivatives, variable or variables held constant; \emph{no space}
 before the left square bracket; see \xA7\ref{subsec:Point-of-evaluation}.
 \end{itemize}
+Both mandatory arguments may be empty, but require empty brace pairs
+to indicate as much. (Omitting the differentiand makes sense for all
+forms of derivative, \verb`\difx`, \verb`\difxp`, but omitting the
+variable or variables of differentiation is sensible only for the
+compact forms, \verb`\difc`, \verb`\difcp` -- see \xA7\ref{subsec:Compact=002013form-derivatives}.)
 
 \section{General use}
 
@@ -680,7 +685,7 @@
 \noindent This result is more elegant to my eye than what results
 when removing the asterisk,
 \begin{centred}
-\noindent \verb`\[ \diff[2]yx = \diff{\diff yx}x \]` $\Longrightarrow$
+\noindent\verb`\[ \diff[2]yx = \diff{\diff yx}x \]` $\Longrightarrow$
 \[ \diff[2]yx=\diff{\diff yx}x ,\]
 \end{centred}
 \noindent although whether the \emph{meaning} is clearer is moot.
@@ -797,7 +802,7 @@
 mass $m$ moving along a line, distance $x$ at time $t$, the kinetic
 energy is:
 \begin{centred}
-\noindent \verb`$ \tfrac 12 m \difs xt[]^2 $` $\Longrightarrow$
+\noindent\verb`$ \tfrac 12 m \difs xt[]^2 $` $\Longrightarrow$
 $\tfrac{1}{2}m\difs xt[]^{2}$.
 \end{centred}
 Or, again exploiting the parentheses resulting from an empty trailing
@@ -846,7 +851,7 @@
     \mleftright
     \[ \diffp L{q_k}-\diff**t{ \!\diffp L{\dot{q}_k}[] } = 0 \]
 \end{verbatim}
-\noindent $\Longrightarrow$ \mleftright\[\diffp L{q_k}-\diff**t{\!\diffp L{\dot{q}_k}[]} = 0.  \]
+\noindent$\Longrightarrow$ \mleftright\[\diffp L{q_k}-\diff**t{\!\diffp L{\dot{q}_k}[]} = 0.  \]
 
 \noindent The problem is that in addition to the space around \verb`\left`,
 \verb`\right` pairs (which is reduced by issuing the command \verb`\mleftright`),
@@ -931,7 +936,7 @@
 
 \subsubsection{Order-override command: \texttt{\textbackslash difoverride}}
 
-\noindent \label{subsec:Order-override-command}$m+k+km+1$ factorizes
+\noindent\label{subsec:Order-override-command}$m+k+km+1$ factorizes
 to $(k+1)(m+1)$ and you may prefer to express the total order of
 differentiation in this form. \verb`diffcoeff` is not a computer
 algebra system and does not do such factorizations but the \verb`\difoverride`
@@ -1162,7 +1167,7 @@
 Forming the \emph{second} derivative of $\ln\sin x$ will now involve
 forming, among other quantities,
 \begin{centred}
-\noindent \verb`\[\diff[2]{\ln\sin x}{\sin x}\]` $\Longrightarrow$
+\noindent\verb`\[\diff[2]{\ln\sin x}{\sin x}\]` $\Longrightarrow$
 \[\diff[2]{\ln\sin x}{\sin x}\]
 \end{centred}
 \noindent Parentheses have been inserted automatically by \verb`diffcoeff`
@@ -1211,7 +1216,7 @@
 \begin{centred}
 \verb`\[ \diffp[2]q{\frac 1\Theta} \]` $\Longrightarrow$ \[ \diffp[2]q{\frac 1\Theta}.\]
 \end{centred}
-\noindent As noted, when  differentiating to first order, parenthesising
+\noindent As noted, when differentiating to first order, parenthesising
 is up to the user:
 \begin{centred}
 \verb`\[ \diffp q{(\frac 1\Theta),V} \]` $\Longrightarrow$ \[ \diffp q{(\frac 1\Theta),V}. \]
@@ -1313,7 +1318,7 @@
 \item \emph{ordinary slash}-fraction derivatives in \emph{text}-style environments
 \item \emph{ordinary compact}-form derivatives in \emph{text}-style environments
 \end{enumerate}
-\noindent %
+\noindent{}%
 \noindent\begin{minipage}[t]{1\columnwidth}%
 \begin{shaded}%
 \noindent Users of version 4 of \texttt{diffcoeff} will notice similarities
@@ -1717,7 +1722,7 @@
 put the status and configurability of partial derivatives on the same
 footing as ordinary derivatives.
 
-\noindent %
+\noindent{}%
 \noindent\begin{minipage}[t]{1\columnwidth}%
 \begin{shaded}%
 The command \verb`\difdef` in version 5 of \verb`diffcoeff` takes
@@ -1766,7 +1771,7 @@
 Provided your \TeX{} distribution knows about your personal \verb`texmf`
 tree and the files it contains, then a \verb`.def` file placed within
 it will be accessible to all documents.
-\noindent \begin{center}
+\begin{center}
 \noindent\begin{minipage}[t]{1\columnwidth}%
 \begin{shaded}%
 
@@ -1802,12 +1807,12 @@
 In earlier versions of \verb`diffcoeff`, if there was no explicit
 \verb`def-file=<filename>` package option statement, then a file
 \verb`diffcoeff.def` was searched for and if found loaded. This is
-no longer the case. Version 5 of file of \verb`diffcoeff` searches
-for a \verb`.def` \emph{only if it is explicitly named} in a package
-option statement. (This decision was made at least in part to avoid
-conflict with a \verb`diffcoeff.def` file from an earlier version
-of \verb`diffcoeff` tucked away in some non-obvious place and producing
-obscure errors in the current version 5.) \end{shaded}%
+no longer the case. Version 5 of \verb`diffcoeff` searches for a
+\verb`.def` \emph{only if it is explicitly named} in a package option
+statement. (This decision was made at least in part to avoid conflict
+with a \verb`diffcoeff.def` file from an earlier version of \verb`diffcoeff`
+tucked away in some non-obvious place and producing obscure errors
+in the current version 5.) \end{shaded}%
 \end{minipage}
 \par\end{center}
 
@@ -1889,7 +1894,7 @@
 
 \subsubsection{Editing variant forms}
 
-\noindent %
+\noindent{}%
 \noindent\begin{minipage}[t]{1\columnwidth}%
 \begin{shaded}%
 
@@ -2099,14 +2104,24 @@
 
 \subsubsection{Compact--form derivatives}
 
-Two styles are available for compact-form derivatives, derivative
-style \verb`style=_`, and differential style \verb`style=dl`. The
-first is the default style; the orders of differentiation are applied
-to the operator symbol, in this example \verb`\partial`: 
+\label{subsec:Compact=002013form-derivatives}Two styles are available
+for compact-form derivatives, derivative style, \verb`style=_`, and
+differential style, \verb`style=dl`. The first is the default style;
+the orders of differentiation are applied to the operator symbol,
+in this example \verb`\partial`: 
 \begin{centred}
-\verb`$ \difcp[3,2]{f}{x,y,z} $` $\Longrightarrow$ $ \difcp[3,2]{f}{x,y,z} $
+\verb`$ \difcp[3,2]f{x,y,z} $` $\Longrightarrow$ $ \difcp[3,2]{f}{x,y,z} $
 \end{centred}
-But suppose we define a variant form (as is done in \verb`diffcoeff5.def`):
+What happens if no differentiation variable is specified, only an
+empty brace pair?
+\begin{centred}
+\verb`$ \difc[3]f{} $` $\Longrightarrow$ $ \difc[3]f{} $
+\end{centred}
+Note that this is the behaviour from version 5.2 of \verb`diffcoeff`.
+In version 5.1, a brace pair alone would halt compilation; a \emph{nested
+}brace pair, \verb`{{}}`, was required.
+
+Suppose now we define a variant form (as is done in \verb`diffcoeff5.def`),
 \begin{verbatim}
     \difdef { cp } { dl } { style = dl }
 \end{verbatim}
@@ -2118,7 +2133,9 @@
 In this \verb`dl` style, the orders of differentiation are applied
 to the \emph{variables}. This allows discussion of, for example, the
 denominator of a mixed partial derivative -- perhaps a remark about
-minutiae of spacing.
+minutiae of spacing. (See \xA7\ref{sec:Differentials} on differentials
+which perhaps more conveniently similarly allow the writing of, for
+example, $\dl[3]x$.)
 
 \subsubsection{D, \textbackslash delta, \textbackslash Delta derivatives}
 
@@ -2154,7 +2171,7 @@
 \noindent for the total derivative of $\rho$ (perhaps in fluid dynamics),
 or
 \begin{centred}
-\noindent \verb`$ \difc.bD.[2]y{x\,}+2\difc.bD.y{x\,}-4=0 $` $\Longrightarrow$
+\noindent\verb`$ \difc.bD.[2]y{x\,}+2\difc.bD.y{x\,}-4=0 $` $\Longrightarrow$
 $ \difc.bD.[2]y{x\,}+2\difc.bD.y{x\,}-4=0 $
 \end{centred}
 for an example in the study of differential equations.
@@ -2381,6 +2398,8 @@
 
 \verb`$ c^2\dl.-.{t,x,y,z}^2 $` $\Longrightarrow$ $ c^2\dl.-.{t,x,y,z}^2 $.
 \end{centred}
+(If what you want is not $\dl[2]x$ but $\difc[2]f{}$, with the superscript
+attached to the \verb`d`, see \xA7\ref{subsec:Compact=002013form-derivatives}.)
 
 \subsection{Template \texttt{DIFL}}
 
@@ -3240,6 +3259,14 @@
 \item makes some corresponding tweaks to documentation (including this version
 5 history).
 \end{enumerate}
+\item Version 5.2 (2023-01-24)
+\begin{enumerate}
+\item Simplifies the treatment of the empty argument of an absent differentiation
+variable;
+\item initializes (clears) two sequence variables that otherwise caused
+error when \verb`scrbook` class was used;
+\item amends documentation.
 \end{enumerate}
+\end{enumerate}
 
 \end{document}

Modified: trunk/Master/texmf-dist/tex/latex/diffcoeff/diffcoeff.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/diffcoeff/diffcoeff.sty	2023-01-29 22:21:52 UTC (rev 65675)
+++ trunk/Master/texmf-dist/tex/latex/diffcoeff/diffcoeff.sty	2023-01-29 22:32:30 UTC (rev 65676)
@@ -8,10 +8,10 @@
 % Andrew Parsloe ajparsloe at gmail.com
 %
 \DeclareRelease{v4}{}{diffcoeff4.sty}
-\DeclareCurrentRelease{}{2023/01/16}
+\DeclareCurrentRelease{}{2023/01/24}
 
 \RequirePackage{xtemplate,mleftright}
-\ProvidesExplPackage {diffcoeff} {2023/01/16} {5.1} 
+\ProvidesExplPackage {diffcoeff} {2023/01/24} {5.2} 
   {Write differential coefficients easily and consistently.}
 \keys_define:nn { diffcoeff }
   { 
@@ -77,7 +77,6 @@
 \bool_new:N \l__diffcoeff_multitok_bool
 \bool_new:N \l__diffcoeff_append_bool
 \bool_new:N \l__diffcoeff_op_left_bool
-\bool_new:N \l__diffcoeff_dl_bool
 \bool_new:N \l__diffcoeff_exponent_bool
 \tl_new:N \l__diffcoeff_override_tl
 \tl_new:N \l__diffcoeff_frac_tl
@@ -206,7 +205,8 @@
     \__diffcoeff_check_style:nn 
         { \l__diffcoeff_group_int } { \l__diffcoeff_style_int }
     \__diffcoeff_append:n { #1 }
-    \exp_args:Nx \__diffcoeff_orders:nn { \clist_count:n {#4} } { #2 }
+    \exp_args:Nx \__diffcoeff_orders:nn 
+        { \int_max:nn { 1 } { \clist_count:n {#4} } } { #2 }
     \__diffcoeff_override:N \l__diffcoeff_override_tl
     \__diffcoeff_derivand:n { #3 }
     \__diffcoeff_build:nn { #4 } { #5 } 
@@ -225,7 +225,7 @@
         { 4 } { \tl_set:Nn \l__diffcoeff_frac_tl { \difsafrac } }
         { 5 } { \tl_set:Nn \l__diffcoeff_frac_tl { \difsbfrac[#2] } }
         { 6 } { \tl_set:Nn \l__diffcoeff_frac_tl {} }
-        { 7 } { \bool_set_true:N \l__diffcoeff_dl_bool }
+        { 7 } { \tl_set:Nn \l__diffcoeff_frac_tl {} }
         { 9 } 
           { 
             \msg_error:nnxx { diffcoeff } { unknown-style }
@@ -265,14 +265,6 @@
   }
 \cs_new:Npn \__diffcoeff_style_group:n #1
   { \clist_item:nn { frac, /, _, frac, dl } { #1 + 1 } }
-\cs_new:Npn \__diffcoeff_style_aux:n #1
-  {
-    \int_compare:nNnTF { #1 } = { 3 } { { 0 } {} }
-      { 
-        \int_compare:nNnTF { #1 } = { 4 } { { 7 } {} }
-        { { 3*#1 } {} } 
-      }
-  }
 %%%%%%%%% append? (& wrap slash diff operator?)
 \cs_new_protected:Npn \__diffcoeff_append:n #1
   {
@@ -288,8 +280,8 @@
 %%%%%%%%%
 % #1(int) no. of vars; #2(clist) orders spec
 \cs_new_protected:Npn \__diffcoeff_orders:nn #1#2 
-  {
-     \bool_if:NTF \l__diffcoeff_exponent_bool
+  { 
+    \bool_if:NTF \l__diffcoeff_exponent_bool
       { 
         \exp_args:NNx \seq_set_from_clist:Nn \l__diffcoeff_ords_seq 
             { \prg_replicate:nn { #1 } { \l__diffcoeff_exponent_tl, } }
@@ -299,7 +291,7 @@
         \exp_args:Nnx\__diffcoeff_adj_ords_seq:nn { #1 }
             { \seq_count:N \l__diffcoeff_ords_seq }
       }
-    \tl_set:Nx \l__diffcoeff_vph_tl {\seq_use:Nn\l__diffcoeff_ords_seq {} }
+    \tl_set:Nx \l__diffcoeff_vph_tl { \seq_use:Nn\l__diffcoeff_ords_seq {} }
   }
 \cs_new_protected:Npn \__diffcoeff_adj_ords_seq:nn #1#2
   { 
@@ -530,6 +522,8 @@
 % #1 (propv) key=var, val=coeff; #2 <= total order
 \cs_new_protected:Npn \__diffcoeff_evaluate:NN #1#2
   { 
+    \seq_clear:N \l_tmpa_seq
+    \seq_clear:N \l_tmpb_seq
     \prop_map_inline:Nn #1 { \seq_put_left:Nn \l_tmpa_seq { ##1 } }
     \seq_sort:Nn \l_tmpa_seq
       {
@@ -593,7 +587,9 @@
           \msg_error:nnnn { diffcoeff } { version-conflict } { / } 
           { Use~\difs or~\difsp instead.~ } 
        }
-    \seq_set_from_clist:Nn \l__diffcoeff_vars_seq { #1 } 
+    \clist_if_empty:nTF { #1 }
+      { \seq_set_from_clist:Nn \l__diffcoeff_vars_seq { \prg_do_nothing: } }
+      { \seq_set_from_clist:Nn \l__diffcoeff_vars_seq { #1 } }
     \seq_pop_right:NN \l__diffcoeff_vars_seq \l__diffcoeff_var_tl
     \tl_put_left:Nx \l__diffcoeff_derivand_tl
       { \__diffcoeff_spaced:n { \l__diffcoeff_spaced_int } }
@@ -678,7 +674,7 @@
   }
 % #1 order #2 var
 \cs_new:Npn \__diffcoeff_build_denom_item:nn #1#2 
-  {
+  { 
     \int_compare:nNnTF { \l__diffcoeff_style_int } = { 6 }
       { \__diffcoeff_build_denom_difc:onn \l__diffcoeff_vph_tl {#1}{#2} }
       { \__diffcoeff_build_denom_dif:nn {#1} {#2} }



More information about the tex-live-commits mailing list.