[Tex/LaTex] How to make scrlttr2 look like letter

lettersscrlttr2

I need to put a subject line in a letter so after looking around most suggestions seem to point towards using the document class scrlttr2 instead of letter since it is much more flexible.

However, the look of the letter when I change to scrlttr2 becomes totally messed up from the simple letter format I prefer. More specifically:

  1. The from address is moved to the top left instead of the right over the date.
  2. OMR markers introduced on the left of the page.
  3. A separate underlined from address added on the top with a different font.
  4. The indentation and paragraphing is really ugly. It indents new paragraphs instead of putting whitespace. (While this is OK for a normal document, its totally ugly for a letter)
  5. While the normal letter style allowed me to leave the address of the recipient empty like this \begin{letter}{}, I am forced to put something in scrlttr2 even if I don't want to put anything. (If I leave it empty or just put a space it gives a very cryptic error Line 0: There's no line end here even if its not on line 0.)

Is there anyway I can make it look like the letterstyle? I am just going through this to add a subject line, so if there's a simpler way it would be equally good.

UPDATE

The output from scrlttr2 when I use \KOMAoptions{foldmarks=off,backaddress=false,fromalign=right} is now as follows:

enter image description here

This is because it is inserted in the page header rather than the page content.
I need it to look at least as it is generated by letter as follows:

enter image description here

The best thing would be if it is also right aligned, but if I manage to get it like letter it should be enough.

Best Answer

Is there anyway I can make it look like the letterstyle? I am just going through this to add a subject line, so if there's a simpler way it would be equally good.

It sounds like what you really want is to be able to add a subject line to the standard letter class, and that you really do not want to use scrlttr2. If that is the case you can just modify the letter class \opening macro. I use the etoolbox \patchcmd, but I am sure there are other ways. The key part is

\makeatletter
  \newcommand{\subject}[1]{\def\@subject{#1}}
  \patchcmd{\opening}{#1\par\nobreak}{\ifundef{\@subject}{}{\textbf{\@subject}\par\vspace{2\parskip}}#1\par\nobreak}{}{}
\makeatother

You would then specify the subject with \subject, just like you specify \name. A full MWE is

\documentclass{letter}

\usepackage{etoolbox}
\makeatletter
\newcommand{\subject}[1]{\def\@subject{#1}}
\patchcmd{\opening}{#1\par\nobreak}{\ifundef{\@subject}{}{\@subject\par\vspace{2\parskip}}#1\par\nobreak}{}{}
\makeatother

\name{My name}
\signature{My signature}
\address{My road\\My city}
\location{My location}
\telephone{my telephone}

\subject{My subject}

\begin{document}
\begin{letter}{To name\\To road\\To city}
  \opening{Dear \toname}
  Hello World
\end{letter}
\end{document}