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.
I'd consider this a bug. The error should not be raised when amsmath is already loaded. Do you agree?
Is there a way I could change my package (replace
\RequirePackage{amsmath}) to avoid this error?
minimal, neither for minimal examples nor real documents. – Johannes_B Mar 18 '15 at 22:12mathspec. A veryy simple and basic solution would be to test ifamsmathis 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