[Tex/LaTex] determine the exact size and position of titles with the titlesec package


I need 11pt titles and don't know what to do, 'medium' seems quite vague.
This is my code:

{\chaptertitlename\ \thechapter}{0pt}{\Medium}

Best Answer

The medium in titlesec is a package option, not a command. So it is accessed by \usepackage[medium]{titlesec}. If you need all section titles to be 11pt, and your document text is also 11pt, the use \usepackage[tiny]{titlesec} which makes all headings (except chapters) to be the text font size.

To make chapter headings the same size as the main document font size, you can use \normalfont in the chapter title definition.

Here's a small document that shows both patterns. I've added the \fontsize macro from What point (pt) font size are \Large etc.? to show the actual size.

The tiny option sets all section and lower headings to the same size as the font size. It doesn't change chapter headings and you say you want them centred so I have given an example of how to do that.

To adjust the chapter spacing you need to supply values for the \titlespacing command. To set the titles immediately above the following text you can set the spacing to 0pt. using \titlespacing*{\chapter}{0pt}{0pt}{0pt}.

     {\chaptertitlename\ \thechapter}
\newcommand\thefontsize[1]{{#1 \f@size pt\par}}
\chapter{\thefontsize{This is a chapter }}
Some text.
\section{\thefontsize{This is a section}}
\subsection{\thefontsize{This is a subsection}}

output of code

Related Question