Horizontal rule under section titles

In textbooks, sections are often emphasized in by an horizontal rule below the the section title. Here’s how to do that in LaTeX, using the sectsty package. When using this package, new command become available and one of them is \sectionfont. The name of this command is somewhat misleading, since it’s not just the font that can be changed with this command. For an example, click here to see the ‘Report-1′ template I posted in the Templates section.

Sectionfont

I might post an in-depth article about the fonts that can be used in LaTeX (not XeTeX, where any font is available) later on, but that is not what we’re focussing on here. We want a horizontal rule underneath the section title!
To do this, we use the following command:

\sectionrule{top}{top thickness}{bottom}{bottom thickness}

The first to arguments correspond to a horizontal rule above the section title and the last two correspond to a bottom rule. The top and bottom arguments determine by what value the top and bottom rules are shifted up. When a negative value is entered, the rule shifts down. The thickness arguments speak for themselves: how thick the rules will be.

How to use the \sectionrule command? It needs to be implemented inside the \sectionfont command. In a document, you should define it like this:

\usepackage{sectsty}
\sectionfont{
	\sectionrule{0pt}{0pt}{-5pt}{0.8pt}
	}

In this example, no upper rule is created and the 0.8pt thick bottom rule is shifted down by 5pt.

9 Comments

  1. Nice to be visiting your blog once more, it’s been months on behalf of me. Well this article that ive been waited for therefore long. i want this text to complete my assignment within the faculty, and it’s same topic with your article. Thanks, great share.

  2. Thank you for therefore extreme a superb blog. where else may one gain this one type of info written inside very one incite full way? I even have a delivering as a result of i’m impartial today performing on, moreover I even have be looking as very information.

  3. Good post. I learn something tougher on different blogs everyday. It’ll all the time be stimulating to read content material from different writers and follow a little bit one thing from their store. I’d prefer to make use of some with the content on my blog whether or not you don’t mind. Natually I’ll offer you a hyperlink on your web blog. Thanks for sharing.

  4. Audry Bidell says:

    Nice to be visiting your blog again, it’s been months for me. Well this text that ive been waited for so long. i need this text to complete my assignment within the faculty, and it’s same topic along with your article. Thanks, great share.

  5. Alva Rapozo says:

    Advantageously, the article is in point of fact the best on this notable topic. I fit in along with your conclusions and will thirstily look forward to your upcoming updates. simply saying thanks won’t simply be adequate, for the tremendous lucidity in your writing. i’ll instantly grab your rss feed to remain abreast of any updates. Gratifying work and far success in your business efforts!

  6. thanks buddy, great!

  7. Heya i am for the first time here. I came across this board and I find It truly useful & it helped me out much. I hope to give something back and help others like you aided me.

Leave a Reply




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>