3

I am using scrlttr2 and want to reduce the amount of whitespace between the header and the content of the letter (see picture)

enter image description here

Here is the corresponding code:

\documentclass[fontsize=12pt,
   paper=a4,
   enlargefirstpage=on,
   pagenumber=headright,
   headsepline=off,
   parskip=half,     
   fromphone=on,
   fromrule=off,
   fromfax=off,
   fromemail=on,
   fromurl=off,
   fromlogo=off,
   addrfield=on,
   backaddress=off,
   subject=beforeopening,
   locfield=narrow,
   foldmarks=off,
   numericaldate=off,
   refline=narrow]{scrlttr2}
%---------------------------------------------------------------------------
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[utf8]{inputenc}
%---------------------------------------------------------------------------
\usepackage{lmodern}
\usepackage{color}
\usepackage{marvosym} 
\usepackage{ifthen}

\definecolor{firstnamecolor}{rgb}{0.65,0.65,0.65}
\definecolor{familynamecolor}{rgb}{0.45,0.45,0.45}
\definecolor{footersymbolcolor}{rgb}{0.20,0.40,0.65}
\definecolor{addresscolor}{rgb}{0.35,0.35,0.35} %grau

\newcommand*{\addressfont}{\small\sffamily\mdseries\slshape}
\newcommand{\footersymbol}{~~\color{footersymbolcolor}\normalfont\textbullet\color{addresscolor}\addressfont~~~}
%---------------------------------------------------------------------------
\setkomafont{fromname}{\sffamily \LARGE}
\setkomafont{fromaddress}{\sffamily}%%    Instead of \small
\setkomafont{pagenumber}{\sffamily}
\setkomafont{subject}{\mdseries}
\setkomafont{backaddress}{\mdseries}
\usepackage{mathptmx}
%---------------------------------------------------------------------------
\begin{document}
%---------------------------------------------------------------------------
\LoadLetterOption{KOMAold} 
\makeatletter
\@setplength{sigbeforevskip}{50pt} 
\@setplength{firstfootvpos}{300mm} page
\@setplength{firstheadvpos}{10mm}
\@setplength{firstheadwidth}{\paperwidth}
\ifdim \useplength{toaddrhpos}>\z@
  \@addtoplength[-2]{firstheadwidth}{\useplength{toaddrhpos}}
\else
  \@addtoplength[2]{firstheadwidth}{\useplength{toaddrhpos}}
\fi
\@setplength{foldmarkhpos}{6.5mm}
%\@setplength{refvpos}{\useplength{toaddrvpos}}
\makeatother
%---------------------------------------------------------------------------
% Sender information
\newcommand{\myFirstname}{John}
\newcommand{\myFamilyname}{Odd}
\newcommand{\myStreet}{Street}
\newcommand{\myTown}{NY}
\newcommand{\myZipcode}{11233}
\newcommand{\myPhone}{+123 456 4879}
\newcommand{\myMail}{[email protected]}
\setkomavar{signature}{\myFirstname\ \myFamilyname}
%---------------------------------------------------------------------------
\firsthead{
  \begin{flushright}
    \renewcommand{\baselinestretch}{0.8}
    \sffamily\mdseries\Large\color{firstnamecolor}\myFirstname\ \color{familynamecolor}\myFamilyname\\
    \parbox{\textwidth}{\color{footersymbolcolor}\rule{\textwidth}{2pt}}
    \normalfont\small\color{black} \myStreet \\ \myZipcode, \myTown \\ \myMail \\\myPhone
  \end{flushright}
}
%---------------------------------------------------------------------------
\setkomavar{place}{\myTown}
\setkomavar{date}{\today}
%---------------------------------------------------------------------------

\setkomavar{enclseparator}{: }
%---------------------------------------------------------------------------

\pagestyle{myheadings}%% No header

\begin{letter}{International Company Coorporation\\
Mrs. Jane Doe\\
Some street 11 \\
SF, 54321}
%---------------------------------------------------------------------------
% Further options
\KOMAoptions{}
%---------------------------------------------------------------------------
\setkomavar{subject}{subject}
%---------------------------------------------------------------------------
\opening{Dear,}
text

\closing{KR}
\encl{enclosed}
\end{letter}
\end{document}

I am thankful for any hints.

1

1 Answer 1

4

If you want to change the vertical position of the address field change the pseudolength toaddrvpos using either \@setplength or \@addtoplength. Additionally you may want to change the pseudolength refvpos to move the refline and the contents of the letter up.

Maybe you want to use the values from DINmtext.lco:

\@setplength{toaddrvpos}{27mm}
\@setplength{refvpos}{80.5mm}

