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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is a blank line between the back address and the address? How can I remove it?

\documentclass{scrlttr2} 
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ngerman,    ae}
\usepackage[babel,german=quotes]{csquotes} % Deutsche Gänsefüßchen

\KOMAoptions{backaddress=true} 

\setkomavar{fromname}{<Name back address>}      
\setkomavar{fromaddress}{<street back address>\\ <town back address>}

\begin{document}
 \begin{letter}{name\\ street\\ town}       
  \opening{Hello}
  some text
  \end{letter}
\end{document}
share|improve this question
up vote 14 down vote accepted

The document class scrlttr2 doesn't use normal length adjusting there contents. Instead it uses pseudolengths. The most important length are described in scrguien or the German version scrguide. Both documentations have a great picture which are showing the pseudolengths. To explain my solution here the picture:

enter image description here

In your case you must change the height toaddrheight because the complete return address and adress are putted in one vertical box with the specific height. The distance is done be \vfil. So to reduce the distance between return address and adress you must reduce the pseudolength toaddrheight. Related to the documentation this is done by:

\makeatletter
\setlength{\@tempskipa}{-2cm}%
\@addtoplength{toaddrheight}{\@tempskipa}
\makeatother

If I add this lines to your example I get the following result:

enter image description here

Here the example:

\documentclass[ngerman]{scrlttr2} 
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
%\usepackage{ngerman,    ae}%veraltet
\usepackage[babel,german=quotes]{csquotes} % Deutsche Gänsefüßchen

\KOMAoptions{backaddress=true} 

\setkomavar{fromname}{<Name back address>}      
\setkomavar{fromaddress}{<street back address>\\ <town back address>}
\makeatletter
\setlength{\@tempskipa}{-2cm}%
\@addtoplength{toaddrheight}{\@tempskipa}
\makeatother
\begin{document}
 \begin{letter}{name\\ street\\ town}       
  \opening{Hello}
  some text
  \end{letter}
\end{document}

Note The packages ngerman and ae are obsolete. Use babel with the specific language ngerman.

The difficult setting of such lengths are basing on the simple statement: Normally a user doesn't need to change any length.

share|improve this answer
    
Thanks! This is exactly what I needed... – user4811 Apr 21 '13 at 10:54

Since KOMA-Script Version 3.17 you can use:

\KOMAoptions{addrfield=topaligned}

enter image description here

Code:

\documentclass{scrlttr2}
\KOMAoptions{addrfield=topaligned}

\setkomavar{fromname}{Name back address}      
\setkomavar{fromaddress}{street back address\\ town back address}
\begin{document}
 \begin{letter}{name\\ street\\ town}       
  \opening{Hello}
  some text
  \end{letter}
\end{document}
share|improve this answer

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.