1

The default sclttr2 behaviour is to format like so:

RIGHT_ALIGNED(from address)
LEFT_ALIGNED(to address)
RIGHT_ALIGNED(date)

I want to change that to:

RIGHT_ALIGNED(from address)
RIGHT_ALIGNED(date)
LEFT_ALIGNED(to address)

with sensible gaps between them. I am using

\documentclass[
fontsize=11pt,
paper=a4,
parskip=full,
enlargefirstpage=off,
fromalign=right,
fromphone=off,
fromrule=off,
addrfield=on,
backaddress=off,
foldmarks=no,
pagenumber=false,
refline=nodate,
]{scrlttr2}
\usepackage{lipsum}
\usepackage[british]{babel}
\usepackage{tabularx}
\usepackage{booktabs}
\LoadLetterOption{DIN}
\setkomavar{fromname}{NAME}
\setkomavar{fromaddress}{ADDRESS\\ADDRESS\\ADDRESS\\ADDRESS\\ADDRESS\\ADDRESS\\ADDRESS\\}
\setkomavar{location}{\usekomavar{date}}
\begin{document}
    \begin{letter}{address}
    \opening{}
        \begin{center}  
            \begin{tabular}{cccccc}
                \toprule
                Item & Unit Price & Quantity & Sub-Total & VAT \% & VAT\\
                \bottomrule
            \end{tabular}
        \end{center}
    \closing{}
    \end{letter}
\end{document}

Which successfully puts the date between the two addresses, but puts it extremely close to the bottom line of the from address (sometimes it superposes it onto the from address). It also doesn't fully right align the date, it is a couple of millimetres further from the right margin than the address above it is. My guess is that this has something to do with the overfull \vbox that XeLaTeX complains about:

Class scrlttr2 Warning: head of first page is 13.0448pt too high.
(scrlttr2)              You have to change `firstheadvpos'
(scrlttr2)              or you have to define a smaller
(scrlttr2)              head of first page using \setkomavar.
(scrlttr2)              Because of this too high head of first page
(scrlttr2)              you've got an overfull \vbox message on input line 30.

I guess the solution is, as it says, to \setkomavar, but I don't know what to set it to.

1

One possibility is

\setkomavar{location}{\par\bigskip\raggedleft\usekomavar{date}}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.