The titlesec package or secsty might have the resources you need.
If it's a longer project, look at the memoir document class, which has more options, but will involve more work to conform to university guidelines.
Here's a very quick sectsty
version of what you want.
\usepackage{sectsty}
\sectionfont{%
\sectionrule{2ex}{1pt}{-1ex}{1pt}%
}
And to do roughly the same thing with titlesec
do the following:
\usepackage{titlesec}
\titleformat{\section}
{\titlerule%
\normalfont\bfseries\Large}
{\thesection}{1em}{}[\titlerule]
I think I prefer the titlesec version, because titlesec is a better overall package, in my opinion. If you want to change the thickness of the titlerules here, the second one breaks if you add an argument to it. So put \newcommand{\trule}{\titlerule[1pt]}
or whatever thickness you want between the \usepackage
and the \titleformat
commands. Then replace each \titlerule
with \trule
.
As for a memoir version? Work it out yourself! The memoir documentation is excellent.
In case you do not want the section number to the right of the section title in the table of contents (see BernS' answer), you could use the titlesec package to redefine the section header layout:
\documentclass{memoir}
\usepackage{lipsum}
\usepackage[explicit]{titlesec}
% \titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before>}[<after>]
\titleformat{\section}[hang]{\normalfont\Large\bfseries}%
{\thechapter.}{4pt}%
{#1 \arabic{section}.}
\begin{document}
\tableofcontents
\chapter{Chapter}
\section{Section one}
\lipsum[1]
\section{Section two}
\lipsum[2]
\section{Section three}
\lipsum[3]
\end{document}
Credits go to Raphink's answer to my question regarding a problem I had with reading documentation properly. Consider voting his answer up. ;-)
Best Answer
This redefines the
\section
command (usingxparse
facilities) and grabs the third argument (the section title), injects a font change command and restores the font afterwards. The ToC entry is still done in normal font (unless explicitly done in#2
or in the section title itself)The
kpfonts
use thejkp
basename for the font family, see the manual for the various options to use other names (and families).The font change is done within the command
\SectionHeadingFont
and can be altered there. I chose thebx
series, upright fontshape, but no additional scaling.In my opinion the section number font should be changed to the same as the heading font.
Within the section title and the document title, I made explicit changes back to normal settings, in order to show the difference.