How do I get `\captionof`s to be colored, when in `\makenote`s?
\makenote*
redefines \color
to do nothing and so the internal code of captions can't change the color. You can use another command but be aware that \makenote*
has perhaps a reason for the redefinition: It is quite possible that the blue color leaks out.
\documentclass[]{scrbook}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{caption}%
\captionsetup{compatibility=false}%
\usepackage{scrlayer-scrpage}
\usepackage{scrlayer-notecolumn} %must be loaded ``Lastest''
\RedeclareNoteColumn[font = \color{blue}]{marginpar} %default
\let\mycolorcommand\color
\DeclareCaptionFont{bluecaptionfont}{\mycolorcommand{blue}}
\captionsetup{font={bluecaptionfont}, labelfont=bluecaptionfont}
\begin{document}
here is the main text
\makenote*{
\includegraphics[width=3cm]{example-grid-100x100pt}
\captionof{figure}{This should be blue}
}
\begin{minipage}{0.5\textwidth}
\includegraphics[width=8cm]{example-grid-100x100pt}
\tracingmacros=1 \captionof{figure}{Normal captionof's are blue}
\end{minipage}
\makenote*{
Normal notes are blue
}
\end{document}
A perhaps safer alternative is to locally redefine \normalcolor
. Then caption can't reset the color and the color in the note wins:
\makenote*{
\includegraphics[width=3cm]{example-grid-100x100pt}
\let\normalcolor\relax
\captionof{figure}{This should be blue}
}