我有以下一段代码
\begin{tikzpicture}
[mainbullet/.style={rectangle, minimum size=0.3cm,draw=orange!100, fill=orange!100,thick}, %
maintitle/.style={rectangle,opacity= 0.5}, %
date/.style={black, opacity=0.5}]
\tikz[baseline=(experiencetitle.base)]{%
\node[mainbullet] (experiencebullet) at (0,-23) {}; %
\node[maintitle](experiencetitle)[right =10mm of experiencebullet]{Experience};
\node(experiencedesc1)[below= 5mm of experiencetitle] {Experience};
\node[date](date1)[left=15mm of experiencedesc1]{1999-2000};}
\end{tikzpicture}
\end{document}
我希望experiencetitle
和experiencebullet
在其基线上对齐。上面显示的代码似乎根据矩形中心(节点experiencebullet
)而不是其基线对齐它们,我不明白为什么。
有人可以提示我哪里犯了错误吗?
答案1
这是你想要的吗?
\begin{tikzpicture}
[mainbullet/.style={rectangle, minimum size=0.3cm, draw=orange!100, fill=orange!100, thick},
maintitle/.style={rectangle, opacity=0.5}]
\node[mainbullet] (experiencebullet) at (0, -23) {};
\node[maintitle] (experiencetitle) [right=10mm of experiencebullet.south east, anchor=base west] {Experience};
\draw (experiencebullet.south east) -- +(10mm, 0);
\end{tikzpicture}