Text FormattingDecrease Font Size of Part Heading

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
gwsk5597
Posts: 1
Joined: Sat Sep 03, 2011 12:56 am

Decrease Font Size of Part Heading

Post by gwsk5597 »

Hello. I'm in the middle of setting up a book in LaTeX. It's pretty elaborate and I had to move the rather lengthy preamble into a .sty file (apparently this is a "package," although I wouldn't call it one) to keep it from cluttering everything up. So far, it's all worked out pretty well.

But I have one problem: I need to shrink the font for \part down a little bit since the pages are 7in by 4.5in and the default seems to be set up for larger ones. Since the project is travel-related, I created a new command and called it "\continent":

Code: Select all

\newcommand{\continent}[1]{\part[#1]{\vspace{-0.5cm} #1 \thispagestyle{empty}}}
This removes the page numbers from the \part pages, which is also important. But I can only seem to change the font size for the actual part title, not where it goes "Part I," "Part II," etc. So, the result is it looks weird with the number several times bigger than the actual title. Of course, I can always set secnumdepth to -2, but this would get rid of the numbering, which I'd prefer to keep. How can I change the overall font size for the entire \part?

Recommended reading 2024:

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

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

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: Decrease Font Size of Part Heading

Post by kaiserkarl13 »

You might try making a copy of book.cls (the one in your TeX tree) in the current directory. Now edit the definition of \part in this file; you can add your \thispagestyle command there as well. Change \Huge to \huge or \Large, whatever you wish. This version will only affect the build in this directory, so it's much safer than editing the original. (Also the fact that editing the original with intent to distribute is illegal. With that in mind, you might call it "mybook" instead of "book".)
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Decrease Font Size of Part Heading

Post by Stefan Kottwitz »

You could take the \part command from your document class (which one is it?) or a related command (such as \@part from the book class) and redefine it.

Or patch the command using the etoolbox package, this could be done in three lines.

If you provide more information (such as the class name or file) we could give further details.

Stefan
LaTeX.org admin
Post Reply