[Tex/LaTex] How to turn off drawing node border in PGF

nodestikz-pgf

I'm trying to create a picture for Instant Insanity problem. Here is my following code:

\begin{tikzpicture}
\matrix[nodes=draw]
{
; & \node{\LARGE R}; & ; & ;\\
\node{\LARGE R}; & \node[draw=white]{\LARGE B}; & \node{\LARGE G}; & \node{\LARGE W};\\
; & \node{\LARGE R}; & ; & ;\\
};
\end{tikzpicture}

The problem is, the node containing B has relatively thick border. This is due to border overlapping by surrounding nodes. How can I turn off drawing borders of node containing B ?

Best Answer

I think you need to draw the lines manually:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\matrix(m)[matrix of nodes,nodes={minimum width=2em,font=\LARGE}]
{
  & R & & \\
R & B & G & W\\
  & R & & \\
};
\draw (m-3-2.south west) rectangle (m-1-2.north east);
\draw (m-2-1.south west) rectangle (m-2-4.north east);
\draw (m-2-3.south east) -- (m-2-3.north east);
\end{tikzpicture}
\end{document}

TikZ's matrix library is apparently necessary to access the nodes in a matrix.

Now you can take that and make it the replacement text of a macro so you won't have to type it over and over.