![为什么 `\\` 在 TikZ 中不会生成换行符?](https://linux22.com/image/291244/%E4%B8%BA%E4%BB%80%E4%B9%88%20%60%5C%5C%60%20%E5%9C%A8%20TikZ%20%E4%B8%AD%E4%B8%8D%E4%BC%9A%E7%94%9F%E6%88%90%E6%8D%A2%E8%A1%8C%E7%AC%A6%EF%BC%9F.png)
此代码
\tikz \graph [layered layout] {
"I want newline after comma:" -> "Hello,\\ World.";
};
只是去掉了下面“World”中的“,”和“W”之间的空格:
为什么它不换行?
答案1
尝试这个
\tikz [text centered] \graph [layered layout, nodes = {align=center}] {
"I want newline after comma:" -> "Hello,\\World.";
};