If I use this code,
\documentclass{article}
\usepackage{tikz}
\usepackage{multicol,float}
\usepackage{etoolbox}% provides \preto
\usetikzlibrary{shapes,backgrounds}
\tikzset{
every node/.style={midway},
every path/.style={fill=yellow},
mid/.style={midway, inner sep=2pt, outer sep=0,minimum size=1mm, fill=yellow,node on layer=foreground},
}
\begin{document}
\begin{figure}[H]
\begin{tikzpicture}[scale = 4]
\draw (0.445041,0.801937) rectangle (0,1) node[mid] {$1$};
\draw (0.692021,0.356896) rectangle (1,1) node[mid] {$2$};
\draw (0.692021,0.356895) rectangle (0,0) node[mid] {$3$};
\draw (0.137063,0.158832) rectangle (0,1) node[mid] {$4$};
\draw (0.384043,0.713791) rectangle (1,0) node[mid] {$5$};
\draw (0.829084,0.515727) rectangle (0,1) node[mid] {$6$};
\draw (0.521105,0.872622) rectangle (0,0) node[mid] {$7$};
\end{tikzpicture}
\centering
\caption{M1}
\end{figure}
\end{document}
the result as for the caption is "Figure 1: M1". Is it possible to change it
to just "M1"?
Best Answer
Three options; the first two, loading the
caption
package, and the third one with no packages:Use
\caption*
:Declare the
labelformat
asempty
using a local\captionsetup
:Don't use
\caption
at all; simply place the text:In this last case, if you don't want flotation, you could also simply use a
minipage
with centered content: