2

Is there a good way by specifying it in the preamble, to underline my section titles (not chapter titles), instead of having to do \chapter{\underline{Section Title}} for all chapter titles in the body?

I would like it as something like in this picture below:

enter image description here

Thanks!

4
  • 2
    That is very bad typographical practice. – Bernard Apr 7 '19 at 15:56
  • Oo, sorry, I totally switched chapter and section. I meant this one is for the section title, not chapter title. I need to make it that way because of the thesis formatting requirements. – Jerry Apr 7 '19 at 16:13
  • Thnks, @JouleV, but I could not find how you can underline it and middle align it. I'm new to Latex actually. – Jerry Apr 7 '19 at 16:13
  • @SamyamShrestha Look at the linked question. – user156344 Apr 7 '19 at 16:14
2

This is a quick way using sectsty

\documentclass{book}
\usepackage{sectsty}
\sectionfont{\underline\normalfont\normalsize\centering}
\usepackage{lipsum}
\begin{document}
\chapter{This is a chapter}
\section{This is your section}
\lipsum[1]
\end{document}

enter image description here

2
  • Great, that's sweet! Thanks! Similar to this (sectsty), what package can edit chapter titles? – Jerry Apr 7 '19 at 16:50
  • titlesec, or you can even edit it manually by redefining \chapter. – user156344 Apr 7 '19 at 16:51

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