1

I am using titleformat to make some adjustments in the part's page and I want to wrap the title in half, to be centered as a text, but on the right side of the page. Any ideas?

This is my code

\documentclass{book}
\usepackage[explicit]{titlesec}
\usepackage{titletoc}
\titleformat{\part}[display]
{\huge\raggedleft }
{\thispagestyle{empty}
Part \thepart \\ \vspace{35pt}\bfseries#1}  
{0pt} 
{}
\begin{document}
\part{Introduction to Quantum Field Theory}
\end{document}
7
  • You want the title itself to be on two lines, if I understand well?
    – Bernard
    Mar 10, 2016 at 0:49
  • Yes. Itself in two line and centered (like it is in an imaginary box) but at the left side of the page.
    – Jon Snow
    Mar 10, 2016 at 1:13
  • You said at the right side in your post.
    – Bernard
    Mar 10, 2016 at 1:14
  • yes right. My mistake.
    – Jon Snow
    Mar 10, 2016 at 1:42
  • And Part I must also be centred?
    – Bernard
    Mar 10, 2016 at 1:46

1 Answer 1

2

Something like that?

\documentclass{book}
\usepackage[pagestyles ,newparttoc, explicit]{titlesec}
\usepackage[showframe]{geometry}
\usepackage{titletoc}

\titleformat{\part}[display]
{\thispagestyle{empty}\huge\bfseries\filleft }
{}%
{0pt}
{\begin{tabular}{c@{}}
\mdseries\partname~\thepart\\[35pt]#1\end{tabular}}

 \titlespacing{\part}{0pt}{160pt}{0pt }

 \begin{document}

\part{Introduction to \\Quantum Field Theory}

\end{document}

enter image description here

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.