How to remove space between back address and address in scrlttr2?
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:
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:
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.
Since KOMA-Script Version 3.17 you can use:
\KOMAoptions{addrfield=topaligned}
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}
Update regarding the comments:
If there should be a bit more space below the backaddress
, you can use \setkomavar{specialmail}{\mbox{}}
as suggested by Rasmus in a comment below. Then the result would be
If this space should be enlarged, you can use \setkomavar{specialmail}{\strut}
. To change the size of the strut, change the settings of the font element specialmail
, eg: \addtokomafont{specialmail}{\Huge}
. Alternativly an invisible rule can be used,eg: \setkomavar{specialmail}{\rule{0pt}{5mm}}