1

I simply want to move the date of a letter to the upper left corner of the page.


Minimum Working Example (MWE):

\documentclass[english]{scrlttr2}

\usepackage{babel}

\newkomavar{fromplace}
\setkomavar{fromname}{Alice Alison}
\setkomavar{fromaddress}{Fairytail-Lane 1}
\setkomavar{fromplace}{12345 Cologne}

\setkomavar{firsthead}{%
    \parbox{\textwidth}{%
        \raggedleft
        {\usekomafont{fromname}\strut\ignorespaces{\usekomavar{fromname}\\\usekomavar{fromaddress}\\\usekomavar{fromplace}}}\\
    }
}

% \KOMAoptions{refline=dateleft} <--- To move the date to the left edge

\begin{document}

    \begin{letter}{Bob Bobson\\40 Michigan Street\\US-1234 Oklahoma}

        \opening{Hello Bob,}

        \closing{Best wishes}

    \end{letter}

\end{document}

Screenshot of the result:

Screenshot of the result


Description of the issue:

I want to move the date to the upper left corner of the page. How to do so?

Screenshot of the desired state


Solution approach:

With \KOMAoptions{refline=dateleft} I can perfectly align the date to the left edge, but how can I move it up to the top? Something like \vspace{2\baselineskip} does not work, because it just increases the vertical distance to the main text body (while moving the text downwards).

In best case, the date should be in the same vertical position like the fromname in firsthead (Alice Alison).

1 Answer 1

1

You can set the date as part of the firsthead block, by adding it in front of the name, i.e., \today\usekomavar{fromname}. In order to align the date to the left of the page and the name right you can put \hfill (horizontal fill) in between.

Then you need to switch off the normal date, using refline=nodate.

If you think the space between the addressee and the opening is too big you can cheat a bit by putting negative space at the end of the address.

MWE:

\documentclass[english]{scrlttr2}

\usepackage{babel}

\newkomavar{fromplace}
\setkomavar{fromname}{Alice Alison}
\setkomavar{fromaddress}{Fairytail-Lane 1}
\setkomavar{fromplace}{12345 Cologne}
\KOMAoptions{refline=nodate}

\setkomavar{firsthead}{%
    \parbox{\textwidth}{%
        \raggedleft
        {\usekomafont{fromname}\strut\ignorespaces{\today\hfill\usekomavar{fromname}\\\usekomavar{fromaddress}\\\usekomavar{fromplace}}}\\
    }
}

\begin{document}

    \begin{letter}{Bob Bobson\\40 Michigan Street\\US-1234 Oklahoma\vspace{-2cm}}
          \opening{Hello Bob,}

        \closing{Best wishes}

    \end{letter}

\end{document}

Result:

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.