16

I'm using \part for defining parts of my "book". The thing is, that the part takes a whole page. I use \documentclass[12pt]{book}.

I want to style the \part in a way that it looks like the fncychap style Conny and don't take a whole page.

How do I accomplish that?

Alan Munn
  • 218,180
Stefan
  • 263
  • 1
  • 2
  • 5

1 Answers1

20

Here's a version using the titlesec package. I've made the \part and chapter styles identical, and roughly imitated the Conny style. You probably don't want to do exactly this, but it should be enough to get you started.

\documentclass{book}
\usepackage{lipsum}% for dummy text
\usepackage{titlesec}

\titleclass{\part}{top} % make part like a chapter
\titleformat{\part}
[display]
{\centering\normalfont\Huge\bfseries}
{\titlerule[5pt]\vspace{3pt}\titlerule[2pt]\vspace{3pt}\MakeUppercase{\partname} \thepart}
{0pt}
{\titlerule[2pt]\vspace{1pc}\huge\MakeUppercase}
%
\titlespacing*{\part}{0pt}{0pt}{20pt}
%
\titleclass{\chapter}{straight} % make chapter like a section (no newpage)
\titleformat{\chapter}
[display]
{\centering\normalfont\Huge\bfseries}
{\titlerule[5pt]\vspace{3pt}\titlerule[2pt]\vspace{3pt}\MakeUppercase{\chaptertitlename} \thechapter}
{0pt}
{\titlerule[2pt]\vspace{6pt}\huge\MakeUppercase}

\titlespacing*{\chapter}{0pt}{0pt}{40pt}



\begin{document}
\part{A part}
\chapter{A chapter}
\lipsum[1-2]
\end{document}

output of code

Alan Munn
  • 218,180
  • Thank you very much. Sorry for my late answer, but today I figured out that \titleclass{\chapter}{straight} seems to break the links to my toc (list of tables, etc). I'm using \tableofcontents \addcontentsline{toc}{chapter}{Contents}. See the image for an example: Screenshot. (left: all link to page I). – Stefan Nov 09 '11 at 11:23
  • Is there a way to remove the part title all together? I want to use parts to organize the table of contents, but I don't need the part titles in the text. Thanks – steffen Nov 30 '20 at 18:47
  • 1
    @steffen If you don't need any reference to parts in the main text, then you can just add the lines directly to the TOC. E.g. \newcommand{\tocpart}[1]{\stepcounter{part}\addcontentsline{toc}{chapter}{\thepart\quad#1}} and then use \tocpart{Title of Part} in the text. But if you want part names to appear in the headers, for example, you'll need to do something more fancy, in which case I would ask a new question asking how to do that. – Alan Munn Nov 30 '20 at 19:15