summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/bropd
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-10-15 22:22:36 +0000
committerKarl Berry <karl@freefriends.org>2014-10-15 22:22:36 +0000
commitd21745ac1c076a65eb84bca7ced2c0411abe26ba (patch)
treecac14b4f94001105448021748bd742dc8d86c1a2 /Master/texmf-dist/source/latex/bropd
parent418570a6666dc24bf8c0577eafd6d10525569b3b (diff)
bropd (15oct14)
git-svn-id: svn://tug.org/texlive/trunk@35383 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/bropd')
-rw-r--r--Master/texmf-dist/source/latex/bropd/bropd.dtx31
1 files changed, 17 insertions, 14 deletions
diff --git a/Master/texmf-dist/source/latex/bropd/bropd.dtx b/Master/texmf-dist/source/latex/bropd/bropd.dtx
index 7cdca792709..d2d2282bb86 100644
--- a/Master/texmf-dist/source/latex/bropd/bropd.dtx
+++ b/Master/texmf-dist/source/latex/bropd/bropd.dtx
@@ -2,7 +2,7 @@
%<*batchfile>
{\obeylines\obeyspaces \gdef\thepreamble{
-Copyright 2012 by Benjamin Tatlock
+Copyright 2014 by Benjamin Tatlock
This work may be distributed and/or modified under the conditions of the
LaTeX Project Public License, either version 1.3 of this license or (at your
@@ -73,7 +73,8 @@ specified as an optional argument, illustrated here with the command
\verb|\od[2]{u}{x}=-\omega^2u| which results in\[\od[2]{u}{x}=-\omega^2u.\]When
using \verb|\od| with a sans-serif font, the package should be loaded with the
optional argument \verb|sans|.
-\subsubsection{Partial differential}The command \verb|\pd| follows the same form as \verb|\od|, but instead produces partial differentials. By default,
+\subsubsection{Partial differential}The command \verb|\pd| follows the same form
+as \verb|\od|, but instead produces partial differentials. By default,
\verb|\pd{u}{t}=6u\pd{u}{x}-\pd[3]{u}{x}|
produces\[\pd{u}{t}=6u\pd{u}{x}-\pd[3]{u}{x}.\]Loading the package with the
option \verb|pdshort| results in an alternative format for partial
@@ -123,7 +124,7 @@ output is\[\partial_tE+\sum_{i=1}^3\partial_{x_i}\br{\br{E+p}u_i}.\]
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bropd}
-[2012/11/08 1.1 automated typing of brackets and differential operators]
+[2014/10/14 1.2 automated typing of brackets and differential operators]
% \end{macrocode}
% Initiate conditionals and counters
% \begin{macrocode}
@@ -184,23 +185,26 @@ output is\[\partial_tE+\sum_{i=1}^3\partial_{x_i}\br{\br{E+p}u_i}.\]
\else
% \end{macrocode}
% If optional argument provided, display partial differential to stated order
-% \changes{v\fileversion}\filedate{Fixed higher order differentials with
-% denominators containing commands}
+% \changes{v1.1}{2012/11/08}{Fixed higher order differentials with denominators
+% containing commands}
% \begin{macrocode}
\frac{#4^{#1}\@bropd@o}{#4\noexpand#3^{#1}}
\fi}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\@bropd@j}
-% Internal command for brackets. Evaluate terms within brackets to determine
-% the highest bracket level
+% Internal command for brackets. Evaluate terms within brackets to determine the
+% highest bracket level
+% \changes{v\fileversion}\filedate{Changed \cs{bgroup} to \cs{begingroup} and
+% \cs{egroup} to \cs{endgroup} to remove erroneous introduction of space before
+% and after brackets}
% \begin{macrocode}
\def\@bropd@j#1{\setcounter{@bropd@f}0
-{\renewcommand{\br}[1]{\stepcounter{@bropd@e}{##1}
+\begingroup\renewcommand{\br}[1]{\stepcounter{@bropd@e}##1
\ifnum\value{@bropd@e}>\value{@bropd@f}
\setcounter{@bropd@f}{\value{@bropd@e}}
\fi
-\addtocounter{@bropd@e}{-1}}\sbox0{$#1$}}
+\addtocounter{@bropd@e}{-1}}\sbox0{$#1$}\endgroup
\loop
\ifnum\value{@bropd@f}>2
\addtocounter{@bropd@f}{-3}
@@ -239,7 +243,7 @@ output is\[\partial_tE+\sum_{i=1}^3\partial_{x_i}\br{\br{E+p}u_i}.\]
% \end{macro}
% \begin{macro}{\@bropd@q}
% Internal command for first alternative partial differential command
-% \changes{v\fileversion}\filedate{Added second alternative form for partial
+% \changes{v1.1}{2012/11/08}{Added second alternative form for partial
% differentials}
% \begin{macrocode}
\def\@bropd@q#1#2#3{\def\@bropd@h{#1}
@@ -248,8 +252,8 @@ output is\[\partial_tE+\sum_{i=1}^3\partial_{x_i}\br{\br{E+p}u_i}.\]
\else
% \end{macrocode}
% Default partial differential if character provided as optional argument
-% \changes{v\fileversion}\filedate{Allowed partial differential with empty
-% numerator without need for bracket command after}
+% \changes{v1.1}{2012/11/08}{Allowed partial differential with empty numerator
+% without need for bracket command after}
% \begin{macrocode}
\if!\ifnum9<1#1!\else_\fi
\@bropd@bfalse
@@ -324,8 +328,7 @@ output is\[\partial_tE+\sum_{i=1}^3\partial_{x_i}\br{\br{E+p}u_i}.\]
% \end{macrocode}
% \end{macro}
% \begin{macro}{\pd}
-% \changes{v\fileversion}\filedate{Brackets automatically added after empty
-% numerator}
+% \changes{v1.1}{2012/11/08}{Brackets automatically added after empty numerator}
% \begin{macrocode}
\newcommand\pd[3][]{\def\@bropd@o{#2}
\ifx\@bropd@o\empty