I'm using \marginpar
and \captionof
to have figures appearing in the margins of my documents, including figure captions. This works well. But now I want to change to font size of the captions appearing in the margins (including the "Figure 1" text), but not the captions of the figures appearing in the main body (Figure 2).
How can I achieve this?
\documentclass[a4paper]{article}\usepackage[demo]{graphicx}\usepackage{caption,lipsum}\begin{document}\section{Introduction}\lipsum[1]\marginpar{ \includegraphics[width=\marginparwidth]{demo.pdf} \captionof{figure}{Change this.}}\lipsum[1]\begin{figure}[h]\centering \includegraphics[scale=1]{}\caption{Not change this.}\end{figure}\end{document}