wspr / breqn

Automatic line breaking in LaTeX equations
18 stars 2 forks source link

comflict between breqn and flexisym #37

Closed jszhao closed 4 years ago

jszhao commented 4 years ago

The following two pieces of code will give errors:

\documentclass{article}
\usepackage[cmbase]{flexisym}
\usepackage{breqn}
\begin{document}
\end{document}

and

\documentclass{article}
\usepackage{breqn}
\usepackage[cmbase]{flexisym}
\begin{document}
\end{document}

The first piece of code worked before the last (I am not very sure about it) update (2020/02/16 0.98h). After remove [cmbase], the second piece of code works.

Any hint?

josephwright commented 4 years ago

breqn requires flexisym so you have to load the latter first.

jszhao commented 4 years ago

breqn requires flexisym so you have to load the latter first.

then the code

\documentclass{article}
\usepackage{flexisym}
\usepackage{breqn}
\begin{document}
\end{document}

give the following error message:

! LaTeX Error: Command \dfrac already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.228 \newcommand{\dfrac}{\genfrac{}{}{}0}

Any hint? Thanks a lot.

jszhao commented 4 years ago

The above error stems from that mathstyle package is loaded before amsmath package.

In the document of mathsytle package, it said that If you want to use this package with amsmath, it is important mathstyle is loaded after amsmath.

In the above example, amsmath package is required by by breqn package, and mathstyle package is require by flexisym package. However, flexisym package should be load before breqn package, thus, that causes the amsmath package is loaded after mathstyle package.

How to fix it? Thanks a lot.

jszhao commented 4 years ago

well, the solution to this error is to load the amsmath package explicitly before the flexisym package, as following,

\documentclass{standalone}
\usepackage{amsmath}
\usepackage[cmbase]{flexisym}
\usepackage{breqn}
\begin{document}
\end{document}
wspr commented 4 years ago

Thanks for this discussion, I’ve updated the docs to make this more clear.