Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to use symbols from wasysym and marvosym packages:

\usepackage{wasysym}
\usepackage{marvosym}

but it gives an errors as both packages have the command of \CheckedBox. I do not want to use this command, but since both packages have it, it makes confusion for latex. How can I ignore one command to have both packages?

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

If you load the packages in the other order, then everything works fine.

\usepackage{marvosym}
\usepackage{wasysym}

If you want to keep them in the order you currently have, then the following works

\usepackage{wasysym}
\let\CheckedBox\relax
\usepackage{marvosym}
share|improve this answer
    
In the last version of marvosym.sty, the command \CheckedBox is not defined any more (there's always been the alias \Checkedbox). –  egreg Apr 19 '12 at 12:01
    
@egreg thanks for the info :) –  cmhughes Apr 19 '12 at 12:02
    
@cmhughes I like your second solution, as conflicts may happen with other packages too. For example, I have conflict of /Cross for marvosym and bbding. –  All Apr 19 '12 at 12:13
add comment

As cmhughes indicates, sometimes loading the packages in reverse order solves the problem. However, if reversing the order still produces clashes, or if, for some reason, reversing the order is not an option, there's a nice procedure to prevent symbol names clashes when two packages define the same symbol(s): load the first package, rename the conflicting symbols, and then load the second package. The \savesymbol command from the savesym package can be used to this; \savesymbol{XXX} renames a symbol from \XXX to \origXXX:

\documentclass{article}
\usepackage{savesym}
\usepackage{wasysym}
\savesymbol{CheckedBox}
\usepackage{marvosym}

\begin{document}

\CheckedBox\qquad\origCheckedBox

\end{document}

enter image description here

share|improve this answer
    
very interesting solution. It will be a tricky approach, useful for many cases we may face; particularly when we do not want to miss a conflicted symbol. –  All Apr 19 '12 at 12:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.