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 need to change the fontsize to 8pt, however I want to change only the regular text - chapter titles, table of contents and bibliography fonts must stay the same. Is it possible to change it the way I want to? I tried changing the fontsize in the documentclass using

\documentclass[a4paper,8pt]{<class>}

but it seems that it affected the entire document.

Here is my preamble

    \documentclass[a4paper,12pt]{mwrep}
\usepackage[MeX]{polski}
\usepackage[cp1250]{inputenc}
\usepackage[left=3.0cm,right=3cm,top=3.0cm,bottom=3.0cm]{geometry}
\usepackage{amsmath,amssymb}    
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{algorithmic}
\usepackage{colortbl}
\usepackage{dcolumn}
\usepackage{float}
\usepackage{tabularx}
\usepackage{longtable}
\usepackage[centerlast]{caption}
\usepackage{multirow}
\usepackage[section] {placeins}
\usepackage{booktabs}
\usepackage{xcolor}
\usepackage{changepage}
%\usepackage{lipsum}
\linespread{1.3}
\makeatletter
\def\hlinewd#1{%
\noalign{\ifnum0=`}\fi\hrule \@height #1 %
\futurelet\reserved@a\@xhline}
\makeatother
\newcommand{\mytoprule}{\specialrule{2pt}{0em}{0em}}
\newcommand{\mybottomrule}{\specialrule{2pt}{0em}{0em}} 
\renewcommand{\labelitemii}{$\bullet$}
\setlength{\belowcaptionskip}{-10pt}
\newcommand{\eightptsize}{%
    \fontsize{8}{9.5}\selectfont}
share|improve this question
    
You mention that the size of the font in chapters/sections/etc, in the table of contents, and the bibliography "must stay the same"; but what is the value of the basic font size? Is it 10pt, 11pt, etc? And, what is the value of the basic \baselineskip -- 12pt, 14pt, etc? Finally, you mention that the text of the document should be set at 8pt -- do you have a value in mind for the \baselineskip at this new size? –  Mico Sep 1 '11 at 22:22
    
Kronos: In my answer below, I've added some material to my original answer, to explain how you'd deal with the need to set footnotes in a font size that's 1pt smaller than the main text. –  Mico Sep 2 '11 at 5:28

2 Answers 2

You should issue the commands \fontsize{8}{9.5}\selectfont after the \tableofcontents command (and other frontmatter commands) but before the first chapter command. Near the end of the document, i.e., just before the bibliography, you also need to issue the command \normalsize to restore the font's size to \normalsize, be that 10pt, 11pt, or 12pt (or any other value).

In the following MWE, the command \eightptsize encases the fontsize-changing commands:

\documentclass[a4paper,12pt]{book}  % basic font size in this MWE: 12pt
\usepackage[margin=2.5cm]{geometry}
\usepackage{lipsum}
% command to switch to 8pt on a baselineskip of 9.5pt
\newcommand{\eightptsize}{%
    \fontsize{8}{9.5}\selectfont}
\begin{document}
\tableofcontents

\eightptsize  
\chapter{In the Beginning}
\section{Section 1}
\subsection{Some subsection}
As posited by \cite{x}, we can't know for sure \ldots

\lipsum[1]

\subsection{Another subsection}
\lipsum[2]

%% back to 'normalsize' font size before start of bibliography   
\normalsize
\begin{thebibliography}{9} 
\bibitem{x}Variable, Random, 2011, ``On Randomness,'' \emph{Journal of Randomness}, 
Vol.~1, No.~1, pp.\ 1--2.
\end{thebibliography}
\end{document}

Where does the value of 9.5pts for \baselineskip come from, you may ask? I've taken it from the default definition of this variable for the case that normalsize is 10pt, in which case the command \footnotesize switches to an 8pt font size with a baselineskip of 9.5pt. Of course, you may prefer either more or less leading than the TeX default.

Edit: Addendum -- How to deal with the font size for footnotes in a text set in 8pt?

It occurred to me that even though you've specified that nothing should change except for the fontsize of the text, you really should be willing to make an exception for the case of footnotes. (I assume you'll have some in a book-length document!) The reason for this is that if your documentclass sets \normalsize to 10pt, 11pt, or 12pt, respectively, footnote text will be set in a font size of 8pt, 9pt, and 10pt. Common (near-universal?!) typographic practice, however, is to have footnotes be set in a fontsize that's 1 or 2 points smaller that \normalsize. Assuming, for instance, that \normalsize might be 12pt, you would get footnotes set in 10pt even though the text itself is set in 8pt: this is going to look weird, to say the least. The solution is to do a \renewcommand on the LaTeX macro named, what else, \footnotesize. In the code of the MWE above, you would have to replace the definition of the \eightptsize macro with the following code (the \makeatletter and \makeatother commands are required because a couple of the commands being reset contain the "special" character @):

\makeatletter
\newcommand{\eightptsize}{
  \fontsize{8}{9.5}\selectfont
   \renewcommand\footnotesize{%
    \@setfontsize\footnotesize{7}{8}%
    \abovedisplayskip 5\p@ \@plus2\p@ \@minus3\p@
    \abovedisplayshortskip \z@ \@plus\p@
    \belowdisplayshortskip 2\p@ \@plus\p@ \@minus1\p@
    \belowdisplayskip \abovedisplayskip
  }
}
\makeatother

The main change is to set the footnote font size to 7pt, i.e., 1pt less than the font size of the text. The rest of the code is cribbed unashamedly from the definition in the book10.clo file. :-)

Edit: Second Addendum -- How to fix up the class file mwrep?

For some reason, the class file you use (mwrep.cls) does not specify a default font size for the headers of subsections, subsubsections, paragraphs, and subparagraphs. To fix this, you should make a copy of this class file, name it (say) mwrep-kronos.cls, find the four instances of the command \SetSectionFormatting{ subsection, subsection, paragraph, subparagraph} and, within these commands, the instances of the commands \FormatHangHeading{} (twice) and \FormatRunInHeading{} (twice). Insert the instruction \normalsize in each of the 4 pairs of empty curly braces. Save the new class file and, if necessary, update the TeX filename database. (By the way, you'll probably need superuser privileges to copy/rename the file and update the filename database.) Then specify the class file mwrep-kronos as the argument of the \docummentclass command and you should be all set to go.

share|improve this answer
    
Your solution works great except one little detail - in my document subsection's font size has changed to smaller one. Does it happen in Your document ?? –  kronos Sep 2 '11 at 11:56
    
No this doesn't happen, i.e., the size of the font used in subsection headers (and in other headers) does not change. What documentclass are you using, and are you using any packages that may affect the appearance of (sub)section headers? (I was using 'book' in the MWE I provided.) – Mico 32 mins ago –  Mico Sep 2 '11 at 13:07
    
Please, take a look at my question again. I edited it and added my preamble –  kronos Sep 2 '11 at 15:09
    
Kronos: Thanks for posting a full example of your file. The answer above now has a second addendum that explains how to fix up the class file you're using. –  Mico Sep 2 '11 at 17:03
    
Kronos: Incidentally, instead of typing \usepackage[left=3.0cm,right=3cm,top=3.0cm,bottom=3.0cm]{geometry} in the preamble, you could also just have \usepackage[margin=3cm]{geometry} –  Mico Sep 2 '11 at 17:17

You could redefine the command \normalsize. For doing this, you could use the original code of \normalsize from your document class (not yet mentioned by you), copy that to your preamble and modify it using \renewcommand or \def.

\normalsize can also be defined in a .clo file, a class option file loaded by your class.

Since chapter headings and other headings usually don't use \normalsize but a bigger font size, this can help you and keeps the bigger headings untouched.

If you know that \small is the size you want for text, you could write

\let\normalsize\small

Note:

  • \normalsize adjusts further values such as display and list skips, as \small and \footnotesize do as well. That's why the \let command above is handy.

  • Consider to change also \small, \footnotesize, \scriptsize etc. if appropriate.

  • Try to keep font sizes consistent.

  • At least call \normalsize at the beginning of your document.

Here is the definition of \normalsize with the book class in 10pt, as demonstration which values may be affected:

\renewcommand\normalsize{%
   \@setfontsize\normalsize\@xpt\@xiipt
   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}

I would recommend though considering doing it the other way round: choose 8 pt base font size, and adjust the headings size as you desired, for example using the titlesec package. Or you redefine \large, \Large, \LARGE, \huge and \Huge instead, which are used for headings. In contrast to the smaller size commands, they are usually defined by just one line, such as

\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
share|improve this answer
    
\normalsize, \small, and \footnotesize adjust further values. –  lockstep Sep 1 '11 at 21:58
    
@lockstep: I know, though that depends on the class. Was just an example. –  Stefan Kottwitz Sep 1 '11 at 22:02

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.