我需要“节点”命令内的文本自动在文档边缘中断并转换到下一行,就像在 tikzpicture 之外一样。
\documentclass
[%
border=10mm,
varwidth=100mm
] {standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\path node
{%
one two three four five six seven eight nine ten eleven twelve thirteen fourteen
};
\end{tikzpicture}
\end{document}
期望的结果:
答案1
您只需使用一个小页面即可:
\documentclass
[%
border=10mm,
varwidth=100mm
] {standalone}
\usepackage{tikz}
\begin{document}
\noindent\begin{tikzpicture}[inner sep=0]
\path node
{%
\begin{minipage}{\linewidth}
one two three four five six seven eight nine ten eleven twelve thirteen fourteen
\end{minipage}%
};
\end{tikzpicture}
\end{document}
“inner sep=0”选项可以避免hbox过满。