有没有办法抑制此 tikz-node 中的第一行?这样文本就可以与 upper-boxframe 对齐。
\documentclass[margin=5mm]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[]
\node[text width = 5cm,draw=black, rounded corners=3pt, minimum width=1.5cm, minimum height=.3cm, anchor = west] at (7,7)
{\begin{tabbing}
\= \scriptsize \textbf{Topic} \qquad \qquad \qquad \= \scriptsize \textbf{Chapter} \\
\>\scriptsize \textbullet Topic A \> \scriptsize ref 1 \\
\>\scriptsize \textbullet Topic B\> \scriptsize ref 2 \\
\>\scriptsize \textbullet Topic C\> \scriptsize ref 3\\
\>\scriptsize \textbullet Topic D \> \scriptsize ref 4
\end{tabbing}
};
\end{tikzpicture}
\end{document}
谢谢,问候,菲尔
答案1
欢迎使用 TeX.SE!一种临时可能性是添加负垂直空间。(我已经看到它被使用了很长时间tabbing
,您是否坚持使用此选项?)
\documentclass[margin=5mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[]
\node[text width = 5cm,draw=black, rounded corners=3pt, minimum width=1.5cm, minimum height=.3cm, anchor = west] at (7,7)
{\vspace{-\baselineskip}\begin{tabbing}
\= \scriptsize \textbf{Topic} \qquad \qquad \qquad \= \scriptsize \textbf{Chapter} \\
\>\scriptsize \textbullet Topic A \> \scriptsize ref 1 \\
\>\scriptsize \textbullet Topic B\> \scriptsize ref 2 \\
\>\scriptsize \textbullet Topic C\> \scriptsize ref 3\\
\>\scriptsize \textbullet Topic D \> \scriptsize ref 4
\end{tabbing}
};
\end{tikzpicture}
\end{document}