梅威瑟:
%! TEX program = lualatex
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{
graphs,
graphdrawing,
positioning,
quotes,
}
\usegdlibrary{trees}
\begin{document}
\begin{tikzpicture}
\graph [
tree layout,
edge quotes center,
edges={nodes={fill=white}},
level distance=30mm,
] {
a ->["first line\\second line"] b ->["y"] c ->["z"] d; };
\end{tikzpicture}
\end{document}
返回
quotes
如您所见,换行符被忽略了。使用 tikzlibrary在边缘标签中使用换行符时,我需要做什么?