테이블 필드에 채워진 원

테이블 필드에 채워진 원

현재 나는 비머를 사용하고 있으며 프레임에 테이블이 있습니다. 이 색상으로 채워진 원을 놓는 곳에서 테이블이 부서지는 것을 제외하고는 모든 것이 잘 작동하지만 테이블 왼쪽과 오른쪽이 아닌 테이블 필드 바로 안에 원을 두고 싶습니다. 내가 무슨 말을 하는지 알면 말이에요.

\documentclass[leqno,8pt,fleqn,table]{beamer}
\usepackage{tikz}
\usetikzlibrary{matrix}

\tikzset{
table/.style={
    matrix of nodes,
    row sep=-\pgflinewidth,
    column sep=-\pgflinewidth,
    nodes={
        rectangle,
        draw=black,
        align=center,
               },
                    %baseline={([yshift=-0.5ex]current bounding box.center)},
    minimum height=1.5em,
    text depth=0.5em,
    text height=1em,
            text centered,
    nodes in empty cells,
    %%
                            row 1/.style={
        nodes={
            fill=black,
            text=white,
            %font=\bfseries
        }
    },
            rows/.style={nodes={fill=gray!10}},
            columns/.style={nodes={text width = 10em}},
            %myrowstyle/.style={
                %row #1/.style={nodes={fill=gray!10}}
    %},
   }
}

\begin{document}
\begin{frame}
\begin{center}
\begin{tiny}
    \begin{tikzpicture}
    \matrix[table, rows={2,...,3}{fill=grey!10}, columns={1,...,5}{text width = 10em}, ampersand replacement=\&] (first)
    { 
        card \# \& date \& 1 \& 2 \& 3 \\
        ghul \& 01.01.2016 \& \fill[green] (1,0) circle (0.05); \& \fill[red] (1,0) circle (0.05); \& \fill[red] (1,0) circle (0.05); \\
};
\end{tikzpicture}
\end{tiny}
%\vspace{4mm}
\end{center}
\end{frame}
\end{document}

답변1

(first-2-3), (first-2-4)및 내부에 녹색 및 빨간색 원이 필요하다는 것을 이해합니다 (first-2-5). 여기서는 행렬 내부의 2행 번호와 3,4,5열 번호를 나타냅니다 first. 여기에는 해결책이 있습니다.

\documentclass[leqno,8pt,fleqn,table]{beamer}
\usepackage{tikz}
\usetikzlibrary{matrix,shadings}

\def\r{0.1}

\tikzset{
    table/.style={
        matrix of nodes,
        row sep=-\pgflinewidth,
        column sep=-\pgflinewidth,
        nodes={
            rectangle,
            draw=black,
            align=center,
                   },
                        %baseline={([yshift=-0.5ex]current bounding box.center)},
        minimum height=1.5em,
        text depth=0.5em,
        text height=1em,
                text centered,
        nodes in empty cells,
%%
                                row 1/.style={
            nodes={
                fill=black,
                text=white,
                %font=\bfseries
            }
        },
                rows/.style={nodes={fill=gray!10}},
                columns/.style={nodes={text width = 10em}},
                %myrowstyle/.style={
                    %row #1/.style={nodes={fill=gray!10}}
        %},
    }
}

\begin{document}
\begin{frame}
\begin{center}
\begin{tiny}
    \begin{tikzpicture}
    \matrix[table, rows={2,...,3}{fill=grey!10}, columns={1,...,5}{text width = 10em}, ampersand replacement=\&] (first)
    { 
        card \# \& date \& 1 \& 2 \& 3 \\
        ghul \& 01.01.2016 \&  \&  \&  \\
};

\fill[left color=green,right color=red] (first-2-3) circle (\r);
\fill[red] (first-2-4) circle (\r);
\fill[red] (first-2-5) circle (\r);

\end{tikzpicture}
\end{tiny}
%\vspace{4mm}
\end{center}
\end{frame}
\end{document}

산출

여기에 이미지 설명을 입력하세요

관련 정보