It should be noted that Concrete Mathematics uses its own book design, which is very different from Tufte’s book. So, if your ultimate goal is to typeset your book as Concrete Mathematics, then I don’t think using tufte-book
is a good idea.
I think you have some misconceptions regarding the layout of Concrete Mathematics:
- The table of contents starts in an even numbered page: This is rather unusual for a book, although it is not uncommon for old books (I guess paper costs much in the old days).
- The actual printed page sizes are marked by the box-drawing characters ┌ and ┐: After realizing the true page layout, it becomes very clear that the table of contents is NOT horizontally centered!
- The body text block is closer to the left margin on even pages and closer to the right margin on odd pages: This implies that the margin notes (i.e., side notes) are squeezed near the inner margins of the book.
- If the margin notes are near the area for bookbinding, then how am I supposed to read them? Well, if we look closely, we’ll find out that the margin notes in Concrete Mathematics are largely puns and jokes (sometimes quotes). I hope this clarifies my comment on switching margin notes: For most scientific books, you put actual important information in the margin notes, which are usually near the outer margins.
Making some contents horizontally centered in tufte-book
Warning: If you ignored my preceding explanations and insisted on getting contents on certain pages horizontally centered, then these pages would look as if they were torn off from a separate book. Please don’t do this.
The following solution exploits \newgeometry
and \restoregeometry
.
- The default page layout settings can be found in
tufte-common.def
. We can change the left=
to hmargin=
and make this into a macro \mynewgeometry
via \newgeometry
.
- Use the
\mynewgeometry
and \restoregeometry
pair wherever necessary.
tufte-book
doesn’t reformat \part
. So we can patch \part
according to its default book/report definition in classes.dtx
.
MWE
Please note the comments I’ve added using % <--
in the following code.
\documentclass[symmetric]{tufte-book}% <-- no need for `twoside' if `symmetric' is used
\usepackage{lipsum}
%\usepackage{changepage}% <-- not needed
\title{A Fantastic Title}
\author{Guy Fawkes}
% chapter header style code
\newcommand{\lmr}{\fontfamily{lmr}\selectfont} % Latin Modern Roman
% add numbers to chapters, sections, subsections
\setcounter{secnumdepth}{2}
\newcommand{\justifyifodd}{% <-- added `%', but this command is useless
\checkoddpage
\ifoddpage\raggedleft\else\fi
}
\titleformat{\chapter}[display]
{\normalfont\Huge\bfseries\justifyifodd}% <-- in a book, chapter should always start in odd page
{\lmr\fontsize{86}{0}\selectfont\thechapter}% <-- mixing Latin Modern Roman with Palatino, are you sure?
{60pt}{}
[\vspace{0.5ex}\titlerule]
\titlespacing*{\chapter}
{0pt}% <-- normally this should be a `glue': https://tex.stackexchange.com/a/64759/164314
{0pt}% <-- normally this should be a `glue': https://tex.stackexchange.com/a/64759/164314
{1.5em}
% my implementations
\makeatletter
% create `\mynewgeometry'
\newcommand{\mynewgeometry}{%
\newgeometry{letterpaper,hmargin=1in,top=1in,headsep=2\baselineskip,textwidth=26pc,marginparsep=2pc,marginparwidth=12pc,textheight=44\baselineskip,headheight=\baselineskip}
\ifthenelse{\boolean{@tufte@afourpaper}}
{\newgeometry{a4paper,hmargin=24.8mm,top=27.4mm,headsep=2\baselineskip,textwidth=107mm,marginparsep=8.2mm,marginparwidth=49.4mm,textheight=49\baselineskip,headheight=\baselineskip}}
{}
\ifthenelse{\boolean{@tufte@bfivepaper}}
{\newgeometry{paperwidth=176mm,paperheight=250mm,hmargin=14.66mm,top=13.88mm,textwidth=102.66mm,marginparsep=7.33mm,marginparwidth=36.66mm,textheight=38\baselineskip,includehead}}
{}
}
% patch `\part' and `\@endpart'
\usepackage{etoolbox}
\preto\part{\mynewgeometry}
\appto\@endpart{\restoregeometry}
\makeatother
\begin{document}
\frontmatter
\mynewgeometry% <-- used here
\maketitle
\tableofcontents
\restoregeometry% <-- used here
%\cleardoublepage% <-- not needed, since `\mainmatter' already has one
\mainmatter
\part{The First Part}
\chapter{The First Chapter}
\lipsum[1-7]
\chapter{The second chapter}
\lipsum[7-10]
\end{document}
Output
I cannot reproduce the “hanging” table of contents you showed (you must have other code in your preamble). But it is horizontally centered as requested.
Please don’t do this.
\documentclass{...}
and ending with\end{document}
.