# Defining variants of \small and \large that use \normalsize's line spacing

As a partial workaround for grid typesetting, I'd like to define variants of \small and \large that behave like their standard counterparts except that they use the line spacing of \normalsize. I know that I can look up the respective macro definitions for, e.g., the 10pt standard class option in size10.clo and accordingly define the new variants, e.g.,

\newcommand\largeVAR{\@setfontsize\largeVAR\@xiipt\@xiipt}


However, I'm looking for an automatic solution that works for all (possibly custom) .clo option files, i.e., one that dynamically adapts to the respective standard macro definitions.

Bonus points for a solution showing how to add starred macro versions (\small*, \large*).

• The solution to the grid problem, is hidden in the multicols package. Whatever you do it always balances the grid, even with oddly sized figures. Floats are the major culprits for breaking a grid. A better approach would be to redefine headers etc, to be in multiples of the baseline skip. – Yiannis Lazarides Dec 17 '11 at 15:33
• sorry not true. multicols doesn't do grids. All it does is trying to ensure that baselines at top and bottom of the columns agree. But depending on the spacing inside the column there may not be alignment elsewhere and definitely no alignment from page to page. – Frank Mittelbach Dec 17 '11 at 17:03

\documentclass[a4paper]{article}
\pagestyle{empty}
\usepackage{lipsum}
\makeatletter
\AtBeginDocument{\edef\@standardbaselineskip{\the\baselineskip}}
\let\@@small\small
\def\small{\@ifstar\s@small\@@small}
\def\s@small{\@@small\fontsize{\f@size}{\@standardbaselineskip}\selectfont}
\makeatother
\begin{document}
{\small\lipsum[2]}
{\small*\lipsum[2]}
\end{document}


It may work also for \large, but there's \lineskip to be taken into account. It definitely won't work for larger sizes than \large.

For \large the modification is similar:

\let\@@large\large
\def\large{\@ifstar\s@large\@@large}
\def\s@large{\@@large\fontsize{\f@size}{\@standardbaselineskip}\selectfont}


From my experiments, the baseline skip is uniform even between lines with descenders and lines with ascenders, with Computer Modern fonts. With other fonts it's not sure a priori. However I refuse to show the result, which is horrible. :)

• +1 for pointing me to \f@size. Am I right that this solution assumes (perhaps according to standard LaTeX convention) that \normalsize is in effect at the begin of the document body? – lockstep Dec 17 '11 at 15:10
• \normalsize is issued by \document, but before expanding the \AtBeginDocument tokens. That's why I put the definition of \@standardbaselineskip there. If this code comes after package loading, it should be safe. – egreg Dec 17 '11 at 15:16
• Re: horrible result: \large* is intendend for sectioning headings not exceeding one line. – lockstep Dec 17 '11 at 15:23
• @lockstep I heartfully hoped so. :) – egreg Dec 17 '11 at 15:27
• @egreg I don't see any advantages in simply doing \renewcommand\large{\@setfontsize\large\@xiipt{\the\baselineskip}}, am I missing something? – Yiannis Lazarides Dec 17 '11 at 15:28