# Easily aligning 'from' and 'to' address fields in LaTeX letters

When you write a letter in LaTeX, you can add your address with the \address block, while you have the possibility of adding the recipient address after the \begin{letter} statement as an extra argument. However, in such case, your address will always come above the recipient address.

Is there a way to tell LaTeX that I want my address to begin in the same line as the recipient's address? Or, more generally, is there a way to control the distances of these fields from the top of the page in a more flexible way?

Bonus question: is there a way to tell LaTeX that I don't want to have an extra blank line between my address and the date of the letter? (Or, again, more generally: to fine-tune the distance between the sender's address and the date field?)

## migrated from stackoverflow.comNov 1 '11 at 1:13

This question came from our site for professional and enthusiast programmers.

• Which document class are you using? The scrlttr2 class (from the KOMA-script package) is quite flexible with lots of settings. – Paŭlo Ebermann Nov 1 '11 at 1:00
• Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. – Werner Nov 1 '11 at 5:13
• Hi, I had a look to the scrlttr2 class, but it seems too complicated to be used as a simple work-around if one doesn't know the KOMA-scripts. I need something that would work quite simple, as I need to send this letter as soon as I can. It would be nice to learn about this 'KOMA-script package', but maybe at some time when I have the time to read the documentation... Oh, and yes, I tried the simple way of replacing the letter class with scrltt2, but of course it didn't compile, so probably one really needs to know the docs before using that class... – Siska Ádám Nov 1 '11 at 11:48
• It is always best to compose a MWE that illustrates the problem including the \documentclass so that those trying to help don't have to recreate it. – Peter Grill Nov 1 '11 at 18:05

You can do this be redefining the \opening command to produce:

I also removed the blank line before that date. If you want to adjust this space before the date replace the value in \fromaddress\\[0.0em]:

\documentclass{letter}
\usepackage{lipsum}% for dummy text

\makeatletter
\thispagestyle{firstpage}%
{\raggedleft\@date\par}%
\thispagestyle{empty}%
{%
\begin{minipage}[c]{0.50\linewidth}
\toname \\
\end{minipage}
\begin{minipage}[c]{0.45\linewidth}
\raggedleft\begin{tabular}{l@{}}\ignorespaces
\fromaddress\\[0.0em]% replace 0.0em with space desired before date
\@date
\end{tabular}
\end{minipage}
\par
}%
\fi
\vspace{2\parskip}%
#1\par\nobreak}
\makeatother

\address{123 Main Street \\ Anytown \\ USA 90210}

\begin{document}
\begin{letter}{Siska Adam \\ 123 Some Street \\ TeXLand \\ IP3 5RT}

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


Alternatively, since you were under a deadline, you could just have manually done this:

\documentclass{letter}
\usepackage{lipsum}

\begin{document}
\begin{letter}{}
\begin{tabular}{@{}p{3.0in}l}
123 Some Street   & 123 Main Street\\
TeXLand           & Anytown, USA 90210\\
IP3 5RT           & \today
\end{tabular}

\bigskip

• Thank you. This will help until I get my time to learn KOMA. And +1 point for letting me know about the lipsum package, which is FUN. :-) – Siska Ádám Nov 2 '11 at 7:11