# Scale figure inside tikzfigure environment in tikzposter class

I am trying to make my poster with the tikzposter class. I want to place a figure inside a block and I have to use the tikzpicture environment. But I can't scale the figure properly.

\documentclass[a0paper,landscape]{tikzposter}
\begin{document}
\begin{columns}
\column{0.25}
\block{Introduction}{
...blabla...
}
\column{0.5}
\block{Methods}{
\begin{tikzfigure}
\includegraphics[width=\columnwidth]{myfigure}
\end{tikzfigure}
}
\column{0.25}
\block{Results \& conclusions}{
...blabla...
}
\end{columns}
\end{document}


It appears that \columnwidth applies to the entire poster width and not to the column I am in, because my image spans the whole poster width. I don't like using pts or cms as width in \includegraphics', I would like to use some relative measure. how can I do that inside tikzfigure?

• Probably you should try \blockwidth instead? – JMP Apr 5 '16 at 8:39
• @JMP This is not a beamer class and, unfortunately, there is no \blockwidth (it is undefined) – fmonegaglia Apr 5 '16 at 8:53
• Strange, I can't get it running too, even though the tikzposter manual states: \blockwidth, \blockbodyheight, \blocktitleheight : Dimensions of the current block's components; it is redefined for each call to the \block command. – JMP Apr 5 '16 at 8:56
• Hey you're right, I didn't see that in the manual at first. Does not work though. – fmonegaglia Apr 5 '16 at 9:09

I can't access the defined widths of the blocks properly, but you can use \linewidth.

\documentclass[a0paper,landscape]{tikzposter}
\usepackage{graphicx}
\begin{document}
\begin{columns}
\column{0.25}
\block{Introduction}{
...blabla...
}
\column{0.5}
\block{Methods}{
\begin{tikzfigure}%
\includegraphics[width=\linewidth,draft]{Temp.png}%
\end{tikzfigure}
}
\column{0.25}
\block{Results \& conclusions}{
...blabla...
}
\end{columns}
\end{document}

• Thx! I just found out that \linewidth works as well. \columnwidth and \textwidth do not though – fmonegaglia Apr 5 '16 at 9:25
• You're right, \linewidth seems to be the better way. I changed the answer to incorporate \linewidth` – JMP Apr 5 '16 at 9:29