2

Excluding Margins from Pages

I'm looking for a way to exclude the sidenotes margin from certain pages in my document (notably the frontmatter and the part header page). For instance, in Example 1, I am trying to have there be no sidenotes margin and instead just have the table of contents extend to the full page width (like in regular documents).

Example A

Example 1: The table of contents with sidenotes margin.

Example B

Example 2: I don't want the thick margins here. Instead, I want the part heading to be centered on the page like in regular LaTeX documents.


Switching Margin Alternating Order

Also, I'm wondering whether I can reverse the sides of the margins; that is, I would like odd-numbered pages to have margins on the RHS and even-numbered pages to have LHS margins.

Example C

Example 3: Reverse this


Minimal working example of current setup

\documentclass[twoside, symmetric]{tufte-book}
\usepackage{lipsum}    
\usepackage{changepage}

\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}{
    \checkoddpage
    \ifoddpage\raggedleft\else\fi
}

\titleformat{\chapter}[display]
    {\normalfont\Huge\bfseries\justifyifodd}
    {\lmr\fontsize{86}{0}\selectfont \thechapter}
    {60pt}{}
    [\vspace{0.5ex}\titlerule]


\titlespacing*{\chapter}
  {0pt}
  {0pt}
  {1.5em}

\begin{document}

\frontmatter
\maketitle
\tableofcontents
\cleardoublepage
\mainmatter

\part{The First Part}
\chapter{The First Chapter}
\lipsum[1-7]

\chapter{The second chapter}
\lipsum[7-10]

\end{document}

Reference

Here are a few examples of what I am trying to achieve. Target A

Target B

Target C

from Concrete Mathematics

3
  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – BambOo
    Commented Jul 30, 2018 at 13:56
  • You do realize that the page format, the text block position, the margin notes positions on odd/even pages, etc., are the way they are by design, don’t you? I see absolutely no reasons why you’d want to switch margin notes positions on odd/even pages (what you want is simply wrong for a book). Except for the cover page, every other page should follow the rules of a book. All pages are to be bound into a book. Commented Jul 30, 2018 at 15:11
  • @RuixiZhang I suppose you are right in respect to the margin odd/even pages however I would still like to remove that thick sidenotes margin from frontmatter pages and part header pages. Any idea on how to do that? The reason I want to switch the side of the margins is because that's how Concrete Mathematics has it and I'm trying to replicate the style of that book.
    – Shon Verch
    Commented Jul 30, 2018 at 15:16

2 Answers 2

0

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.

toc

part

Please don’t do this.

2
  • 1
    Thanks so much! I do appreciate your answer. And yes, after having done more research on the matter and looking at my own copy of CM, the TOC does indeed have the margin along with almost every other page in the book. I have mostly decided to roll my own design using KOMA-Script and take your advice. Though, I am curious as to why the margin notes are on the inner in most of my CS/Maths book. Any explanations?
    – Shon Verch
    Commented Jul 30, 2018 at 19:54
  • @ShonVerch You’re welcome! If you are satisfied with my answer, you can accept it (by clicking on the checkmark ✓). It is quite shocking to learn that most of your textbooks have their side notes written on the inner margins. You can take a look at Euclid’s Elements, 1482. Commented Jul 30, 2018 at 20:14
0

I am using this to generate a Tufte-like layout using memoir. I defined a FullPage environment to use when needed.

\documentclass{memoir}
\usepackage{calc,environ,lipsum}

\setstocksize{9.25in}{6.125in}
\settrimmedsize{\stockheight}{\stockwidth}{*}
\setulmarginsandblock{0.75in}{*}{1}
\setlrmarginsandblock{0.5in}{*}{4.6}
\newlength{\margindiff}\setlength{\margindiff}{\foremargin - \spinemargin}
\newlength{\mpsep}\setlength{\mpsep}{2em}
\newlength{\mwidth}\setlength{\mwidth}{\margindiff -\mpsep}
\setmarginnotes{\mpsep}{\mwidth}{2.5\baselineskip}
\checkandfixthelayout

\NewEnviron{FullPage}{%
    \begin{adjustwidth*}{0em}{-\margindiff}
    \BODY
    \end{adjustwidth*}
    }

\begin{document}

\begin{FullPage}
\thispagestyle{empty}
\begin{center}
\vfill
Hello World!
\vfill

\today
\end{center}
\end{FullPage}

\clearpage

\lipsum[1-10]

\end{document}

Is this example useful enough to serve as a counter to Tufte or the KOMA-Script?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .