1

I'm making a poster in tikzposter, and I would like to have a figure with caption, but without label (i.e, I don't want the caption to start with "Figure 1: ...").

I'm using tikzfigure like so:

\begin{tikzfigure}[Caption goes here]
    \centering
    \includegraphics[width=0.08\textwidth]{image.png}
\end{tikzfigure}

which works except that the caption includes the label. Is there a way to remove the label?

1 Answer 1

2

The tikzfigure environment is defined as:

\newenvironment{tikzfigure}[1][]{
  \def \rememberparameter{#1}
  \vspace{10pt}
  \refstepcounter{figurecounter}
  \begin{center}
  }{
    \ifx\rememberparameter\@empty
    \else %nothing
    \\[10pt]
    {\small Fig.~\thefigurecounter: \rememberparameter}
    \fi
  \end{center}
}

Therefor you could try to place something like the following code in you preamble:

\makeatletter
\renewenvironment{tikzfigure}[1][]{
  \def \rememberparameter{#1}
  \vspace{10pt}
  \refstepcounter{figurecounter}
  \begin{center}
  }{
    \ifx\rememberparameter\@empty
    \else %nothing
    \\[10pt]
    {\small \rememberparameter}
    \fi
  \end{center}
}
\makeatother
3
  • 1
    That worked, I just had to change \newenvironment to \renewenvironment. Many thanks! I'll edit and accept your answer.
    – Tor
    Apr 17, 2023 at 5:29
  • Oops, has to be \renewenvironment of course. Glad it worked!
    – DG'
    Apr 17, 2023 at 5:46
  • I edited your answer, but my edit will apparently not be visible to other people until it has been "approved by trusted community members".
    – Tor
    Apr 17, 2023 at 5:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .