Obtain the size between \huge and \Huge

How do I create a new sizing command command, \semiHuge, that is defined as being the size that lies between \huge and \Huge?

-

The standard LaTeX document classes (article, report, and book) provide the following definitions for \huge and \Huge:

• If the main font size is either 10pt or 11pt,

\newcommand\huge{\@setfontsize\huge\@xxpt{25}}
\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}

• and if the main font size is 12pt, one finds

\newcommand\huge{\@setfontsize\huge\@xxvpt{30}}
\let\Huge=\huge


i.e., there's no difference between \huge and \Huge in this case.

Next, in the file latex.ltx, one finds the following definitions:

 \def\@xxpt{20.74}
\def\@xxvpt{24.88}


The geometric mean of these two numbers is 22.72, and the geometric mean of 25 and 30 -- the baseline distances in effect for \huge and \Huge -- is 27.38. (See below for an explanation of why I choose the geometric mean of the two numbers, rather than some other intermediate point.)

Thus, if you use either 10pt or 11pt as the main text font size, and if you use a font that's freely scalable, you could include the following in your document's preamble:

\makeatletter
\newcommand\semiHuge{\@setfontsize\semiHuge{22.72}{27.38}}}
\makeatother


This method of defining \@setfontsize is (marginally) safer than the more direct definition, viz., \newcommand\semiHuge{\fontsize{22.72}{27.38}\selectfont}, because \@setfontsize takes care not to mess with math font sizes.

Putting all this into an MWE,

\RequirePackage{fix-cm}
\documentclass{article}
\makeatletter
\newcommand\semiHuge{\@setfontsize\semiHuge{22.72}{27.38}}
\makeatother
\begin{document}
\huge The quick huge fox jumps \ldots

\semiHuge The quick semiHuge fox jumps \ldots

\Huge The quick Huge fox jumps \ldots
\end{document}


one gets:

Lastly, you may ask why I take the geometric mean of the \huge and \Huge font sizes to arrive at the font size for \semi-Huge. For a main text font size ("\normalsize") of 10pt, LaTeX sets the ratio of adjoining font sizes from \normalsize, \large, \Large, \LARGE, \huge, and \Huge to exactly 1.2. In addition, in LaTeX the exact font size for 11pt -- "halfway" between 10pt and 12pt, right? -- is not 11.00 but 10.95, i.e., the geometric mean of 10 and 12. LaTeX's evident preference for keeping relative font sizes in tidy geometric progressions is what swayed me to go with the geometric mean of the sizes for \huge and \Huge to obtain the size for \semiHuge.

-
Unless you load fix-cm or type1cm or use scalable fonts, a font size of 22.72 is not available, LaTeX will warn you that it is switching to size 20.74 so your semiHuge and huge only differ in baselineskip, not in font size. LaTeX Font Warning: Font shape OT1/cmr/m/n' in size <22.72> not available (Font) size <20.74> substituted on input line 8. –  David Carlisle Mar 16 '12 at 9:23
@DavidCarlisle -- let me add the \RequirePackage{fix-cm}` instruction. –  Mico Mar 16 '12 at 13:11