How to underline section-headings in LaTeX?

前端 未结 5 840
忘了有多久
忘了有多久 2021-02-08 07:41

EDIT: 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.

<
5条回答
  •  遥遥无期
    2021-02-08 08:16

    Rewriting your command like this should do the trick:

    \newcommand{\tmpsection}[1]{}
    \let\tmpsection=\section
    \renewcommand{\section}[1]{\tmpsection{\underline{#1}}}
    

    This will evaluate to

    \section { \underline {#1} }
    

    which in turn produces underlined section headings :)

提交回复
热议问题