I am trying to identify whether the current font size is small
.
So here is a MWE of what I am trying to do
\documentclass{article}
\usepackage{ifthen}
\begin{document}
\makeatletter
\ifthenelse{\f@size = 9}{the size is 9}{the size is not 9}
\makeatother
\makeatletter
\small
\ifthenelse{\f@size = 9}{the size is 9}{the size is not 9}
\makeatother
\makeatletter
\ifthenelse{\f@size = {\small \f@size} }{the size is small}{the size is not small}
\makeatother
\end{document}
Well my desired output would be something like
but somehow {\small \f@size}
is not "expanded" as a number, which actually is. Thanks for help. 🙂
Best Answer
Is this what you have in mind? The
\definesizecommand
macro is able to define a command that behaves differently in the various sizes. This command can also have arguments, as shown by\baz
.A different version without loading
relsize
, but exploiting\@currsize
: