[latex3-commits] [git/LaTeX3-latex3-mathtools] master: reverted \splitfrac change, updated doc instead (d8f74cf)

daleif daleif at math.au.dk
Thu Mar 5 11:48:34 CET 2020


Repository : https://github.com/latex3/mathtools
On branch  : master
Link       : https://github.com/latex3/mathtools/commit/d8f74cf8c6590063df2e7fb5b3ed883c141b7b12

>---------------------------------------------------------------

commit d8f74cf8c6590063df2e7fb5b3ed883c141b7b12
Author: daleif <daleif at math.au.dk>
Date:   Thu Mar 5 11:48:34 2020 +0100

    reverted \splitfrac change, updated doc instead


>---------------------------------------------------------------

d8f74cf8c6590063df2e7fb5b3ed883c141b7b12
 mathtools.dtx | 52 +++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 45 insertions(+), 7 deletions(-)

diff --git a/mathtools.dtx b/mathtools.dtx
index 0121b9e..32ab8c5 100644
--- a/mathtools.dtx
+++ b/mathtools.dtx
@@ -2678,8 +2678,49 @@ colorlinks,
 % the former forces its arguments to be typeset in text-mode math, the
 % latter does not.
 %
-%
-%
+% \medskip\noindent \textbf{Note:} If you try to nest \cs{splitfrac}
+% inside each other you may need to add \cs{mathstrut} to the first
+% argument of the nested fraction to get the spacing look even. It is
+% not added by default as often a more cramped looked is desired:
+% \begin{verbatim}
+%  \[
+%  \frac{
+%      \splitfrac{xy + xy + xy + xy + xy}
+%      {
+%      \splitfrac{xy + xy + xy + xy + xy}
+%                {+ xy + xy + xy + xy}
+%      }
+%    }
+%    {z}
+%  =\frac{
+%      \splitfrac{xy + xy + xy + xy + xy}
+%      {
+%      \splitfrac{\mathstrut xy + xy + xy + xy + xy}
+%                {+ xy + xy + xy + xy}
+%      }
+%    }
+%    {z}
+%  \]
+% \end{verbatim}
+%  \[
+%  \frac{
+%      \splitfrac{xy + xy + xy + xy + xy}
+%      {
+%      \splitfrac{xy + xy + xy + xy + xy}
+%                {+ xy + xy + xy + xy}
+%      }
+%    }
+%    {z}
+%  =\frac{
+%      \splitfrac{xy + xy + xy + xy + xy}
+%      {
+%      \splitfrac{\mathstrut  xy + xy + xy + xy + xy}
+%                {+ xy + xy + xy + xy}
+%      }
+%    }
+%    {z}
+%  \]
+% Note how the line spaces aren't even on the left hand side.
 %
 %
 %
@@ -6142,16 +6183,13 @@ colorlinks,
 %  These commands use \cs{genfrac} to typeset a split fraction. The
 %  thickness of the fraction rule is simply set to zero.
 %    \begin{macrocode}
-% \changes{v1.24}{2020/03/05}{Added \cs{mathstrut} to both arguments
-% not just the first. This makes the line spacing consistent when the
-% macro is nested in side it self.}
 \newcommand*\splitfrac[2]{%
   \genfrac{}{}{0pt}{1}%
-    {\textstyle\mathstrut#1\quad\hfill}%
+    {\textstyle#1\quad\hfill}%
     {\textstyle\hfill\quad\mathstrut#2}%
 }
 \newcommand*\splitdfrac[2]{% 
-  \genfrac{}{}{0pt}{0}{\mathstrut#1\quad\hfill}{\hfill\quad\mathstrut #2}%
+  \genfrac{}{}{0pt}{0}{#1\quad\hfill}{\hfill\quad\mathstrut #2}%
 }
 %    \end{macrocode}
 %  \end{macro}





More information about the latex3-commits mailing list.