I'm trying to set the font size smaller in the legends for all of my figures and tables. The way I was trying to do this was using \AtBeginEnvironment but that doesn't seem to do anything at all. This is a minimal example of what is failing:
\documentclass[a4paper, 12pt]{report}
\usepackage{etoolbox}
\usepackage{relsize}
\AtBeginEnvironment{figure}{\smaller}
\begin{document}
\begin{figure}
\caption{whatever}
Text
\end{figure}
Outside text
\end{document}
Now that should, I think, make 'Text' appear smaller than 'Outside text' exactly as it would if you put the \smaller inside the figure environment. But it doesn't. I tried using the floatrow package instead but it messes up the ordering of the figure caption and the legend text and \captionsetup will only alter the caption itself not the legend text.
Any help? Why does \AtBeginEnvironment not work?
