I'm trying to use \AtBeginEnvironment{figure} to customize the font family and font size used in figures. However, it doesn't seem to have any effect. Here is a minimal example:
\documentclass{memoir}
\usepackage{etoolbox}
\makeatletter
\AtBeginEnvironment{figure}{%
\def\@floatboxreset{\reset@font\sffamily\tiny\@setminipage}%
\patchcmd{\@xfloat}{\normalsize}{\selectfont}{}{}
}
\makeatother
\begin{document}
\begin{figure}
% \tiny % this works
test
\end{figure}
\end{document}
Any ideas on what's happening here?
EDIT:
Forgot to mention that I'm using memoir. The solution found in another question works for setting the font family, but not the size.
\smallis the command to add, but the solution should be the same. If this helps you, please let us know so that we can close this question as duplicate; otherwise, please tell why the solution doesn't apply to your case. – egreg Apr 02 '13 at 15:42memoiris doing something here... – gablin Apr 02 '13 at 16:18\setfloatadjustment{figure}{\sffamily\tiny}. There is also\setfloatadjustment{table}{<code>}. – Audrey Apr 02 '13 at 16:24