Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I used a former question on TeX.SE to find the command \part*{}. I like everything about it but the font for it is huge. How can I tone down the size of the font for this command.

\documentclass{article}
\begin{document}

\part*{Min}
new
\section{a}
new2
\section{b}
new3

\end{document}
share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

The definition of \part and \part* in article.cls is:

\def\@part[#1]#2{% <------------------------------- \part[..]{...}
    \ifnum \c@secnumdepth >\m@ne
      \refstepcounter{part}%
      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
    \else
      \addcontentsline{toc}{part}{#1}%
    \fi
    {\parindent \z@ \raggedright
     \interlinepenalty \@M
     \normalfont
     \ifnum \c@secnumdepth >\m@ne
       \Large\bfseries \partname\nobreakspace\thepart% Part font
       \par\nobreak
     \fi
     \huge \bfseries #2% Title font
     \markboth{}{}\par}%
    \nobreak
    \vskip 3ex
    \@afterheading}
\def\@spart#1{% <------------------------------- \part*{...}
    {\parindent \z@ \raggedright
     \interlinepenalty \@M
     \normalfont
     \huge \bfseries #1\par}% Title font
     \nobreak
     \vskip 3ex
     \@afterheading}

You can include these in your document and modify the "font" parts (highlighted above; "Part font" and "Title font") to your liking. There's also packages like titlesec and sectsty that can help. Using the latter, is as easy as

\usepackage{sectsty}% http://ctan.org/pkg/secsty
\partfont{\large\bfseries}

to change the "Part font" to \large\bfseries.

Expanding on the former (raw) LaTeX code, to change the font specifically for \part*, use something like

\def\@spart#1{% <------------------------------- \part*{...}
    {\parindent \z@ \raggedright
     \interlinepenalty \@M
     \normalfont
     \large \bfseries #1\par}% Title font
     \nobreak
     \vskip 3ex
     \@afterheading}

where I've changed the \huge font size to \large, keeping it bold.

Remember to wrap the macro redefinition with a \makeatletter...\makeatother pair. See What do \makeatletter and \makeatother do?

share|improve this answer
    
Beautiful. I went with LARGE instead but spot on with sectsty approach. Thank you. +1 –  Tyler Rinker Nov 1 '12 at 0:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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