![超出预期容量](https://linux22.com/image/431950/%E8%B6%85%E5%87%BA%E9%A2%84%E6%9C%9F%E5%AE%B9%E9%87%8F.png)
下面的代码给了我一个意外的容量超出错误,我不明白为什么......
\[\begin{tikzpicture}[xscale=5, yscale=5.5]
node (1) at (0,0){
$\begin{tikzpicture}[xscale=0.6, yscale=0.6]
\tikzset{morphlabel/.style={draw=black, thin, rectangle, minimum width=7pt, fill=white,
font=\scriptsize}}
\node[morphlabel] at (0, 0) {$a$};
\end{tikzpicture}$};
\end{tikzpicture}\]
让我感到很奇怪的是,我在其他地方使用几乎相同的代码,却没有收到任何错误消息?
答案1
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\newsavebox\mybox
\begin{lrbox}{\mybox}
\begin{tikzpicture}[]
\tikzset{morphlabel/.style={draw=black, thin, rectangle, minimum width=7pt, fill=white,
font=\scriptsize}}
\node[morphlabel] at (0,0) {$a$};
\end{tikzpicture}
\end{lrbox}
\begin{document}
\begin{tikzpicture}[]
\node (1) at (0,0){\usebox\mybox};
\end{tikzpicture}
\end{document}