This question already has an answer here:

I'd like to write a conditional based on the current font size in LaTeX, but I can't seem to find (via search engines, including in this site) a simple way to access the actual font size.

In pseudo-code, what I'm looking for would be like

\ifthenelse{\equals{\thefontsize}{12}}{do something}{do something else}

But I can't seem to get a hold on a variable that actually does contain the font size (e.g. 12 or 12pt). Is there a simple one available? (ideally a non '@' one)

marked as duplicate by TeXnician, Ulrike Fischer, Community Aug 22 '17 at 10:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    What about \f@size?! – TeXnician Aug 22 '17 at 10:16
  • @TeXnician That's actually perfect! (even if it has an @) and better than what I had found in a related question in this StackExchange (which was less direct) – Dalker Aug 22 '17 at 10:18
  • @TeXnician The question you pointed to actually does contain the answer (within the question itself). Marking this one as duplicate will indeed redirect people searching with the tags "fontsize" and "conditional" to that one, which solves the question. – Dalker Aug 22 '17 at 10:21