I need 11pt titles and don't know what to do, 'medium' seems quite vague. This is my code:
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\Medium\upfamily\centering}
{\chaptertitlename\ \thechapter}{0pt}{\Medium}
I need 11pt titles and don't know what to do, 'medium' seems quite vague. This is my code:
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\Medium\upfamily\centering}
{\chaptertitlename\ \thechapter}{0pt}{\Medium}
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}.
\documentclass[11pt]{report}
\usepackage[tiny]{titlesec}
\titleformat{\chapter}[display]%
{\normalfont\bfseries\fillast}
{\chaptertitlename\ \thechapter}
{0pt}{}
\titlespacing*{\chapter}{0pt}{0pt}{0pt}
\makeatletter
\newcommand\thefontsize[1]{{#1 \f@size pt\par}}
\makeatother
\begin{document}
\chapter{\thefontsize{This is a chapter }}
Some text.
\section{\thefontsize{This is a section}}
\subsection{\thefontsize{This is a subsection}}
\end{document}
titlesec use of these terms as package options doesn't match their use as fontsize commands.
– Alan Munn
Aug 10 '15 at 21:41
\Mediumcommand? Sma question for the\upfamily. I suppose you mean\upshape– Bernard Aug 10 '15 at 21:23titleformatis one of theadvanced commands. Are you sure you want a11pt` size for chapter tiles? It's a size for normal text. – Bernard Aug 10 '15 at 21:30