I am trying to compile a CV using moderncv.cls but have problems with the special danish characters æ,ø,å. Normally I add either \usepackage[utf8]{inputenc} or \usepackage[applemac]{inputenc} packages to my template but this is not really working.

The moderncv.cls file has the following part:


Normally I would have \usepackage[utf8]{inputenc} before fontenc, but the \RequirePackage seem to mess this up. I use Texmaker and MacOS.

Does anyone know how I can add the package?


\documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman

\moderncvstyle{casual} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

\usepackage[scale=0.75]{geometry} % Reduce document margins
%\setlength{\hintscolumnwidth}{3cm} % Uncomment to change the width of the dates column
%\setlength{\makecvtitlenamewidth}{10cm} % For the 'classic' style, uncomment to adjust the width of the space allocated to your name


\firstname{Lonnie} % Your first name
\familyname{Andersen} % Your last name

% All information in this block is optional, comment out any lines you don't need
\title{Curriculum Vitae}
\address{Gladsaxevej 78, st tv, 2860 Søborg}
\mobile{+45 31444177}
\extrainfo{additional information}
%\photo[70pt][0.4pt]{pictures/Lonnie} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)
%\quote{"A witty and playful quotation" - John Smith}



\makecvtitle % Print the CV title



\cventry{2009--2013}{Ph.D student}{DTU Wind Energy}{}{Currently finishing thesis}{}
\cventry{2003--2009}{Cand. Scient in Biomedical engineering}{DTU}{}{\textit{GPA -- 8.4}}{}


closed as too localized by Frank Mittelbach, lockstep, Thorsten, diabonas, egreg Jan 12 '13 at 20:34

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Welcome to TeX.sx! It should make no real differerence if fontenc is loaded before or after inputenc. Can you add a minimal working example (MWE)? – egreg Jan 12 '13 at 14:14
  • Hi I have added MWE that runs as soon as I comment out the adress line. I have tried using \o and {\o} which sometmes does the trick but nothing works. The fontenc line is something I have added but it makes no difference. – Lonnie Jan 12 '13 at 14:53
  • The inputenc line should reflect the actual encoding of the file, which depends on the setting of the editor. Just ensure it's UTF-8 and add \usepackage[utf8]{inputenc}. – egreg Jan 12 '13 at 14:59
  • Your question led me to a solution for a problem I had where the text inserted by a command in a class wasn't turning out correctly but the text in the document was. I solved it by adding \RequirePackage[T1]{fontenc} and \RequirePackage[utf8]{inputec} to the class. Thanks! And a comment to the moderators who thought this question was too localized. The example mentions Danish characters, but it could as well have been any non-ASCII characters! This means the question relates to almost every language that isn't English. I'm not really sure how to be less localized than that! – Magnus Mar 12 '16 at 12:30

This has nothing to do with the encoding of the file. (Although your example should have \usepackage[utf8]{inputenc} in it.)

The \address macro in moderncv requires 2 arguments, and you are only providing one. It then tries to read the \mobile macro as the second argument and the error arises.

So you need:

\address{Gladsaxevej 78, st tv}{2860 Søborg}

(Or something similar) as your address line.

  • Thank you so much, I actually just found this out before seeing your answer, had deleted two brackets by mistake. Thank you so much for the quick help, great great forum!!! – Lonnie Jan 12 '13 at 15:19

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