1

I want to change the font here:

\documentclass{komacv}

\begin{document}

\section{M}
\cvitem{M}{M}

\end{document}

to be the same as here:

\documentclass{scrlttr2}
\KOMAoptions{fontsize=11pt}

\begin{document}
\begin{letter}{}
M
\end{letter}

\end{document}

In scrlttr2 it should be lmodern. But I'm unable to change the font of komacv.

1 Answer 1

2

As far as I can see you are asking to change the font in komacv from sans serif to roman, right?

In chapter 3.7 Encoding and Fonts of the komacv documentation (call texdoc komacv on your terminal!) you can read that the style for a section is defined like:

\setkomafont{section}{\Large\sffamily\mdseries\slshape}

Just change it to

\setkomafont{section}{\Large\rmfamily\mdseries\slshape}

And to get the roman font in normal text you need to add

\renewcommand\familydefault{\rmdefault}\normalfont

at the beginning of your document.

So with the following complete MWE

\documentclass{komacv}

\usepackage{lmodern}
\setkomafont{section}{\Large\rmfamily\mdseries\slshape} % <=============

\begin{document}

\renewcommand\familydefault{\rmdefault}\normalfont % <==================

\section{M}
\cvitem{M}{M}

\end{document}

you get the result:

enter image description here

Do not forget to change the other font definitions to use \rmdefault ...

1
  • So \newkomafont{firstnamefont}{\Huge\rmfamily\mdseries\upshape} would be correct. Can you tell me what the difference between \rmdefault and \rmfamily is?
    – user1
    Oct 28, 2018 at 21:47

You must log in to answer this question.

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