2

Using a TikZ matrix in a TikZPoster does not work.

Here is an MWE:

\documentclass{tikzposter}
\usetikzlibrary{matrix}

\begin{document}
\block{Some title}{
    \begin{tikzpicture}
        \matrix [matrix of nodes] {
            A & B \\
        };
    \end{tikzpicture}
}
\end{document}

It gives the error

! Undefined control sequence.
<argument> \pgf@matrix@last@nextcell@options 

Any suggestions for a workaround?

4

You have to use ampersand replacement=\& as argument for tikzpicture and replace all & with \&

MWE

\documentclass{tikzposter}
\usetikzlibrary{matrix}

\begin{document}
\block{Some title}{%
    \begin{tikzpicture}[ampersand replacement=\&]
        \matrix [matrix of nodes] {
            A \& B \\
        };
    \end{tikzpicture}
}
\end{document} 

Output

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.