[Tex/LaTex] font size selection how multiple of \normalsize

fontsize

is possible make a command like this?

\fontsize{2\normalsize}{2\normalsize}\selectfont

Best Answer

Your request isn't directly possible. The command \normalsize isn't a dimension, but a command that performs several actions.

Of course the command \normalsize depends on the font size. But it also depends on the class. The standard classes define the command related to the selected font size in the files size1X.clo. The X stands for

0 => 10pt
1 => 11pt
2 => 12pt

In the file size10.clo \normalsize is defined as

\renewcommand\normalsize{%
   \@setfontsize\normalsize\@xpt\@xiipt
   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
   \abovedisplayshortskip \z@ \@plus3\p@
   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}

where \@setfontsize\normalsize\@xpt\@xiipt means:

 \def\@xpt{10}
 \def\@xipt{10.95}
 \def\@xiipt{12}

\def\@setfontsize#1#2#3{\@nomath#1%
    \ifx\protect\@typeset@protect
      \let\@currsize#1%
    \fi
    \fontsize{#2}{#3}\selectfont}

To detect the current font size see How to display the font size in use in the final output

There you can find that the command \f@size represent the current font size. To save the standard font size use:

\edef\savefontsize{\f@size}

I can imagine the following example:

\documentclass{article}

\makeatletter
\begingroup
\normalsize
\xdef\doublesize{\noexpand\fontsize{\noexpand\numexpr2*\f@size\noexpand\relax pt}{\noexpand\dimexpr\f@baselineskip+\f@baselineskip\noexpand\relax}\noexpand\selectfont}
\endgroup


\begin{document}
Text Text

\doublesize Text Text
\end{document}
Related Question