【发布时间】:2019-04-26 23:13:06
【问题描述】:
$F_1(g)=\left\{
\begin{tikzpicture}
\node[shape=circle,draw=black] (A) {$b^1_0$};
\end{tikzpicture} \right\}$
执行此代码,我有这样的输出Output
而且我希望括号中的内容更居中,就像我仍在书写而不是绘画一样。
【问题讨论】:
$F_1(g)=\left\{
\begin{tikzpicture}
\node[shape=circle,draw=black] (A) {$b^1_0$};
\end{tikzpicture} \right\}$
执行此代码,我有这样的输出Output
而且我希望括号中的内容更居中,就像我仍在书写而不是绘画一样。
【问题讨论】:
您必须将图片的基线更改为位于其中心,然后将该基线与文本的垂直中心对齐。这可以通过选项[baseline={([yshift=-.8ex]current bounding box.center)}] 来完成。我将它添加到您提供的示例代码中,并将circle 的inner sep 更改为0pt。让我知道这是否适合你。
$F_1(g)=\left\{
\begin{tikzpicture}[baseline={([yshift=-.8ex]current bounding box.center)}]
\node[shape=circle,draw=black, inner sep=0pt] (A) {$b^1_0$};
\end{tikzpicture} \right\}$
\end{document}
【讨论】: