So I want to have one line above and one under the title of a chapter in scrreprt
, like:
_________________________________________________
1. Introduction
_________________________________________________
But with the same space between the lines and the title.
So this is what I've tried with the package titlesec
:
\titleformat{\section}[display]
{}
{}
{}
{\titlerule
\vspace{0.2pc}%
\thesection\bfseries\hspace{5pt}\filright}
[\vspace{0.1pc}%
\titlerule]
But it's still not working fine, e.g. at the begining of one chapter on a new page there is a lot of space between the top margin and the chapter name and I only get the number of the chapter in a good position with \hspace{5pt}
.
Between: Is there any chance to have the same code for srreprt
and scrbook
? (after replacing \section
by \chapter
etc.)
Anybody could help me?