我试图将垂直旋转的文本放在矩形内,但无法使其垂直居中。这是我的最小代码和我得到的结果。任何帮助都将不胜感激。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fit}
\begin{document}
\begin{tikzpicture}
\coordinate (dm1) at (0,3);
\coordinate (dm2) at (0,-3);
\node[rectangle,draw,minimum width=2cm,align=center] [fit = (dm1) (dm2)] (bx4) {\rotatebox{90}{\large Storage Advisor}};
\end{tikzpicture}
\end{document}]
答案1
再次单独绘制节点。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fit}
\begin{document}
\begin{tikzpicture}
\coordinate (dm1) at (0,3);
\coordinate (dm2) at (0,-3);
\node[rectangle,draw,minimum width=2cm] [fit = (dm1) (dm2)] (bx4) {};
\node[align=center,font=\large,rotate=90] at (bx4.center) {Storage Advisor};
\end{tikzpicture}
\end{document}