# [Tex/LaTex] Specifying font sizes

fontsfontsize

I am trying to change the font size of my document to 8pt.

However I can not get it to take effect. I am trying it in the \documentclass declaration.

Should it be specified elsewhere?

I am using XeTeX and fontspec, if that is relevant.

The basic font sizes of the standard document classes are built into the classes themselves. The extsizes classes define a number of parallel classes to the standard ones with a variety of sizes, including 8 pt.

\documentclass[8pt]{extarticle} % or {scrartcl} (Koma class)
\usepackage{fontspec}
\usepackage{lipsum} % for random text
\setmainfont{Linux Libertine}
\begin{document}
\section{A section}
\subsection{A subsection}
\lipsum
\end{document}


The since all sizes of other text (such as \Large, \footnotesize etc.) are defined relative to the document class size, it's better to use this sort of solution, if the normal document classes work for you.

The memoir class also allows a 9pt option, but not 8pt.

The koma document classes also allow specifying an arbitrary point size.