[Tex/LaTex] TikZ pictures does not appear in poster

graphicsposterstikz-pgf

I'm making a poster with LaTeX using the template available here http://www.damtp.cam.ac.uk/user/eglen/damtp/cuposter/.

For some reason, images created using TikZ do not appear in the poster. It compiles just fine, and other images added using \includegraphics{} appear. Here is, what seems to me a relevant portion of the code. The same piece of code, along with the initial TikZ includes and definitions worked fine in the LNCS template. Please let me know if I can add anything more informative.

\documentclass[noback]{cuposter}

\usepackage{mathptmx}
\usepackage{xspace}
\usepackage{amsmath}
\usepackage{pifont}
\usepackage{psfrag}
\usepackage{graphicx}
\usepackage{wrapfig}

% Tikz stuff
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{positioning}
\usetikzlibrary{fit,chains}

\tikzset{latent/.style={circle,fill=white,draw=black,inner sep=1pt, 
minimum size=20pt, font=\fontsize{10}{10}\selectfont},
obs/.style={latent,fill=gray!25},
const/.style={rectangle, inner sep=0pt},
factor/.style={rectangle, fill=black,minimum size=5pt, inner sep=0pt},
>={triangle 45}}

\pgfdeclarelayer{b}
\pgfdeclarelayer{f}
\pgfsetlayers{b,main,f}

% shapename, fitlist, caption, pos
\newcommand{\plate}[4]{
\begin{pgfonlayer}{b}
    \node (invis#1) [draw, color=white, inner sep=2pt,rectangle, fit=#2] {};
\end{pgfonlayer}

\begin{pgfonlayer}{f}
    \node (#1) [draw,inner sep=0pt, rectangle,fit=(invis#1),#3,#4] {};
\end{pgfonlayer}
}

\begin{document}

.
.
.

\begin{figure}
    \begin{center}
        \begin{tikzpicture}
    \node [matrix,matrix anchor=mid, column sep=5pt, row sep=20pt] {
    % hidden layer
    \node (inv) [draw=none] {}; &
    \node (inv) [draw=none] {}; &
    \node (inv) [draw=none] {}; &
    \node (h1) [latent] {$h_1$}; &
    \node (h2) [latent] {$h_2$}; &
    \node (hlabel) [draw=none] {$\mathbf{h}$};
    \\

    % visible layer
    \node (inv) [draw=none] {}; &
    \node (inv) [draw=none] {}; &
    \node (x1) [latent] {$v_1$}; &
    \node (x2) [latent] {$v_2$}; &
    \node (x3) [latent] {$v_3$}; &
    \node (x4) [latent] {$v_4$}; &
    \node (xlabel) [draw=none] {$\mathbf{v}$}; &        
    \node (inv) [draw=none] {}; &       
    \\
    };

    % connections
    \draw [-] (x1) -- node [left=2pt] {} (h1);
    \draw [-] (x1) -- node [left=2pt] {} (h2);
    \draw [-] (x2) -- node [left=2pt] {} (h1);
    \draw [-] (x2) -- node [left=2pt] {} (h2);
    \draw [-] (x3) -- node [left=2pt] {} (h1);
    \draw [-] (x3) -- node [left=2pt] {} (h2);
    \draw [-] (x4) -- node [left=2pt] {} (h1);
    \draw [-] (x4) -- node [right=2pt] {W} (h2);
    \end{tikzpicture}
    \end{center}
\caption{A simple Restricted Boltzmann Machine with four visible, two hidden, and no bias units.}
\label{fig:rbm}
\end{figure}

.
.
.

\end{document}

Thanks!

Best Answer

The cuposter class does not allow the usage of floating environments like figure or table.

Remove the figure environment and your picture appears.