3

Example

\documentclass{article}
\begin{document}

\part{1. At the next lecture we will be talking about binary mixtures and their phase behaviour.}
\section{The system consists of two types of particles (say, A and B)}

\section{The particles fill a simple 3D lattice}

\end{document}

where I write my answers between. However, actually the first sentence in Part is longer. It looks massive:

enter image description here

How can you make the font smaller for part and section?

I can apply this

{\fontsize{0.3cm}{0.4em}\selectfont \textbf{This is small but bold!}}

to one sentence but the challenge is to apply it to some declaration that defines the size of the font in part and sections.

3 Answers3

5

It's easy with the sectsty package.

Just define

\parttitlefont{\Large}
\sectionfont{\large}

MWE

\documentclass{article}

\usepackage{sectsty}

\parttitlefont{\Large}
\sectionfont{\large}

\begin{document}

\part{1. At the next lecture we will be talking about binary mixtures and their phase behaviour.}

\section{The system consists of two types of particles (say, A and B)}

\section{The particles fill a simple 3D lattice}

\end{document} 

Output

enter image description here

karlkoeller
  • 124,410
  • \Large is still too large. I changed \Large to \large and \large to \small which seem to be ok size. Thank you for your answer! – Léo Léopold Hertz 준영 Jan 21 '15 at 14:19
  • It is strange that they have not documented the variety of different fontsize here in the manual of sectsty: http://www.ctex.org/documents/packages/layout/sectsty.pdf Do you know where they do classification of fontsize parameters? – Léo Léopold Hertz 준영 Jan 21 '15 at 14:21
  • 1
    @Masi you can find them in every LaTeX book, but you can simply have a look at this answer here: http://tex.stackexchange.com/a/24600/27635 – karlkoeller Jan 21 '15 at 15:11
1

You can use the titlesec package. It allows many modifications of that kind. You may want to look into its documentation for details, but for a part-heading that is only slightly larger than the section heading you could use

\documentclass{article}
\usepackage{titlesec}
\titleformat{\part}[display]{\LARGE\bfseries}{Part~\thepart}{8pt}{}

\begin{document}

\part{1. At the next lecture we will be talking about binary mixtures and their phase behaviour.}
\section{The system consists of two types of particles (say, A and B)}

\section{The particles fill a simple 3D lattice}

\end{document}
0

This is one possibility. Copy commands for part and section definitions from article.cls into your preamble and change fontsize commands according your taste. Be careful, if you change only part and section all other titles (subsection, paragraph) won't change.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{lmodern}
\usepackage{lipsum}

\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\large\bfseries}}
\def\@part[#1]#2{%
    \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
       \par\nobreak
     \fi
     \Large \bfseries #2%
     \markboth{}{}\par}%
    \nobreak
    \vskip 3ex
    \@afterheading}
\makeatother

\begin{document}

\part{1. At the next lecture we will be talking about binary mixtures and their phase behaviour.}
\section{The system consists of two types of particles (say, A and B)}
\lipsum[1]
\section{The particles fill a simple 3D lattice}
\lipsum[2]
\end{document}

enter image description here

Ignasi
  • 136,588