0

I'm writing a letter in LaTeX and, sadly, the institution of my receiver is a bit too long to stay on the same line. I would like to enlarge the receiver "block"/reduce the horizontal space between the sender and the receiver.

Typically, in this code, how to keep Long institution with multiple names that-are-too-long on the same line ? (ok, the real institution is a bit smaller) Is it possible to shift/enlarge the receiver block a bit more at left ?

\documentclass[11pt]{lettre}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{eurosym}
\usepackage[frenchb]{babel}
\usepackage{numprint}

\makeatletter
\newcommand*{\NoRule}{\renewcommand*{\rule@length}{0}}
\makeatother

\begin{document}

\begin{letter}{Mr John Smith\\ Long institution with multiple names that-are-too-long}
\name{Me and Myself}
\address{Me and Myself as an example\\New comer into the institution\\University of Awesomeness\\Research Lab of Scientific Things}
\lieu{Somewhere}
\notelephone
\nofax

\NoRule

\def\concname{Objet :~} % On définit ici la commande 'objet'
\conc{\textbf{A nice object}}
\opening{Mr John Smith,}

Bla.

\closing{See you later,}

\end{letter}

\end{document}

Thank you :)

2 Answers 2

1

I don't know whether this is a good idea, since in a letter this field has to fit the address field of the envelope.

A hacky way to do it would be the following approach: Don't enlarge the space, but put everything in a tabular environment and tell LaTeX this environment was of the width \linewidth using \makebox:

\documentclass[11pt]{lettre}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{eurosym}
\usepackage[frenchb]{babel}
\usepackage{numprint}

\makeatletter
\newcommand*{\NoRule}{\renewcommand*{\rule@length}{0}}
\makeatother

\begin{document}

\begin{letter}{%
    \makebox[\linewidth][r]{\begin{tabular}[]{@{}l@{}}%
    Mr John Smith\\ Long institution with multiple names that-are-too-long%
  \end{tabular}}}
\name{Me and Myself}
\address{Me and Myself as an example\\New comer into the institution\\University of Awesomeness\\Research Lab of Scientific Things}
\lieu{Somewhere}
\notelephone
\nofax

\NoRule

\def\concname{Objet :~} % On définit ici la commande 'objet'
\conc{\textbf{A nice object}}
\opening{Mr John Smith,}

Bla.

\closing{See you later,}

\end{letter}

\end{document}

enter image description here

1
  • It's working ! Thank you very much ! :) (the simpliest hacks are sometimes the best)
    – Metalman
    Commented Sep 13, 2017 at 11:35
0

You can make the code shorter with this:

\documentclass[11pt]{lettre}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{eurosym}
\usepackage[french]{babel}
\usepackage{numprint}
\usepackage{xpatch}
\makeatletter
\newcommand*{\NoRule}{\renewcommand*{\rule@length}{0}}
\makeatother

\begin{document}

\begin{letter}{Mr John Smith\\\makebox[80mm]{\fbox{Long institution with multiple names that-are-too-long}}}
\name{Me and Myself}
\address{Me and Myself as an example\\New comer into the institution\\University of Awesomeness\\Research Lab of Scientific Things}
\lieu{Somewhere}
\notelephone
\nofax

\NoRule

\def\concname{Objet :~} % On définit ici la commande 'objet'
\conc{\textbf{A nice object}}
\opening{Mr John Smith,}

Bla.

\closing{See you later,}

\end{letter}

\end{document} 

enter image description here

The other way would consist in modifying the default values of

\def\fromlieu@let@hpos{90}%
\def\toaddress@let@hpos{90}%
\toaddress@let@width=80mm

to change the insertion point and the width of the right-hand side part of the header. These values are to be found in letter-default.cfg.

If you do not want to modify the default values, you can write these lines in a file letter-foo.cfg, which can also contain your own name, address,location, telephone, &c. and call this file with the command \institut{letter-foo} in your preamble.

You must log in to answer this question.

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