summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/breqn/breqn.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/breqn/breqn.dtx')
-rw-r--r--macros/latex/contrib/breqn/breqn.dtx46
1 files changed, 21 insertions, 25 deletions
diff --git a/macros/latex/contrib/breqn/breqn.dtx b/macros/latex/contrib/breqn/breqn.dtx
index 9f344f3d1e..10b584bd83 100644
--- a/macros/latex/contrib/breqn/breqn.dtx
+++ b/macros/latex/contrib/breqn/breqn.dtx
@@ -150,8 +150,8 @@
%
%
% \title{The \pkg{breqn} package}
-% \def\fileversion{0.98i}
-% \def\filedate{2020/02/18}
+% \def\fileversion{0.98j}
+% \def\filedate{2020/04/19}
% \date{\pkg{breqn} bundle: \filedate\space\fileversion}
% \author{Authors: Michael J. Downes, Morten H\o gholm\\ Maintained by Morten H\o gholm, Will Robertson\\ Feedback: \texttt{https://github.com/wspr/breqn/issues}}
%
@@ -189,18 +189,29 @@
%
% \section{Package loading}
%
+% The \pkg{breqn} package automatically loads \pkg{amsmath} to avoid loading order conflicts.
+% It also automatically loads \pkg{flexisym} and \pkg{mathstyle}, but in some cases these
+% packages need to be loaded separately. The canonical order for package loading is:
+% \begin{verbatim}
+% \usepackage{amsmath}
+% \usepackage{flexisym}
+% \usepackage{breqn}
+% \end{verbatim}
%
% The recommended way of loading the \pkg{breqn} package is to load it
-% \emph{after} other packages dealing with math, \ie, after
-% \pkg{amsmath}, \pkg{amssymb}, or packages such as \pkg{mathpazo} or
-% \pkg{mathptmx}.
+% \emph{before} other packages dealing with math symbols, \ie, before
+% \pkg{amssymb}, or packages such as \pkg{mathpazo} or \pkg{mathptmx}.
+% However, this can sometimes lead to macro definition clashes, and in such cases
+% you may need to juggle the loading order to make it work.
+%
+% \subsection{Options for \pkg{flexisym}}
%
% The \pkg{flexisym} package (described in section \vref{flexisym}) is
% required by \pkg{breqn} and ensures the math symbols are set up
% correctly. By default \pkg{breqn} loads it with support for Computer
% Modern but if you use a different math package requiring slightly
-% different definitions, it must be loaded before \pkg{breqn}. Below
-% is an example of how you enable \pkg{breqn} to work with the widely
+% different definitions, \pkg{flexisym} must be explicitly loaded before \pkg{breqn} as shown above.
+% Below is an example of how you enable \pkg{breqn} to work with the widely
% used \pkg{mathpazo} package.
% \begin{verbatim}
%\usepackage{mathpazo}
@@ -214,11 +225,6 @@
% \fn{flexisym.dtx} for how to create a support file---it is easier
% than one might think. Contributions welcome.
%
-% The documentation for the package was formerly found in
-% \fn{breqndoc}. It has now been added to this implementation
-% file. Below follows the contents of the original \pkg{breqn}
-% documentation. Not all details hold anymore but I have prioritized
-% fixing the package.
%
% \section{Introduction}
%
@@ -556,8 +562,6 @@
% \begin{dmath}[spread={1pt}]
% \begin{dmath}[frame]
% \begin{dmath}[frame={1pt},framesep={2pt}]
-% \begin{dmath}[background={red}]
-% \begin{dmath}[color={purple}]
% \begin{dmath}[breakdepth={0}]
% \end{verbatim}
%
@@ -603,15 +607,6 @@
% Use the \opt{framesep} option to change the amount of space separating
% the frame from what it encloses. The default space is \cs{fboxsep}.
%
-% Use the \opt{background} option to produce a colored background for the
-% equation body. The \pkg{breqn} package doesn't automatically load the
-% \pkg{color} package, so this option won't work unless you remember
-% to load the \pkg{color} package yourself.
-%
-% Use the \opt{color} option to specify a different color for the contents
-% of the equation. Like the \opt{background} option, this doesn't work if
-% you forgot to load the \pkg{color} package.
-%
% Use the \opt{breakdepth} option to change the level of delimiter nesting
% to which line breaks are allowed. To prohibit line breaks within
% delimiters, set this to 0:
@@ -1381,7 +1376,7 @@
% Declare package name and date.
% \begin{macrocode}
\RequirePackage{expl3}
-\ProvidesExplPackage{breqn}{2020/02/18}{0.98i}{Breaking equations}
+\ProvidesExplPackage{breqn}{2020/04/19}{0.98j}{Breaking equations}
% \end{macrocode}
% Regrettably, \pkg{breqn} is internally a mess, so we have to take
% some odd steps.
@@ -6241,8 +6236,9 @@
\def\premath{%
% \end{macrocode}
% BRM: Tricky to cleanup space OR add space ONLY BETWEEN math!
+% FMi: improvement to measure against current font.
% \begin{macrocode}
- \ifdim\lastskip<.3em \unskip
+ \ifdim\lastskip<\fontdimen2\font \unskip
\else\ifnum\lastpenalty<\@M \dquad\fi\fi
}%
% \end{macrocode}