How do I create a new sizing command command, \semiHuge
, that is defined as being the size that lies between \huge
and \Huge
?
[Tex/LaTex] Obtain the size between \huge and \Huge
fontsize
fontsize
How do I create a new sizing command command, \semiHuge
, that is defined as being the size that lies between \huge
and \Huge
?
Best Answer
The standard LaTeX document classes --
article
,report
, andbook
-- provide the following definitions of the directives\huge
and\Huge
:If the main font size is either
10pt
or11pt
,and if the main font size is
12pt
, one findsi.e., there's no difference between
\huge
and\Huge
in this case.Next, in the file
latex.ltx
(which contains the "LaTeX kernel"), one finds the following definitions of\@xxpt
and\@xxvpt
:The geometric mean of 20.74 and 24.88 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.)Thus, if you use either
10pt
or11pt
as the size of the main text font, and if you use a font that's freely scalable, you could include the following instructions in your document's preamble to set up the directive\semiHuge
: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, e.g.,
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\semiHuge
. For a main text font size ("\normalsize
") of10pt
, LaTeX sets the ratio of adjoining font sizes --\normalsize
,\large
,\Large
,\LARGE
,\huge
, and\Huge
-- is exactly 1.2. In addition, in LaTeX the exact font size for11pt
is not11.00
but10.95
, i.e., the geometric mean of10
and12
. 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
.Left as an exercise for the reader: Design macros named
\semiLarge
,\semiLARGE
, and\semihuge
. :-)