
이 파일의 문제점은 무엇입니까?
\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}
컴파일러는 말한다
./mini.tex:16: Undefined control sequence.
<argument> \pgf@matrix@last@nextcell@options
답변1
exsheets
환경 본문을 question
인수로 읽으므로 을 사용할 수 없지만 &
을 사용할 수 있습니다 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}