2009/09/12

[TeX] 表格中畫刪除線

Credits goes to http://www.latex-community.org/forum

\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{matrix}

\begin{document}
  \begin{tikzpicture}
    \matrix (magic) [%
      matrix of nodes,
      nodes=draw,
      text width=5mm,
      text badly centered
    ] {%
      0 & 6 & 11 \\
      0 & 3 & 4 \\
      0 & 0 & 0 \\
    };
    \draw[thick,red] (magic-1-1.north) -- (magic-3-1.south);
    \draw[thick,red] (magic-3-1.west) -- (magic-3-3.east);
  \end{tikzpicture}
\end{document}

沒有留言: