TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am customizing the section module following the tutorial here http://blog.scribtex.com/how-to-write-a-latex-class-file-and-design-yo

How do I make the

  [\titlerule]                 % Inserts a horizontal line after the heading


share|improve this question
up vote 8 down vote accepted

Use the optional argument of \titlerule to specify the rule height. Note that you'll have to wrap \titlerule[<height>] into braces if you're using it in the optional argument of \titleformat.







enter image description here

share|improve this answer

Just use something like \titlerule[.8pt]. The default is .4pt.

share|improve this answer
And for the width? Because default is \textwidth... – FormlessCloud May 3 '13 at 20:11
@FormlessCloud I'm sorry. No idea why I didn't see your comment at the time. Well, you could always somehow change the \textwidth, with a minipage or something. But for rules that have height and width, there is actually the \rule command: en.wikibooks.org/wiki/LaTeX/Rules_and_Struts – Christian Jan 5 '14 at 0:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.