Page LayoutPart Formatting

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
the_blue_note
Posts: 15
Joined: Mon Oct 24, 2011 9:38 pm

Part Formatting

Post by the_blue_note »

Hello to all,
this is probably an easy question, but it's driving me crazy and I've already spent a few hours researching with no success. Thanks in advance if anyone can help me.
I'm writing a book and I would like to change a the way Latex typesets the \part title page. More precisely, I would like that the roman numeral appears in the same line than the parttitle (like: I. Introduction) without the "part" and that this line is flushed right and and a bit higher that the centre of the page, where Latex places it by default.
All I've got is to hide the "part" using \renewcommand{\partname}{} , but that's all :(
Thanks a lot for your time. Any help will be much appreciated.
Regards.
Pablo
Last edited by the_blue_note on Thu Oct 27, 2011 10:45 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

Part Formatting

Post by Frits »

Here's something to get you started:

Code: Select all

\usepackage{titlesec}
\titleformat{\part}[hang]
  {\normalfont\Huge\bfseries\centering}{\thepart.}{1em}{\Huge}
\titlespacing*{\part}{0pt}{-19pt}{0pt}
I used this for \chapter in one of my documents, so you probably need to find a way to also vertically center this one.
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
the_blue_note
Posts: 15
Joined: Mon Oct 24, 2011 9:38 pm

Re: Part Formatting

Post by the_blue_note »

Frits,
thanks a lot! That was exactly what I needed. I used \raggedleft instead of \centering and the result is exactly what I was looking for. Many, many thanks.
Just one more question.Is there some way to get rid of the page number in those pages I've just created?
Thanks!
Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

Part Formatting

Post by Frits »

Add \thispagestyle{empty} right after the \part{...} command?
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
the_blue_note
Posts: 15
Joined: Mon Oct 24, 2011 9:38 pm

Re: Part Formatting

Post by the_blue_note »

Frits,
thanks again. It wasn't exactly like that- it didn't work at first, so what I did instead was to include \thispagestyle{empty} inside the \titleformat you pointed in the previous post, and it took away the number for all the parts titlepages.
In any case, millions of thanks for pointing in the right direction.
Cheers,
Pablo
Post Reply