# Switching to different font size(s) locally

Inside a 12pt document I like to switch in an environment to a font size of 10pt. The macros like \normalsize, \large, \small etc. should all work like in a 10pt document. I'm aware that this isn't good typography and might look bad in general. I'm planning to use it for the labels inside a tikzpicture.

The task (I don't like to call it a "problem") is that I have some standalone tikzpicture documents which are using 10pt when compiled standalone, but can be also inserted into 12pt documents where the text does not fit any more in some places. I know it could be fixed by changing all distances to one of the font size specific units em or ex, but don't like to change several figures and maybe add this as a feature to the standalone package.

-

\makeatletter
\input{size10.clo}
\makeatother


Or implement the contents of size10.clo yourself.

-
Thanks, this looks very interesting. I forgot that the font sizes are set by .clo files. –  Martin Scharrer Apr 14 '11 at 15:46
It was difficult to call which answer to accept. I was choosing this one because it's includes the full code required to change the font size at the begin of an environment. –  Martin Scharrer Apr 18 '11 at 14:49
Thanks again. This is now part of standalone v1.0 and is used to apply the used class font size option of subfiles even if they are included in a main document. See the obeyclassoptions option of the standalone package. –  Martin Scharrer Dec 21 '11 at 16:26
I tried applying this after a tikzpicture environment, and before some text. However, it changed the size of the text in the tikzpicture too. –  Faheem Mitha Feb 7 at 8:45
\documentclass{article}

\begin{document}
abc {\large abc}
abc \large abc}
abc
\end{document}


But it won't work with every class/fontsize. E.g. with book you will have to input book12.clo, and the koma classes computes some fontsizes.

-
Thanks. The files in question will be standalone files, i.e. just single picture environments. The article class is used for that. The main document might be book or a koma class, but I like to actually switch to the "normal" 10pt style of the article class, so size10.clo should do it. –  Martin Scharrer Apr 14 '11 at 15:43
I can't find a book12.clo file but there is a bk12.clo file, which looks like it. –  Martin Scharrer Apr 14 '11 at 16:03