
¿Cuál es el problema con este archivo?
\documentclass{article}
\usepackage{exsheets}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{question}
\begin{tikzpicture}
\matrix (magic) [matrix of nodes]
{
8 & 1 & 6 \\
3 & 5 & 7 \\
4 & 9 & 2 \\
};
\end{tikzpicture}
\end{question}
\end{document}
El compilador dice
./mini.tex:16: Undefined control sequence.
<argument> \pgf@matrix@last@nextcell@options
Respuesta1
exsheets
lee el cuerpo del question
entorno como argumento, por lo tanto no puedes usarlo &
, pero puedes usarlo ampersand replacement=\&
.
\documentclass{article}
\pagestyle{empty}% for cropping
\usepackage{exsheets}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{question}
\begin{tikzpicture}
\matrix (magic) [ampersand replacement=\&,matrix of nodes]
{
8 \& 1 \& 6 \\
3 \& 5 \& 7 \\
4 \& 9 \& 2 \\
};
\end{tikzpicture}
\end{question}
\end{document}