I have the following code:
\documentclass{article}
\makeatletter
\renewcommand\ps@headings{
\def\@evenhead{foo bar}
\def\@oddhead{foo bar}
}
\makeatother
\begin{document}
\pagestyle{headings}
\section{Introduction}
foo bar baz
\end{document}
(This is just an example. The real document is a bit more complicated...)
How can I have a rule below the »foo bar« header?
I'd like to get something like this:

That is: a rule size \hsize. I don't want to use fancyhdr.
Edit: More requirements: I need to configure the rule thickness and the distance between the words »foo ... bar« and the horizontal rule.


titleps(a sibling oftitlesec)? – Bernard Mar 27 '15 at 13:46