1

Tried to compile this sample code on my machine using xelatex (W10, new installation of miktex).

It gave an error "LaTeX Error: Command `\eth' already defined".

Here is the code:

\documentclass[english,12pt,a4paper,roman]{moderncv}

\usepackage{amsmath}
\usepackage{amssymb}

\usepackage[english]{babel}

\usepackage{unicode-math}
\setmainfont{Calibri}
\setmathfont{Latin Modern Math}

\begin{document}
Hello World.
\end{document}

Changing the class to article eliminates this error, but I want to use moderncv and xelatex. Any help would be appreciated!

1 Answer 1

1

This is technically covered in LaTeX command is already defined error, since moderncv loads unicode-math. So you can either use

\RequirePackage{amssymb}
\documentclass[...]{moderncv}
%...

or

\documentclass[...]{moderncv}
%...
\let\eth\relax
\let\digamma\relax
\let\backepsilon\relax
\usepackage{amssymb}
%...

The latter option removes any commands that would have been defined already that amssymb tries to (re)define.

1
  • Thanks! that's extremely helpful.
    – ikp
    Sep 11, 2021 at 3:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .