No se puede redefinir el comando de \figureformat (\figureformat indefinido)

No se puede redefinir el comando de \figureformat (\figureformat indefinido)

Quiero redefinir el \figureformat para personalizar la salida de los títulos de las figuras:

\renewcommand*{\figureformat}{\thefigure.\figurename}

Sin embargo, me da un error cuando compilo:

\figureformat undefined. \renewcommand*{\figureformat}

Aquí está el texto de prueba:

\documentclass[10pt,letterpaper]{article}

\renewcommand*{\figureformat}{\thefigure. \figurename}

\begin{document}

\begin{figure}[h]
\caption{{test}
\label{fig1}
\end{figure}

\end{document}

Estoy usando TeX Live 2013/W32TeX y TexStudio

Respuesta1

El comando que no puede redefinir solo lo proporcionan las clases KOMA. Para las clases estándar, el paquete captionresulta útil. Puede definir el formato de etiqueta solo para figuras, si lo desea. Las mesas seguirán igual.

leoCaptionFormat

\documentclass[10pt,letterpaper]{article}

\usepackage{caption}
\DeclareCaptionLabelFormat{figure}{\thefigure.\nobreakspace\figurename}
\captionsetup[figure]{labelformat=figure}
\begin{document}

\begin{figure}[h]
    \caption{figure caption}
    \label{fig1}
\end{figure}
\begin{table}[h]
    \caption{table caption}
\end{table}

\end{document}

información relacionada