Take the 2-minute tour ×
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.

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
2  
For once, it would be useful to use more descriptive names than "foo"... –  Jubobs Apr 20 '13 at 17:51
    
ok, hopefully now it is more clear... –  user4811 Apr 20 '13 at 19:51

1 Answer 1

up vote 12 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

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.