长表垂直居中

长表垂直居中

我正在排版一些分数介绍,并将以下内容作为长表内的一个单元格:

   $\vcenter{
       \begin{tikzpicture}[scale=0.5, .style={fontsize=\footnotesize}]
            \filldraw[fill=black!10!white, draw=black!70!white]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
            \filldraw[fill=white, draw=black!70!white, rotate=120]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
            \filldraw[fill=white, draw=black!70!white, rotate=240]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
        \end{tikzpicture}
        +
        \begin{tikzpicture}[scale=0.5, .style={fontsize=\footnotesize}]
            \filldraw[fill=white, draw=black!70!white]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
            \filldraw[fill=black!10!white, draw=black!70!white, rotate=120]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
            \filldraw[fill=black!10!white, draw=black!70!white, rotate=240]
               (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
        \end{tikzpicture}
        =
        \begin{tikzpicture}[scale=0.5, .style={fontsize=\footnotesize}]
            \filldraw[fill=black!10!white, draw=black!70!white]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
            \filldraw[fill=black!10!white, draw=black!70!white, rotate=120]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
            \filldraw[fill=black!10!white, draw=black!70!white, rotate=240]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
        \end{tikzpicture}
        }$

我希望“+”和“=”相对于 TikZ 图片垂直居中。但事实并非如此,我不明白为什么。

答案1

由于您使用 TikZ,因此您可以使用\matrix

\documentclass{article}
\usepackage{longtable}
\usepackage{array}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{longtable}{m{5cm}m{5cm}}
\begin{tikzpicture}
  \matrix { 
    \filldraw[fill=black!10!white, draw=black!70!white,scale=0.5]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
      \filldraw[fill=white, draw=black!70!white, rotate=120,scale=0.5]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
      \filldraw[fill=white, draw=black!70!white, rotate=240,scale=0.5]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle; &
    \node {$+$}; &
    \filldraw[fill=white, draw=black!70!white,scale=0.5]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
      \filldraw[fill=black!10!white, draw=black!70!white, rotate=120,scale=0.5]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
      \filldraw[fill=black!10!white, draw=black!70!white, rotate=240,scale=0.5]
               (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle; &
    \node {$=$}; &
    \filldraw[fill=black!10!white, draw=black!70!white,scale=0.5]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
      \filldraw[fill=black!10!white, draw=black!70!white, rotate=120,scale=0.5]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
      \filldraw[fill=black!10!white, draw=black!70!white, rotate=240,scale=0.5]
                (0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle; \\
    };  
  \end{tikzpicture} & Another cell
\end{longtable}
\end{document}

在此处输入图片描述

相关内容