LaTeX forum ⇒ GeneralLayout of a \section

LaTeX specific issues not fitting into one of the other forums of this category.
Posts: 1
Joined: Wed Aug 28, 2019 4:41 pm

Layout of a \section

Postby Buxbux » Wed Aug 28, 2019 4:47 pm


I'm using Texstudio with MiKTeX. I've got a simpel Question. Do anybody know how I put the numbering at the end of the titel instead of the front? --> (Word 1) instead of (1 Word)


Frithjof :) :)

User avatar
Ijon Tichy
Posts: 139
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Wed Aug 28, 2019 5:27 pm

This depends on the class you are using. For the standard classes you need an additional package like titlesec. For the KOMA-Script classes you can simply redefine \sectionlinesformat, e.g.,
Code: [Select all] [Expand/Collapse] [Download] (scrartcl-example.tex)
  1. \documentclass{scrartcl}
  2. \usepackage{blindtext}
  3. \makeatletter
  4. \renewcommand*{\sectionlinesformat}[4]{%
  5. \ifstr{#1}{section}{%
  6. \hskip #2#4#3
  7. }{%
  8. \@hangfrom{\hskip #2#3}{#4}%
  9. }%
  10. }
  11. \makeatother
  12. \renewcommand*{\sectionformat}{\nobreakspace\thesection\autodot}
  13. \begin{document}
  14. \blinddocument
  15. \end{document}

The change of \sectionformat is to remove the space after the number and put it in front of the number.

If this answer doesn't help you, please show us a Infominimal working example that illustrates your problem and help us to find and test a suggestion.

Return to “General”

Who is online

Users browsing this forum: No registered users and 17 guests