TikZ 无法按预期工作

TikZ 无法按预期工作
\documentclass[border=2mm]{standalone} 
\usepackage{tikz} 
\usetikzlibrary{matrix}

\begin{document}
\begin{tikzpicture}[thick, scale=0.8]
    \node[draw]  (n1) at (0,0) {$a_0b_0$};
    \node[draw] (n2) at (2,0) {$a_1b_0$};
    \node[draw] (n3) at (4,0) {$a_2b_0$};

    \node[draw] (n4) at (0,2) {$a_0b_1$};        
    \node[draw] (n5) at (2,2) {$a_1b_1$};
    \node[draw] (n6) at (4,2) {$a_2b_1$};

    \node[draw] (n7) at (0,4) {$a_0b_2$};
    \node[draw] (n8) at (2,4) {$a_1b_2$};
    \node[draw] (n9) at (4,4) {$a_2b_2$};
    \draw [thick, <-] (5.2,0) -- (4.55,0);
    \draw [thick, <-] (0,5) -- (0,4.35);
    \node [right] at (5.2,0) {$A$};
    \node [above] at (0,5) {$B$};
    \draw (n1) edge[dashed] (n2);
    \draw (n2) edge[dashed] (n3);

    \draw (n4) edge[dashed] (n5);
    \draw (n5) edge[dashed] (n6);

    \draw (n7) edge[dashed] (n8);
    \draw (n8) edge[dashed] (n9);

    \draw (n1) edge[dashed] (n4);
    \draw (n4) edge[dashed] (n7);

    \draw (n2) edge[dashed] (n5);
    \draw (n5) edge[dashed] (n8);       

    \draw (n3) edge[dashed] (n6);
    \draw (n6) edge[dashed] (n9);
\end{tikzpicture}
\end{document}

对于此代码,当我运行 PdfLaTeX 时,它将所有内容都放在同一位置,没有任何间隙。可能是什么问题?

相关内容