4

I'm trying to use the class tikzposter to write a scientific poster. I need to link the figures to my text, therefore I need to use \caption and \label commands. It seems impossible to use floating figures inside blocks (maybe they are also floating objects?). It is possible to avoid this problem (still use the caption command, without using a floating figure)?

Thank you very much for any help.

PS: This is the code that reproduce my problem.

\documentclass[25pt, a0paper, portrait, margin=0mm, innermargin=15mm,
     blockverticalspace=15mm, colspace=15mm, subcolspace=8mm]{tikzposter}

 \title{Title}
 \author{Name}
 \institute{University}

\usetheme{Default} % Default, Basic, Rays, Simple, Envelope, Wave, Board, Autumn, Desert
\usecolorstyle[colorPalette=BrownBlueOrange]{Germany}

\usepackage[version=3]{mhchem}

\usepackage{graphicx}

\begin{document}

\maketitle

\begin{columns}
    \column{.5}
    \block[roundedcorners=40]{Fist block}{
    Some text: bla, bla, bla.
    \begin{figure}
    \includegraphics{MyImage.pdf}
    \caption{}\label{}
    \end{figure}
    }

 \end{columns}

 \end{document}
3

You can load the capt-of or caption package, remove the figure environment (or replace it with e.g. center) and use \captionof{figure}{<caption text>}.

\documentclass[25pt, a0paper, portrait, margin=0mm, innermargin=15mm,
     blockverticalspace=15mm, colspace=15mm, subcolspace=8mm]{tikzposter}

 \title{Title}
 \author{Name}
 \institute{University}

\usetheme{Default} % Default, Basic, Rays, Simple, Envelope, Wave, Board, Autumn, Desert
\usecolorstyle[colorPalette=BrownBlueOrange]{Germany}

\usepackage[version=3]{mhchem}

\usepackage{graphicx}
\usepackage{capt-of}
\begin{document}

\maketitle

\begin{columns}
    \column{.5}
    \block[roundedcorners=40]{First block}{
    Some text: bla, bla, bla. See figure~\ref{fig:fog}.
    \begin{center}
    \includegraphics{example-image}
    \captionof{figure}{Figure caption.}\label{fig:fog}
    \end{center}
    }

 \end{columns}

 \end{document}

enter image description here

3

There is actually a built-in workaround, which is to use

\begin{tikzfigure}[Caption]%Figure environment does not work
 \label{test}
 \includegraphics[width=0.2\textwidth]{figure.pdf}
\end{tikzfigure}
2

Actually I think just embedding the label in the caption is sufficient:

\caption{ \label{figure} Caption ...}
  • 1
    This is rather a comment than an answer (I know, that you can't comment other posts right now) – user31729 Aug 21 '14 at 9:45
  • 1
    It would be better to expand your answer: for example you can check if the trick you were suggesting really works in a real document. If yes you can post the document in form of minimal working example. – Claudio Fiandrino Aug 21 '14 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy