I would like to use multiple labels in the same equation when using amsmath
. Basic latex already has this feature, but not amsmath, which seems to manipulate labels in complicated ways. Is it possible to alter the amsmath.sty
code to restore this feature?
Or, alternatively, how to temporarily unload the amsmath
package? This issue arises when compiling together different articles with \include
, some using amsmath
and not others. But I found that unloading packages is not possible in latex.
Best Answer
According to p. 86 of the
cleveref
user guide,Hence, you may want to include the following code in the preamble, after loading the
amsmath
package:so that you have a command that doesn't contain the "secret letter"
@
. Alternatively, you could execute the command\let\ltxxlabel\label
before loading theamsmath
package. Then, replace all\label
commands in your document -- except, of course, those that are actually associated with equation numbers -- with\ltxxlabel
.I cannot try out this suggested solution myself since I don't have a clear idea as to how you use the
\label
command in your document for purposes other than creating associations with equation numbers. Nevertheless, I would encourage you to try out this method.Addendum: The
cleveref
user guide has the following to say about the treatment of the\label
macro in the multiline equation environments (such asgather
,align
, andmultline
) of theamsmath
environment:Given these observations, it would seem that only the adventurous and daring may want to delve into redefining the ways that
amsmath
works with the\label
command in its multiline equation environments. I must admit to not being sufficiently daring, at least not in this category...