5

In my package, I request amsmath with \RequirePackage{amsmath}, resulting in this basic setup:

\documentclass{minimal}
\usepackage{amsmath}
\usepackage{mathspec}
\RequirePackage{amsmath} % part of another package, \usepackage{...}
\begin{document}
hi
\end{document}

This leads to the error

Package mathspec Error: 'amsmath' must be loaded earlier than 'mathspec'.

at the 2nd request for amsmath, although amsmath is already loaded.

I could, of course load my package before mathspec. However, a user of my package has the problem that he uses a template and cannot load packages before mathspec, only after it.

  1. I'd consider this a bug. The error should not be raised when amsmath is already loaded. Do you agree?

  2. Is there a way I could change my package (replace \RequirePackage{amsmath}) to avoid this error?

mhchem
  • 3,485
  • 12
  • 37
  • Do not use minimal, neither for minimal examples nor real documents. – Johannes_B Mar 18 '15 at 22:12
  • 2
    This is hardcoded in mathspec. A veryy simple and basic solution would be to test if amsmath is already loaded and else set a warning if loaded later. I would consider this a bug (cannot call this feature) and reach out to the package maintainer. – Johannes_B Mar 18 '15 at 22:19

0 Answers0