在下面的代码中,如何增加节点中的行距?
\documentclass{book}
\usepackage{lipsum}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[overlay,remember picture]
\node (example-align) [draw,align=left,text width=8cm] at (5,-5) {\lipsum[1]};
\end{tikzpicture}
\end{document}
答案1
\baselineskip
您可以在节点内部定义:
% arara: pdflatex
\documentclass{book}
\usepackage{lipsum}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[overlay,remember picture]
\node (1) [draw,align=left,text width=2cm, anchor=north] at (1,0) {\baselineskip=10pt\lipsum[1]};
\node (2) [draw,align=left,text width=2cm, anchor=north] at (4,0) {\baselineskip=12.5pt\lipsum[1]};
\node (3) [draw,align=left,text width=2cm, anchor=north] at (7,0) {\baselineskip=15pt\lipsum[1]};
\end{tikzpicture}
\end{document}