How to underline section-headings in LaTeX?

前端 未结 5 862
忘了有多久
忘了有多久 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:25

    I've heard that the titlesec is more powerful than sectsty package, so I've just used it. You can put the horizontal line before the section header using:

    \usepackage{titlesec}
    \titleformat{\section}{\large\bfseries}{\thesection}{1em}{\hrule}
    

    or you can put it after, with the help of newcommand. See section 4.4 of the titlesec manual.

提交回复
热议问题