How to underline section-headings in LaTeX?

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

    You might take a look at the LaTeX \rule command:

    \rule[raise-height]{width}{thickness}
    

    However, that's an inline (horizontal) command, so you'll have to use some trickery to get it at the right position and size (\noindent and \textwidth should help a little).

    Otherwise, you can use the following plain TeX

    \smallskip
    \hrule height 2pt
    \smallskip
    

    It doesn't really fit in the LaTeX syntax, but it works like a charm, and is guaranteed to span the entire text width.

提交回复
热议问题