I have a master style file of macros, which I use for all of my documents. Is there something I can add to the preamble of a particular file so that it ignores some specific macro from my style file?
For example. My style file includes my custom shortcut \foo
. Now I am writing a specific document, and I want to use some unusual symbol that is part of some random package I never use. So I add this package to the preamble of this document, to get the command for the unusual symbol. But this package happens to use the command \foo
for some other thing I don't care about, and so now I get the \foo already defined
error when I try to compile. I would like to add something to the preamble of this document so that it ignores \foo
in my style file. Is this possible?
\renewcommand{\foo}{}
or for a symbolsavesymbol
package\renewcommand{\foo}{}
doesn't work. I am not familiar with thesavesymbol
package, and I couldn't figure out how to implement it. However, when searching for info onsavesymbol
, I found this question, which provides an answer. In particular, I add\let\foo\relax
to the preamble between\usepackage{mymacros}
and\usepackage{randompacakge}
. Should I delete the question?\let\foo\relax
can work but you won't be able to access the original definition thensavesym
, notsavesymbol
, but the command is called that way, sorry about!