133

I want to create a TeX document for which the first (summary) page is \documentclass[10pt]{article}, but for which the rest of the document is \documentclass[12pt]{article}. Is there an easy way to do this?

4
  • You mean a LaTeX document, right?
    – frabjous
    Commented Oct 14, 2010 at 19:58
  • 1
    I deleted an answer of mine containing an untested (and unrecommended) hack that didn't work (because it loaded a file using \newcommand on commands already defined). My thanks to Thorsten Donig, who apparently bothered to test it. Commented Oct 14, 2010 at 20:33
  • As mentioned in the discussion at Change line spacing inside the document, you should explain why LaTeX — specify font point size did not provide an adequate solution. The best way would be to compose a fully compilable MWE including \documentclass and the appropriate packages that illustrates how the linked question did not provide a solution. Basically show what you tried to do that failed. Commented Dec 21, 2012 at 22:02
  • \fontsize{size}{skip}:: \baselineskip but i don't understand its role ?
    – researcher
    Commented Dec 21, 2012 at 22:05

6 Answers 6

116

You can change font size using \fontsize{10}{12}\selectfont (the first number is the pt size of the font, the second number the space in pts between lines: this becomes the value of \baselineskip), but in general I think it's better to try using things like \tiny, \small, \scriptsize, \normalsize, \footnotesize, \large, \Large, \LARGE, \huge and \Huge (and the corresponding environments (e.g., \begin{small} ... \end{small}). I think \footnotesize would give you a 10pt font in a document with 12pt set in its document class options.

And if the summary page is done using a special environment, like \begin{abstract} ... \end{abstract} likely what you want can be done a completely different way, such as by using the abstract package. (It's hard to give concrete advice without knowing more about the details of the summary page, however.)

29

The following will locally reconfigure everything as if a different size agrument had been given to the document class. I assume not every setting will be effective though. But at least all the sizing macros will be appropriately redefined.

\documentclass[12pt,a4paper]{book} 

\usepackage{lipsum}

\newenvironment{localsize}[1]
{%
  \clearpage
  \let\orignewcommand\newcommand
  \let\newcommand\renewcommand
  \makeatletter
  \input{bk#1.clo}%
  \makeatother
  \let\newcommand\orignewcommand
}
{%
  \clearpage
}

\begin{document}
\lipsum
\begin{localsize}{10}
  \lipsum
\end{localsize}
\end{document}

Note: This is based on loading the original size definitions of the book class named bk10.clo, bk11.clo, bk12.clo, so 10, 11, 12 are the possible arguments, corresponding to the options 10pt, 11pt, 12pt of the document class.

For using with another class (for instance article), the prefix bk used in

  \input{bk#1.clo}%

needs to be replaced by the one used by the respective class (for instance size). Some classes like memoir support a wider range of sizes.

9
  • 1
    The use of \clearpage is perhaps preferred, but not necessary.
    – Werner
    Commented Dec 21, 2012 at 22:21
  • 2
    Might be a good idea to add a matching makeatother. I guess since it is in an environment it is in a group, but still better to be explicit (IMHO). Commented Dec 21, 2012 at 22:22
  • @Mico Good point. Edtited. Commented Dec 22, 2012 at 5:32
  • @Werner As some page-specific parameters like \headheight are set in the .clo files I think using a complete range of pages is better. I've not tested whether everything works as expected though ;-) Commented Dec 22, 2012 at 5:35
  • @PeterGrill I did have the feeling I'd forgotten to close something ;-) Edited, thanks for the hint. Commented Dec 22, 2012 at 5:36
12

If you are using a KOMA-Script class you can change the basic font size inside the document:

\documentclass[10pt]{scrartcl}
\begin{document}
\parbox[t]{.5\textwidth}{%
  \section*{10pt}
  \raggedright
  \tiny tiny\par
  \scriptsize scriptsize\par
  \footnotesize footnotesize\par
  \small small\par
  \normalsize normalsize\par
  \large large\par
  \Large Large\par
  \LARGE LARGE\par
  \huge huge\par
  \Huge Huge\par
}%
\KOMAoptions{fontsize=12pt}
\parbox[t]{.5\textwidth}{%
  \section*{12pt}
  \raggedright
  \tiny tiny\par
  \scriptsize scriptsize\par
  \footnotesize footnotesize\par
  \small small\par
  \normalsize normalsize\par
  \large large\par
  \Large Large\par
  \LARGE LARGE\par
  \huge huge\par
  \Huge Huge\par
}
\end{document}

KOMA-Script example

If you are not using a KOMA-Script class, you can use the KOMA-Script package scrextend:

\documentclass[10pt,a4paper]{article}
\usepackage{scrextend}
\begin{document}
\parbox[t]{.5\textwidth}{%
  \section*{10pt}
  \raggedright
  \tiny tiny\par
  \scriptsize scriptsize\par
  \footnotesize footnotesize\par
  \small small\par
  \normalsize normalsize\par
  \large large\par
  \Large Large\par
  \LARGE LARGE\par
  \huge huge\par
  \Huge Huge\par
}%
\KOMAoptions{fontsize=12pt}
\parbox[t]{.5\textwidth}{%
  \section*{12pt}
  \raggedright
  \tiny tiny\par
  \scriptsize scriptsize\par
  \footnotesize footnotesize\par
  \small small\par
  \normalsize normalsize\par
  \large large\par
  \Large Large\par
  \LARGE LARGE\par
  \huge huge\par
  \Huge Huge\par
}
\end{document}

standard class example

Caveat: Not all length depending on the basic font size will be changed, if you use \KOMAoptions{fontsize=…}. For example, if a package uses code like

 \newlength{\foo}
 \setlength{\foo}{2\baselineskip}

length \foo will not be influenced by the change of fontsize. So using option fontsize inside the document (or even in the document preamble) is not the exactly the same like using 10pt, 11pt, 12pt or fontsize as optional argument of \documentclass. It is only more or less close to it.

9

A ConTeXt solution:

  • If you want the footnotes, headers and footers, etc in the first page to correspond to 10pt and rest of the document to correspond to 12pt:
\setupbodyfont[10pt]
\starttext
Abstract
\page
\setupbodyfont[12pt]
....
\stoptext
  • If you want all the footnotes, headers and footnotes, etc. to correspond to 12pt font size
\setupbodyfont[12pt]
\starttext
\start
\switchtobodyfont[10pt]
Abstract: ...
\stop
\page
Rest of the document
\stoptext
4

If the normal size is 12pt, the text enclosed in the group will be in 10pt. The text size of the header and the footer will keep unaltered.

\begingroup
\footnotesize
\input{first_page_content.tex}
\endgroup
\clearpage
3

An easy way would be to create a 10pt document for the summary and include its pdf output within the 12pt document. You could use the pdfpages package for that purpose.

If you really wish to use just one document, you could redefine \normalsize and all the other size macros like \footnotesize, \scriptsize etc. you can find the definition inside the .clo files like size10.clo.

But I would choose the easier way, splitting the document code.

You must log in to answer this question.