LaTeX forum ⇒ Text FormattingDefining the space between subsection number and subsection title

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Posts: 10
Joined: Tue Jul 12, 2016 5:23 am

Defining the space between subsection number and subsection title

Postby jjmm » Wed Jul 18, 2018 3:37 am


I know how to define the space between section number and section title: ... tion-title

  1. \makeatletter % access to internal commands
  2. \renewcommand{\@seccntformat}[1]{\csname the#1\endcsname\ }
  3. \makeatother

How do we define the space between"subsection" number and "subsection" title?

User avatar
Site Moderator
Posts: 3835
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Jul 18, 2018 7:00 am

The code you have shown defines the space for all sectional levels.

Please provide a minimal working example, so we have something to test possible solutions.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Posts: 10
Joined: Tue Jul 12, 2016 5:23 am

Postby jjmm » Thu Jul 19, 2018 10:45 am

Thanks. This is the code where I modify the space between the section number and the section title.

  1. \documentclass{article}
  3. \makeatletter
  4. \renewcommand{\@seccntformat}[1]{\csname the#1\endcsname\ } % space
  7. \makeatother
  8. \begin{document}
  10. \section{Introduction}
  11. This article
  13. \subsection{My subsection}
  14. However
  16. \end{document}

User avatar
Stefan Kottwitz
Site Admin
Posts: 9021
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Fri Aug 31, 2018 12:24 pm

Well the spacing of the subsection number is modified too in that way. So you already achieve it. Or should it be different?

4ex just to see it better here:

\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname\hspace{4ex}} % space

section.png (9.45 KiB) Viewed 146 times

Site admin

Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 10 guests