I would like to add a dot after the number of each section (including chapters) in a report class document. I'd prefer not to have to resort to Koma-script solutions. There are a lot of other good ideas here: How to add a dot after the section number? but either they don't take care of the problem that cross-referencing comes with a dot as well, or they include only sections and below and not chapters. My Latex knowledge is too limited to generalize Mico's solution by myself, but it should be straightforward (seriously this question should be a comment to these posts, but I'm not allowed to comment :) ).

Alternatively, one could use the fix proposed here: Remove dot-after-number in figure captions while keeping the dot in chapter/section captions with label/ref instead of figure... So see, I'm pretty close but still missing something!

  • 1
    Welcome to tex.sx. Commented Jun 19, 2019 at 19:59
  • Did you try the titlesec solution?
    – Bernard
    Commented Jun 19, 2019 at 23:19
  • @Bernard The titlesec solution worked fine except for chapters, plus there is a conflict with fancyhdr apparently... I guess these two are redundant.
    – Ella
    Commented Jun 20, 2019 at 16:55
  • Could post a minimal example illustrating the problem? As to fancyhdr, a very nice titleps comes with titlesec, and it can easily define or redefine page headers and footers styles.
    – Bernard
    Commented Jun 20, 2019 at 17:24
  • Actually I wasn't using titlesec and fancyhdr together on purpose; the latter was part of a thesis style I just blindly implemented. It turns out calling titlesec after fancyhdr makes it work alright, in case anyone can benefit from that. Strangely it does not add a dot for chapters, but I just put one by hand in the chapter header as well as in the page header in the style file. Thanks all! I'm validating the answer anyway since it did answer my question as it was.
    – Ella
    Commented Jun 21, 2019 at 13:58

1 Answer 1


\patchcmd\@seccntformat{\csname the#1\endcsname}{\csname the#1\endcsname.}{}{\fail}
\ref{chap}, \ref{sec}
  • Thanks, would work great if not for fancyhdr...
    – Ella
    Commented Jun 20, 2019 at 17:10
  • Well you didn't add an example and your question doesn't mention fancyhdr. If you have additional requirements, ask a new question and this time add a sensible example to avoid that people waste their time to answer the wrong question. Commented Jun 20, 2019 at 17:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .