4

Using the lettre document class, I want to place the enclosures automatically at the bottom of the page, like this :

image

This is the default behavior :

image

This is the code I used to get the first picture (with the enclosures at the bottom) :

\documentclass[romand]{lettre}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[francais]{babel}

\name{Mister Z}


\begin{document}

\begin{letter}{Company X\\
Mister Y\\
Address\\
Town}

\conc{Business contract}

\opening{Dear Sir,}

Lorem ipsum dolor sit amet, % and so on..

\closing{Kind regards,}
\vspace{60mm} % This is what I want to be automatic (adaptative)
\encl{Contract}

\end{letter}

\end{document}

I'd like to replace \vspace{60mm} by something which would automatically take all free space like \vfill. But \vfill does not do what I want here, I think this is because the letter is written inside the letter environment, which probably does not take the whole page. I tried to find a solution by looking at the lettre.cls file, but with no success.

1
  • Welcome to TeX.SX. A tip: If you indent lines by 4 spaces, then they're marked as a code sample. You can also highlight the code and click the "code" button ({}). Oct 17, 2012 at 9:33

1 Answer 1

2

Your strategy is correct, but the lettre class does a couple of tricky/not nice things. The class adds \stopletter (defined as \vskip0ptplus1filll) at the end of the letter. That is a filll with 3 l's which swamps all the other stretchable glue. If you replace \vspace{60mm} with \vskip0ptplus1filll then you enclosure will be halfway to the bottom of the page since you add some 3-l stretch instead of the 2-l stretch of \vfill. If you also redefine \stopletter to not add space, then the enclosure will be at the bottom of the page. Putting it all together gives

\documentclass[romand]{lettre}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[francais]{babel}

\name{Mister Z}


\def\stopletter{}%

\begin{document}

\begin{letter}{Company X\\
Mister Y\\
Address\\
Town}

\conc{Business contract}

\opening{Dear Sir,}

Lorem ipsum dolor sit amet, % and so on..

\closing{Kind regards,}
\vskip0ptplus1filll
\encl{Contract}

\end{letter}

\end{document}
1
  • In order to not having to add this in each letter, I added these 3 lines in my "institute" (.ins) file (the one called by \institute{}) : \def\stopletter{} \let\enclold\encl \renewcommand\encl[1]{\vskip0ptplus1filll\enclold{#1}}
    – Ben
    Oct 18, 2012 at 6:48

You must log in to answer this question.

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