# KOMA Script scrlttr2 toaddress lines are near

I can't find the variable to set the distance between two lines in the toadress field. In my letter the lines are clearly closer to each other than in the rest of the letter.

Here is a minimal example:

\setkomavar{toname}{%
Somebody in toname
}
Code-Townname
}

Can you see the difference between the normal distance between toname and toaddress and the second line of toaddress called Code-Townname?

you are right. I tested your file and it looks quite nice althrough i had a slight feeling (but didn't realy see it) that its a bit the same. So i played arround and found out that its a combination of fontsize > 11 and the \large variable i use in the toaddress box.

have a look to this file:

% compile with lualatex
\documentclass[%
fontsize=12pt, % <-----Increase this value to see it more clearly
paper=a4,
parskip=full,
enlargefirstpage=off,
fromalign=right,
fromphone=off,
fromrule=off,
foldmarks=no,
pagenumber=false,
refline=nodate,
]{scrlttr2}

\usepackage{lipsum}
\usepackage[british]{babel}

\addtokomafont{toname}{\large}    % <----- i added this two lines to get a larger to

\setkomavar{fromname}{John Doe}
\setkomavar{location}{\usekomavar{date}}
\setkomavar{toname}{SOMEBODY in toname}

\begin{document}

\begin{letter}{}
\opening{TesT opening,}
\lipsum
\closing{mfg}
\end{letter}
\end{document}

I can decrease my fontsize to 11pt to solve it but i wold like to know if there is a value to seperate the two lines in \addtokomafont{toaddress} a bit...

• Can you provide a minimal working example that shows the problem? – Johannes_B Dec 20 '16 at 15:57
• The example needs to be compilable for us to reproduce the screenshot on our machine. It is possible that you have changed the font, that something in KOMA-script is broken or that something was broken in the past. – Johannes_B Dec 20 '16 at 17:38
• Maybe there is some space added between name and address by the class, not sure, no time to look at it right now. – Johannes_B Dec 20 '16 at 17:38

Update

I have reported the bug to Markus Kohm, so it is already fixed in the current prerelease (v3.22.2564) of KOMA-Script. You can install this version from the KOMA-Script website.

\documentclass[
fontsize=14pt,
DIV=calc
]{scrlttr2}[2016/01/21]% needs version 3.22.2564 or newer
\usepackage{lipsum}

\setkomavar{toname}{SOMEBODY in toname}

\begin{document}
\begin{letter}{}
\opening{Hey}
\end{letter}
\end{document}

If the font of toname and toaddress should be set/changed in the same way, use the font element addressee instead:

\documentclass[
fontsize=14pt,
DIV=calc
]{scrlttr2}
\usepackage{lipsum}

%\addtokomafont{toname}{\large}    % <----- i added this two lines to get a larger to

\setkomavar{toname}{SOMEBODY in toname}

\begin{document}
\begin{letter}{}
\opening{Hey}
\end{letter}
\end{document}

Nevertheless the font elements toname and toaddress do not work as expected. As you can see in the follwing example, changing only the font element toname affects the element toaddress in the address field too:

\documentclass[
fontsize=14pt,
DIV=calc
]{scrlttr2}
\usepackage{lipsum}

\setkomavar{toname}{SOMEBODY in toname}

\begin{document}
\begin{letter}{}
\opening{Hey}
\end{letter}
\end{document}

Result:

As a workaround for versions older than 3.22.2564 you can patch command \@addrfield to solve both problems:

\documentclass[
fontsize=14pt,
DIV=calc
]{scrlttr2}
\usepackage{lipsum}

\setkomavar{toname}{SOMEBODY in toname}

\usepackage{xpatch}
{\usekomafont{toname}{\usekomavar{toname}\\}}
{{\usekomafont{toname}{\usekomavar{toname}\\}}}
{}{\PatchFailed}
{}{\PatchFailed}
\begin{document}
\begin{letter}{}
\opening{Hey}
\end{letter}
\end{document}

Result: