Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using the book class.

I want to modify the spacing before and after my sections using the \titlespacing* command.

However, before I do that, I want to let its parameters be such that they reproduce exactly what they were by default. This way, I can have the default “baseline-setting” on which I can base my modifications upon. (I'm especially interested in knowing how the default settings are for the stretching/shrinking before and after the section title.)

How do I do this?

share|improve this question

1 Answer 1

up vote 14 down vote accepted

It can be found in the titlesec documentation:

\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titleformat{\section}
{\normalfont\Large\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\large\bfseries}{\thesubsection}{1em}{}
\titleformat{\subsubsection}
{\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}
\titleformat{\paragraph}[runin]
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titleformat{\subparagraph}[runin]
{\normalfont\normalsize\bfseries}{\thesubparagraph}{1em}{}

\titlespacing*{\chapter} {0pt}{50pt}{40pt}
\titlespacing*{\section} {0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
\titlespacing*{\subsection} {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\titlespacing*{\subsubsection}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\titlespacing*{\paragraph} {0pt}{3.25ex plus 1ex minus .2ex}{1em}
\titlespacing*{\subparagraph} {\parindent}{3.25ex plus 1ex minus .2ex}{1em}
share|improve this answer
3  
And in the standard classes (book.cls, for exampe) you find \newcommand\section{\@startsection {section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\normalfont\Large\bfseries}}. The fourth anf fifth arguments give the spacing after and before. –  Gonzalo Medina Mar 20 '12 at 23:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
http://tex.stackexchange.com/questions/48753/obtaining-the-default-section-spacing-into-the-titlespacing-parameters
tex.stackexchange.com
crawl=CC-MAIN-2015-40
69760
application/http; msgtype=response
sha1:IVG3FP4VTXN267U6QRNXDNDV7UNLZVM2
<urn:uuid:14de1214-1136-44f3-8d19-67396d8e14ee>
2015-10-05T04:10:07Z
104.16.16.128
sha1:VCEBG7HVORNTKCWB3EE6WPUIRP52FSPE
<urn:uuid:81264bcb-d53e-429a-846c-bfe5287768a8>
http://tex.stackexchange.com/questions/48753/obtaining-the-default-section-spacing-into-the-titlespacing-parameters
length
response
<urn:uuid:bf3ff014-3c5d-454c-9f4e-0530bd9b0bb4>
robots: classic
hostname: ip-10-137-6-227.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2015-40
operator: CommonCrawl Admin
description: Wide crawl of the web for September 2015
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf