Skip to content

SX: \DeclareCaptionLabelFormat not working

https://tex.stackexchange.com/questions/520606/declarecaptionlabelformat-not-working

\documentclass{article}

\usepackage{caption}
\usepackage{float}

\floatstyle{plaintop}
\newfloat{graph}{tbph}{loh}
\floatname{graph}{Graph}

\DeclareCaptionLabelFormat{test}{#1 #2}
\captionsetup[graph]{labelformat=test}

\begin{document}
    \begin{graph}[h]
    \caption{Testing}
    \end{graph}
\end{document}