2

How can I get the formatted \part to show Part I in one line and the Name of the Part One in the other line (line break) as it shows in the \chapter without formatting?

\documentclass{report}
\usepackage{titlesec}
%For defining the style of the part
\titleclass{\part}{top}\titleformat{\part}{\centering\normalfont\Large}{\partname\hspace{2pt}\thepart\hspace{2pt}}{2pt}{}
\begin{document}
\part{Name of the Part One}
\chapter{Name of the Chapter One}
\section{Section One}
Some text!
\section{Section Two}
Some text!
\end{document}
4

I don´t know if it´s exactly what you want but you can use \titleformat{\part}{display} to set the label to another line.

You can reproduce the formatting of part as chapter with the code below and change the formatting setting for the partname. The last parameter is the formatting for the title of the part.

\documentclass{report}
\usepackage{titlesec}
%For defining the style of the part
%\titleclass{\part}{top}\titleformat{\part}{\centering\normalfont\Large}{\partname\hspace{2pt} \thepart\hspace{2pt}}{2pt}{}

%part formatted same as chapter    
\titleformat{\part}[display]{\normalfont\huge\bfseries}{\partname\ \thepart} % partname formatting
{20pt} % vertical space
{\Huge} %part title formatting

\begin{document}
\part{Name of the Part One}
\chapter{Name of the Chapter One}
\section{Section One}
Some text!
\section{Section Two}
Some text!
\end{document}

and you get:

enter image description here

  • Thanks for your reply! But my challenge is to get that result with the formatted \part, if I don't format I get that result but then it does not fit the layout required for my paper. – hehe_br Nov 14 '14 at 17:03
  • didn't understand yet. What´s exactly the layout required?? – Smarzaro Nov 14 '14 at 17:43
  • the one that is set in the example by the \titleformat{\part}...! Without the formatting the font size is too big and with \titleclass{\part}{top} I get some more space to have a mini table of contents on the part page. – hehe_br Nov 14 '14 at 17:52
  • 1
    See the edit I made in the answer. I think you can change to fit your needs. – Smarzaro Nov 14 '14 at 17:53
  • Yes, this works perfectly! Thanks for your help! – hehe_br Nov 14 '14 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.