1

I'm using LATEX for writting a letter with "lettre" documentclass and I have no idea how to change the font. I can change the font in all other class but not in the letter one.

I'm trying to set the "ClearSans" font.

\documentclass[11pt, a4paper]{lettre}
\usepackage[francais]{babel}
\usepackage[utf8]{inputenc}

\usepackage[sfdefault]{ClearSans}
\usepackage[T1]{fontenc}


\begin{document}
    \begin{letter}{An address}
        \address{Somebody}
        \opening{Dear Mr x}

        Some text. Some text.

    \end{letter}
\end{document}

Thanks!

mithicbeu
  • 13
  • 3

1 Answers1

2

Unfortunately the lettre class uses hard-coded, old-style font switching commands (\rm). You can make this more flexible using

\documentclass[11pt, a4paper]{lettre}
\usepackage[francais]{babel}
\usepackage[utf8]{inputenc}

\usepackage[sfdefault]{ClearSans}
\usepackage[T1]{fontenc}


% https://tex.stackexchange.com/a/291238/140850
\let\origletter=\letter
\def\letter#1{\origletter{#1}\normalfont}

\begin{document}
    \begin{letter}{An address}
        \address{Somebody}
        \opening{Dear Mr x}

         Some text. Some text.

    \end{letter}
\end{document}

Now the font you select as "default" is respected.

Ralf Stubner
  • 26,263
  • 3
  • 40
  • 75
  • Thank you so much! It's what I understood, the lettre class is not very flexible but your solution works! – mithicbeu Jul 01 '18 at 15:14