1

tl;dr: How do I prevent a Part's title from taking the entire page? I want to place it on the same page as the next chapter's title.

I'm writing a dissertation, and it has several parts. I got the following comment for the revision:

Remove pages that are intro pages for sections. Intro pages are those that have only the chapter/section title and very little other information on the page. Instead, place this information on the first page of the actual page of the chapter/section. ... This is in reference to pages ...

While they call the parts "chapters/sections", they explicitly refer to the pages where the parts start.

How to fix: I want to place the part on the same page as the next chapter. I.e. I want a page like this:

Part I

FOO

Chapter 1

Bar

...contents...

How do I do that? My document class is report, and I don't plan on changing that.

I found questions about removing page breaks between chapters (Start new chapter on same page), which doesn't work since Part has significantly different formatting.

2
  • The titlesec package documentation has an example that does this in section 8, if memory serves.
    – Keelan
    Aug 30 at 4:50
  • Please provide your code what you tried so far.
    – MadyYuvi
    Aug 30 at 4:59

1 Answer 1

2

Below I modify \part to set a \chapter*, but using the part counter representation. An update to \chapter also temporarily removes the \clearpage functionality to avoid setting the chapter on the following page. You don't specify anything about the need for parts in your ToC, but this could be added if needed.

enter image description here

\documentclass{report}

\usepackage{lipsum}

\newif\ifpart
\let\oldpart\part% Store original \part (may not be necessary)
\RenewDocumentCommand{\part}{ m }{%
  \cleardoublepage
  \refstepcounter{part}%
  \chapter*{% Set \part as a \chapter*
    Part~\thepart \endgraf
    \vspace{20pt}%
    #1%
  }%
  \vspace{-40pt}% Remove some vertical space to next \chapter
  \parttrue% A \part has been set
}
\let\oldchapter\chapter% Store original \chapter
\let\oldclearpage\clearpage% Store original \clearpage
\RenewDocumentCommand{\chapter}{s o m}{%
  \ifpart% If a \part has been set
    \let\clearpage\relax% Remove \clearpage functionality temporarily
  \fi
  % Now set a regular \chapter
  \IfBooleanTF{#1}
    {\oldchapter*{#3}}% \chapter*{..}
    {\IfValueTF{#2}
      {\oldchapter[#2]{#3}}% \chapter[.]{..}
      {\oldchapter{#3}}% \chapter{..}
    }%
  \let\clearpage\oldclearpage% Restore \clearpage functionality
  \partfalse% No \part has been set
}

\begin{document}

\part{First part}

\chapter{First chapter}

\lipsum

\end{document}
1
  • Thanks! Also \addcontentsline{toc}{part}{\thepart\quad#1} for the TOC entry
    – Dmitry
    Aug 30 at 6:35

You must log in to answer this question.

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