title: How to underline section-headings in LaTeX?
body: <p><strong>EDIT</strong>: As I see in the first answer, underline is the wrong word. I want a line under the section heading, separating the heading from the following text.</p>
  
  <p>I want to separate section headings from the following text with a horizontal line. At the moment I use the following:</p>
  
  <pre><code>\newcommand{\tmpsection}[1]{}
  \let\tmpsection=\section
  \renewcommand{\section}[1]{\tmpsection{#1}\hrule\nobreak}
  </code></pre>
  
  <p>But that produces a line, that is too far away from the section-heading and to near to the following text. Has anyone a better idea?</p>