9

I would like to use MnSymbol alongside Springer's LNCS class file, llncs.cls, which can be found in this zip file and in many other places on the web.

\documentclass{llncs}
\usepackage{MnSymbol}
\begin{document}
\end{document}

I get the dreaded ! LaTeX Error: Command\vec' already defined.`

What's the cleanest, simplest way to undefine the \vec introduced by llncs.cls so that I can \usepackage{MnSymbol}?

Roly
  • 4,221
  • 4
  • 26
  • 56

2 Answers2

10

The class llncs redefines \vec unless the orivec option is used.

\documentclass[orivec]{llncs}
\usepackage{MnSymbol}
\begin{document}

Hello! $\vec{x}$

\end{document}

enter image description here

Usual caveat: using MnSymbol without setting the main font to Minion is not really typographically sound, as MnSymbol changes all symbols to a style that's rather different from other fonts' style.

egreg
  • 1,121,712
  • Ah, I wasn't aware of this caveat. Is there another question or some examples you can point me to? – Roly Feb 12 '14 at 14:15
  • 1
    @Roly Check http://tex.stackexchange.com/questions/14386/importing-a-single-symbol-from-a-different-font – egreg Feb 12 '14 at 14:18
  • I have consulted that entry before. Looking at it again, I don't see any mention of Minion, though. Am I missing something? – Roly Feb 12 '14 at 14:20
  • 3
    @Roly That's a general problem with packages such as MnSymbol, mathabx or newtx: they change all symbols to a possibly incompatible style; if only one symbol that's missing is needed, it's better to load only that one, rather than the whole set. – egreg Feb 12 '14 at 14:24
  • Ah, good to have that concisely summarised. Thanks. (And Mn stands for Minion, presumably?) – Roly Feb 13 '14 at 10:38
2

I just found this solution in an old project:

\let\oldvec\vec% Store \vec in \oldvec
\documentclass{llncs}
\let\vec\oldvec% Restore \vec from \oldvec

I guess this answers my own question, but maybe there's something less hacky.

Roly
  • 4,221
  • 4
  • 26
  • 56