There are a lot of results for "setting" the font size, but I can't find one how to "get" them.

Here's some code from What point (pt) font size are \Large etc.? I can use to check what font size for \normalsize, \large, etc.


\newcommand\thefontsize[1]{{#1 The current font size is: \f@size pt\par}}





But \thefontsize\section doesn't work...

Could anyone help me how to get it?

  • You can also "get" them by looking at the respective sectioning commands in the document class (and associated font size files, like *.clo).
    – Werner
    Commented Jul 23, 2013 at 18:13

2 Answers 2


You can do a similar thing by putting the \thefontsize command inside the argument of the sectioning command. In this case the command doesn't need to take an argument. (If you want to use the same command as in your code above, just type \thefontsize{} instead.

\newcommand\thefontsize{The current font size is: \f@size pt}

output of code


A variation on Alan's answer can show you also all font attributes:



enter image description here

What's the trick? It uses rather low level functionality of TeX; actually all control sequences in


are primitives of TeX. The primitive \font is used for assigning a name to a font loading its metric file, but it can follow \the (see The \the command) and, in this case, it returns a control sequence corresponding to what's needed to use the current font (a low level command, not the high level \bfseries and siblings). For example, in the default setting and for normal text,


would return the control sequence \OT1/cmr/m/n/10 (that's not writable without special tricks). With \string we can print that control sequence, but we need to make \the act before \string does its job, so the need for \expandafter. I've used the T1 encoding in the example because in the OT1 encoding the slot normally allotted to the backslash is occupied by .

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .