0

Building on this example where Chapter is added to each chapter heading, how can I modify the code to do just that except for the introduction and final / concluding chapter (but still retain numbering for TOC purposes)?

\documentclass{tufte-book}
\usepackage{lipsum}

\makeatletter
\titleformat{\chapter}%
  [display]% shape
  {\relax\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\begin{fullwidth}}{}}% format applied to label+text
  {\itshape\huge\chaptertitlename~\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
\makeatother
\setcounter{secnumdepth}{1}

\begin{document}

\chapter{Introduction}
\lipsum[1]
\chapter{A substantive chapter}
\lipsum[2]
\end{document}

Edit: I am interested in a flexible solution that - allows me to keep the introduction and conclusion as numbered the same way as the other chapters - allows me to have the intro and conclusion not numbered, but still to appear in the TOC.

2
  • 1
    Are you sure you want to number the introduction and conclusion? They can appear in the table of contents without being numbered.
    – Bernard
    Aug 8, 2019 at 21:50
  • My sense is that it would be odd with numbered section headings for the intro prefixed with 0, but I am fine with them being off-number so I have substantive chapters with the Chapter x heading, and then none of that for the intro and conclusion.
    – ako
    Aug 8, 2019 at 21:59

1 Answer 1

1

As long as the changes are made inside a group, they only affect the chapter you want and you are flexible to change the other chapters however you want.

\documentclass{tufte-book}
\usepackage{lipsum}

\makeatletter
\newcommand{\mychap}{%
\titleformat{\chapter}%
  [display]% shape
  {\relax\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\begin{fullwidth}}{}}% format applied to label+text
  {\itshape\huge\chaptertitlename~\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
}
\makeatother
\setcounter{secnumdepth}{1}

\begin{document}

\chapter{Introduction}
\lipsum[1]

\begingroup
\mychap%
\chapter{A substantive chapter}
\lipsum[2]
\chapter{Another chapter}
\lipsum[1]
\endgroup

\chapter{Conclusions}
\lipsum[1]

\end{document}
2
  • this works but the \begingroup switch seems to interfere with the section heading. The running section header for the introduction section to which I apply the begin group, the running head becomes CONTENTS from presumably the previous section. The other chapters don't have this issue.
    – ako
    Aug 15, 2019 at 13:49
  • @ako I can't reproduce this. Gotta some code?
    – user194021
    Sep 17, 2019 at 16:54

You must log in to answer this question.

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