I'm using the Tufte-latex book class, and trying to figure out how to use numbers in the chapters/sections.
The default style has no numbers, which I turned off by commenting out this line:
% Turn off section numbering
%\setcounter{secnumdepth}{-1}
But I can't figure out how to make the Chapter Number, and Chapter Title be on the same line. At the moment the chapter title is underneath the number like so:
while I would prefer the chapter to look more like other sections, e.g.:
I've read through the class file a few times, but I'm not sure what I should be looking for as I'm not familiar with many of the commands. I think this section may be relevant, but am not certain:
(lines 1526 – 1534)
% Make Tuftian-style section headings and TOC formatting
\titleformat{\chapter}%
[display]% shape
{\relax\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\begin{fullwidth}}{}}% format applied to label+text
{\itshape\huge\thechapter}% label
{0pt}% horizontal separation between label and title body
{\huge\rmfamily\itshape}% before the title body
[\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\end{fullwidth}}{}]% after the title body
And possibly this part:
\titlespacing*{\chapter}{0pt}{50pt}{40pt}
I would appreciate any guidance about how to tweak this.
Best Answer
You found the relevant section, the
display
option is causing this numbering style. Change it for example tohang
to get a hanging label, such as with\section.
titlesec
is the package providing such headings. The manual explains options and syntax.Besides the command reference for
\titleformat
and\titlesection
this documentation provides a set of examples in its appendix, which produce the well known appearance of standard LaTeX headings. This is a great start for starting customizing headings.You can also make it similar to the
\titleformat{\section}
lines in the class file, just changing sizes and spacing.Keep in mind, if you copy commands from a class file for using in your own preamble, use
\makeatletter
before and\makeatother
afterwards, if a macro contains an@
symbol.