6

I would like to left justify the date in the KOMA-Script scrlttr2 class so that it aligns with the left margin of the body. I have no other data in the refline. This question helped me to get my present workaround, which is as follows:

Shrink the width of the refline field:

\@setplength{refwidth}{2.5cm}

Manually position the refline field:

\@setplength{refhpos}{2.27cm}

While this can produce the output I want, when the width of the date changes, such as at the start of the month (think July->August), I have to manually edit the variables to get the proper alignment.

Is there a more elegant way within KOMA-Script to left justify the date? If there is not a built-in method: Is there a way to automate the calculation of the widths or lengths when I compile so that justification remains constant regardless of the length of date?

2 Answers 2

5

This is kind of a hack, and may be somewhat stupid, but it seemed to work fine with my simple test:

\setkomavar{date}{\flushleft\vspace{-\baselineskip}\today\par}
1
  • This does indeed seem to do the trick and certainly beats my manual workaround. Apr 6, 2012 at 16:39
11

Another way to do this (maybe this option wasn't present before) is by setting the refline=dateleft option, either as a documentclass option, or in the preamble like this:

\KOMAoptions{refline=dateleft}

This aligns both the city and the date to the left.

1

You must log in to answer this question.

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