Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

category:amsmath Improve error message when using amsmath after breqn #209

Closed
Volker-Weissmann opened this issue Nov 4, 2019 · 5 comments

Comments

@Volker-Weissmann
Copy link

As documented here, if you want to use breqn and amsmath, you have to use \usepackage{amsmath} BEFORE \usepackage{breqn} or it won't work. There is nothing wrong with this constraint, but I think the error message should be clearer: If you attempt to compile

\RequirePackage{latexbug}
\documentclass{article}
\usepackage{breqn}
\usepackage{amsmath}
\begin{document}\end{document}

you get the 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.224 \newcommand{\dfrac}{\genfrac{}{}{}0}

It would be a nice improvement if \usepackage{amsmath} would check if breqn was already imported and output a "You cannot import amsmath after breqn" - Error-message.

@Volker-Weissmann Volker-Weissmann changed the title Improve error message when using amsmath after breqn category:amsmath category:amsmath Improve error message when using amsmath after breqn Nov 4, 2019
@davidcarlisle
Copy link
Member

I'll see if the situation can be improved, I'm moderately against one package having a fixed check assuming the capabilities of another package as these sorts if checks tend to become wrong as packages change over time.

One way of avoiding the error would be if breqn did \RequirePackage{amsmath}
so it was always loaded and the error couldn't happen, but that may have too many compatibility issues (@wspr ?)

@Volker-Weissmann
Copy link
Author

You are kind of right. The most elegant way would be to make sure, that

\usepackage{breqn}
\usepackage{amsmath}

compiles without error.

@wspr
Copy link
Contributor

wspr commented Nov 5, 2019 via email

@FrankMittelbach
Copy link
Member

FrankMittelbach commented Nov 5, 2019

@wspr you are maintaining breqn these days don't you? If so I would suggest to close here and you do just that (or at least we open an issue on breqn for this). Unfortunately, issue transfer doesn't work across.

@FrankMittelbach
Copy link
Member

open issue with breqn so close here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants