I want to create a book style by modifying one of the standard book styles like book.cls, extbook.cls, memoir.cls .

How can I reduce space between section heading and numbering internally without any package?

I have found many related question in this website that almost all of answers referred to titlesec or similar package.

  • This depends on how the \section commands have been defined, i.e., it depends on the document class that you use as well as any packages that modify these commands. First decide on the class.
    – gernot
    Commented Nov 13, 2019 at 15:24
  • Why aren't you wanting to use any packages? It wouldn't be hard to start with a standard book style, \RequirePackage{titlesec}, and then go from there. If you're not wanting to require the presence of titlesec, then why can you expect any portion of the standard tex distribution?
    – Teepeemm
    Commented Nov 13, 2019 at 18:35

1 Answer 1


Firstly do not modify any of the .cls files themselves.

For the memoir class:

% secnumprob2.tex  SE 516274 reduce space after section number

\newlength{\mylength} % a length for convenience

\setsecnumformat{\csname the#1\endcsname\hspace{\mylength}} 

See section 6.6 Lower level headings in the manual (> texdoc memoir). The macro \setsecnumformat defines the setting of the section numbers. It's default is \setsecnumformat{\csname the#1\endcsname\quad}. In the MWE above I changed the \quad to \hspace{\mylength} to give \mylength space between the section number and the title for the second and succeeding sections.

You must log in to answer this question.