I'd like to number figures in a custom way.
For example: fig. 1, fig. 2a, fig. 2b, fig. 3 (among figures there is text).
\documentclass[10pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pgfplots}
\begin{document}
Bla bla bla
\begin{figure}[h]
\centering
\begin{center}
\begin{tikzpicture}
\draw (0,0) circle (1cm);
\end{tikzpicture}
\end{center}
\caption{Es.}
\end{figure}
Bla bla bla
\begin{figure}[h]
\centering
\begin{center}
\begin{tikzpicture}
\draw (0,0) circle (1cm);
\end{tikzpicture}
\end{center}
\caption{Es.}
\end{figure}
bla bla
\begin{figure}[h]
\centering
\begin{center}
\begin{tikzpicture}
\draw (0,0) circle (1cm);
\end{tikzpicture}
\end{center}
\caption{Es.}
\end{figure}
bla
\begin{figure}[h]
\centering
\begin{center}
\begin{tikzpicture}
\draw (0,0) circle (1cm);
\end{tikzpicture}
\end{center}
\caption{Es.}
\end{figure}
\end{document}
Thank you so much for your time.
Best Answer
As mentioned in the comments, to change the caption name ("Figure ") you can just use
To customize the counter, you have to redefine
\thefigure
. If you want to manually choose the counter every time, just write something likebefore each figure. The default implementation of
\thefigure
uses an automatically incrementing counter:where
figure
is a counter, see for example this. Note that you have to revert the\thefigure
command to the default value if you want to stop customizing your labels and get an automatically incrementing counter again. You can use\setcounter{\thefigure}{2}
to set the value of the counter.