通常我从未在 tikz 中遇到过换行问题。但这次出于某种我不知道的原因,tikz 不想给我换行。你知道是什么原因造成的吗?
\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\usetikzlibrary{shapes.callouts}
\begin{document}
\begin{tikzpicture}
\node[cloud callout, cloud puffs=10, aspect=4.5, cloud puff arc=70,
shading=ball, anchor=pointer] at (0,0) {
This is long text\\
One line isn't enough
};
\end{tikzpicture}
\end{document}
答案1
您可以align
使用\node
,
\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\usetikzlibrary{shapes.callouts}
\begin{document}
\begin{tikzpicture}
\node[cloud callout, cloud puffs=10, aspect=4.5, cloud puff arc=70,
shading=ball, anchor=pointer,align = left] at (0,0) {
This is long text\\
One line isn't enough
};
\end{tikzpicture}
\end{document}
left
或center
或right
。