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 created i cv using the package moderncv. I also would like to create a letter. So far i used scrlttr2 package, but it uses a different font than moderncv, so it looks inconsistent. So my question is how do i set the same font.

share|improve this question
1  
If i remember correctly the moderncv template itself has latex code to typeset the covering letter in the last page. you can uncomment them when you need –  texenthusiast Jun 26 '12 at 18:07
add comment

3 Answers

up vote 10 down vote accepted

Actually, a combination of the two answers given will give the desired result:

\documentclass{scrlttr2}

% ---- beginning of relevant part
\usepackage{lmodern}% Latin Modern typeface (font)
\usepackage[T1]{fontenc}% T1 font encoding for high quality font output

\renewcommand{\familydefault}{\sfdefault}% Latin Modern's sans serif font family as default
% ---- end of relevant part

\usepackage[english]{babel}% needed for scrlttr2

\usepackage{lipsum}% just for dummy text

\begin{document}
\lipsum[1]
\end{document}

The font size doesn't really matter, but you could change it with an option to \documentclass.


Here's what's happening in moderncv.cls:

l. 53ff:

% font type options
\DeclareOption{sans}{\renewcommand{\familydefault}{\sfdefault}}
\DeclareOption{roman}{\renewcommand{\familydefault}{\rmdefault}}

l. 61f:

% execute default options
\ExecuteOptions{a4paper,11pt,sans,final}

l. 85ff:

% automatic loading of latin modern fonts if present on the system
\IfFileExists{lmodern.sty}
  {\RequirePackage[T1]{fontenc}\RequirePackage{lmodern}}
  {}
share|improve this answer
add comment

In moderncv class I found the standard font sans 11pt

You can use that with

\renewcommand{\familydefault}{\sfdefault}
\input{size11.clo}
share|improve this answer
add comment

Use the lmodern Font, which is the standard in moderncv (moderncv.cls, line 86)

\usepackage{lmodern}
share|improve this answer
1  
A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  doncherry Jun 26 '12 at 18:23
    
arg, that's what I wanted... seems I missed the button. –  Juri Robl Jun 26 '12 at 19:05
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.