# Change typeface size after \documentclass?

I use the same tex file to create several different layouts with basically the same content. I have several switches and \ifthenelse constructs to control the layouts. Normally, I just have to set one or two boolean variables to activate a specific layout.

Some layouts require typeface size 10pt, some 11pt. Is it possible to change the size after \documentclass{article}? E.g., in a constuct such as:

\ifthenelse{\boolean{layoutA}}
{\setlength{\typefacesize}{10pt}}
{\setlength{\typefacesize}{11pt}}


Obviously, there is no \typefacesize. I would like to avoid having to change the typeface size in \documentclass all the time.

-

It's possible, but I don't know exactly what the ramifications would be. Use at your own risk:

\documentclass[10pt]{article}

\makeatletter
\newcommand\resetfontsize[1]{%
\let\small\@undefined
\let\footnotesize\@undefined
\let\scriptsize\@undefined
\let\tiny\@undefined
\let\large\@undefined
\let\Large\@undefined
\let\LARGE\@undefined
\let\huge\@undefined
\let\Huge\@undefined
\makeatletter
\input{size#1.clo}
\makeatother
}
\makeatother

\usepackage{lipsum}
\begin{document}
\lipsum[1]
\section{abc}
\lipsum[2]

\resetfontsize{12}
\lipsum[1]
\section{abc}
\lipsum[2]

\end{document}

-

The KOMA-Script classes allow to change font sizes mid-document. The command syntax is \changefontsizes[(new "normalsize" baselineskip)]{(new "normalsize" fontsize)}. The default value for the new baselineskip is 1.2 * fontsize.

\documentclass[10pt]{scrartcl}

\usepackage{blindtext}

\begin{document}

\section{foo}

\blindtext

\changefontsizes{12pt}

\section{bar}

\blindtext

\changefontsizes[18pt]{12pt}

\section{gnu}

\blindtext

\end{document}

-
Nice, I didn’t know this feature yet. –  domwass Dec 9 '10 at 12:11