This answer shows how to get the current font size, using \makeatletter\f@size\makeatother.
This answer shows how to parse and evaluate a mathematical expression before printing it, using for example \pgfmathparse{sin(60)}\pgfmathresult.
Now I want to combine both and set the font size for a section 1pt smaller than the current font size. This is what I have so far:
\documentclass[11pt]{article}
\usepackage{pgf}
\begin{document}
Before
\makeatletter\fontsize{\pgfmathparse{\f@size - 1}\pgfmathresult pt}{10pt}\selectfont\makeatother
After
\end{document}
I tried to place \makeatletter and \makeatother in different positions (because I don't really understand how they work) but I always get a Missing number, treated as zero error.
Any help is welcome!
PS: I found the package relsize, which does what I want, but I would still want to understand why what I wrote doesn't work.
