[Tex/LaTex] Reducing the huge space before the first line of the KOMA letter class

koma-scriptlettersscrlttr2spacing

How can i reduce the vertical space to the start of the letter?

\documentclass[fontsize=12pt,firstfoot=false]{scrlttr2} 

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{%
    ngerman,
    ae,
    times,  %% hier kann man die Schriftart einstellen
    graphicx,
    url}

\KOMAoptions{paper=a4,
fromalign=center,
fromrule=aftername,
backaddress=true,
parskip=half,
enlargefirstpage=true} 

\setkomavar{fromname}{need less space to the very top at the page}      

\let\raggedsignature=\raggedright       

\firsthead{
}

\begin{document}

 \begin{letter}{
    Adress
    }       
 \begin{small}

\opening{opening}

Stuff

\closing{Kind regards}
\end{small}

\end{letter}

\end{document}

Best Answer

The scrlttr2 class loads the file DIN.lco as default. This file contains a parameter set for A4 paper and German window envelopes C4, C5, C6 and C6 long.

But there is another Letter Class Option file that reduces the space above the address: DINmtext.lco. Note that such a letter will not fit a C4 or C5 window envelope.

To load the Letter Class Option file DINmtext.lco use DINmtext as an option for the scrlttr2 class or insert \LoadLetterOption{DINmtext} in your preamble.

\documentclass[
  paper=a4,
  fontsize=12pt,
  firstfoot=false,
]{scrlttr2} 

\LoadLetterOption{DINmtext}% <- loads DINmtext.lco

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}% <- instead package ngerman
\usepackage{%
    times,
    graphicx,
    url}

\KOMAoptions{
  fromalign=center,
  fromrule=aftername,
  backaddress=true,
  parskip=half,
  enlargefirstpage=true,
} 

\setkomavar{fromname}{need less space to the very top at the page}      

\renewcommand*{\raggedsignature}{\raggedright}% <-redefining \raggedsignature    

\setkomavar{firsthead}{ % <- the command \firsthead is outdated, use \setkomavar{firsthead}{...} instead
}

\begin{document}
\begin{letter}{
      Adress
      }       
  \small% <- it is a switch but not an environment
  \opening{opening}
  Stuff
  \closing{Kind regards}
\end{letter}
\end{document}

enter image description here


But may be you want to top align the address in the address field. Then add addrfield=topaligned to your KOMA Option list:

\KOMAoptions{
  fromalign=center,
  fromrule=aftername,
  backaddress=true,
  parskip=half,
  enlargefirstpage=true,
  addrfield=topaligned %< added
} 

enter image description here

Related Question