Avoiding naming collisions in TeX/LaTeX

Both the pifont and marvosym package define a macro named cross, so a simple \usepackage pair like:

\usepackage{pifont}
\usepackage{marvosym}

generates an error. The savesym package is here to save the day:

\usepackage{savesym}
\usepackage{pifont}
\savesymbol{cross}
\usepackage{marvosym}
\restoresymbol{PIF}{cross}

Now both packages are loaded safely (and the pifont \cross macro is now available under the name \PIFcross).

Published 8 Feb 2014
Tagged tex-latex.

 

This page was generated at 4:16 PM on 26 Feb 2018.
Copyright © 1999 - 2018 Rodney Waldhoff.