0

I'm using scrlttr2 and koma script to write a letter. I have a header and I want to separate the header with something like a \hrule from the rest of the letter. I tried \setheadsepline{1pt} but it has no effect. What am I doing wrong?

Here's my MWE:

\documentclass[a4paper,SN]{scrlttr2}

\usepackage[english]{babel}
\usepackage{scrpage2} % for setheadsepline

\setkomavar{fromname}{It's me!}

\setheadsepline{1pt}[\color{grey}]

\begin{document}

\begin{letter}{%
    address
}

\opening{Hello}

some letter

\closing{Goodbye}

\end{letter}
\end{document}

and this is how the top of my letter looks like. After the header ("It's me!"), I'd like to have a separating line.

enter image description here

1 Answer 1

2

Loading scrpage2 in a scrlttr2 document is not useful because \opening sets the pagestyle to empty.

You can use the class option fromrule=below to get a line below of the header:

\documentclass[SN,fromrule=below]{scrlttr2}
\usepackage[english]{babel}

\usepackage{xcolor}
\addtokomafont{fromrule}{\color{purple}}% change the line color
\makeatletter
\@setplength{fromrulethickness}{1pt}% change the thickness, default is 0.4pt
\makeatother
\setkomavar{fromname}{It's me!}
\setkomavar{fromaddress}{My address}

\begin{document}

\begin{letter}{%
    address
}

\opening{Hello}

some letter

\closing{Goodbye}

\end{letter}
\end{document}

enter image description here

You must log in to answer this question.

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