GeneralLayout of a \section

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

Layout of a \section

Post by Buxbux »

Hey,

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)

Cheers,

Frithjof :) :)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

Layout of a \section

Post by Ijon Tichy »

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.,
\documentclass{scrartcl}
\usepackage{blindtext}
\makeatletter
\renewcommand*{\sectionlinesformat}[4]{%
  \ifstr{#1}{section}{%
    \hskip #2#4#3
  }{%
    \@hangfrom{\hskip #2#3}{#4}%
  }%
}
\makeatother
\renewcommand*{\sectionformat}{\nobreakspace\thesection\autodot}
\begin{document}
\blinddocument
\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.
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
Post Reply