Note that you will then get a warning because of your head is too high for the settings.

Additional remarks:

Do not load a package twice with different options. In the example I will use \usepackage[utf8]{inputenc} and remove the other line.

I will remove the word "page" after \@setplength{firstfootvpos}{300mm}.

Replace the deprecated command \firsthead{...} by \setkomavar{firsthead}{...}.

\documentclass[fontsize=12pt,
   paper=a4,
   enlargefirstpage=on,
   pagenumber=headright,
   headsepline=off,
   parskip=half,
   fromphone=on,
   fromrule=off,
   fromfax=off,
   fromemail=on,
   fromurl=off,
   fromlogo=off,
   addrfield=on,
   backaddress=off,
   subject=beforeopening,
   locfield=narrow,
   foldmarks=off,
   numericaldate=off,
   refline=narrow]{scrlttr2}
%---------------------------------------------------------------------------
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
%---------------------------------------------------------------------------
\usepackage{lmodern}
\usepackage{color}
\usepackage{marvosym} 
\usepackage{ifthen}

\definecolor{firstnamecolor}{rgb}{0.65,0.65,0.65}
\definecolor{familynamecolor}{rgb}{0.45,0.45,0.45}
\definecolor{footersymbolcolor}{rgb}{0.20,0.40,0.65}
\definecolor{addresscolor}{rgb}{0.35,0.35,0.35} %grau

\newcommand*{\addressfont}{\small\sffamily\mdseries\slshape}
\newcommand{\footersymbol}{~~\color{footersymbolcolor}\normalfont\textbullet\color{addresscolor}\addressfont~~~}
%---------------------------------------------------------------------------
\setkomafont{fromname}{\sffamily \LARGE}
\setkomafont{fromaddress}{\sffamily}%%    Instead of \small
\setkomafont{pagenumber}{\sffamily}
\setkomafont{subject}{\mdseries}
\setkomafont{backaddress}{\mdseries}
\usepackage{mathptmx}
%---------------------------------------------------------------------------
\begin{document}
%---------------------------------------------------------------------------
\LoadLetterOptions{KOMAold}
\makeatletter
\@setplength{toaddrvpos}{27mm}% <- added
\@setplength{refvpos}{80.5mm}% <- added
\@setplength{sigbeforevskip}{50pt} 
\@setplength{firstfootvpos}{300mm}
\@setplength{firstheadvpos}{10mm}
\@setplength{firstheadwidth}{\paperwidth}
\ifdim \useplength{toaddrhpos}>\z@
  \@addtoplength[-2]{firstheadwidth}{\useplength{toaddrhpos}}
\else
  \@addtoplength[2]{firstheadwidth}{\useplength{toaddrhpos}}
\fi
\@setplength{foldmarkhpos}{6.5mm}
%\@setplength{refvpos}{\useplength{toaddrvpos}}
\makeatother
%---------------------------------------------------------------------------
% Sender information
\newcommand{\myFirstname}{John}
\newcommand{\myFamilyname}{Odd}
\newcommand{\myStreet}{Street}
\newcommand{\myTown}{NY}
\newcommand{\myZipcode}{11233}
\newcommand{\myPhone}{+123 456 4879}
\newcommand{\myMail}{[email protected]}
\setkomavar{signature}{\myFirstname\ \myFamilyname}
%---------------------------------------------------------------------------
\setkomavar{firsthead}{% <- changed
  \begin{flushright}
    \renewcommand{\baselinestretch}{0.8}
    \sffamily\mdseries\Large\color{firstnamecolor}\myFirstname\ \color{familynamecolor}\myFamilyname\\
    \parbox{\textwidth}{\color{footersymbolcolor}\rule{\textwidth}{2pt}}
    \normalfont\small\color{black} \myStreet \\ \myZipcode, \myTown \\ \myMail \\\myPhone
  \end{flushright}
}
%---------------------------------------------------------------------------
\setkomavar{place}{\myTown}
\setkomavar{date}{\today}
%---------------------------------------------------------------------------

\setkomavar{enclseparator}{: }
%---------------------------------------------------------------------------

\pagestyle{myheadings}%% No header

\begin{letter}{International Company Coorporation\\
Mrs. Jane Doe\\
Some street 11 \\
SF, 54321}
%---------------------------------------------------------------------------
% Further options
\KOMAoptions{}
%---------------------------------------------------------------------------
\setkomavar{subject}{subject}
%---------------------------------------------------------------------------
\opening{Dear,}
text

\closing{KR}
\encl{enclosed}
\end{letter}
\end{document}

enter image description here

Not the answer you're looking for? Browse other questions tagged .