For my thesis, I often need to write blocks attached to each other. More explicitely, I want to have blocks as in page 13 of http://eprint.iacr.org/2006/392.pdf.
EDIT: @morbusg. Is it possible to (easily?) fix the following (in order to get what we want)
\begin{figure}
\centerline{\vbox{%
\offinterlineskip % no lead between lines
\dimen0=4.5em % size of a square cell
\mathsurround0pt % precaution; although I've newer seen it used
\def\cr{\crcr\noalign{\hrule}} % put a rule between every row with \cr
\halign{&\vrule\hbox to\dimen0{$\vcenter to\dimen0{}\hfil\scriptstyle#\hfil$}\crcr
\omit& \omit& \multispan3\hrulefill\crcr\noalign{\kern-.4pt}
% ^omit drawing a box for the first two columns, then, span the next
% three columns drawing the "hat", and finally, back up the amount of
% the width of the rule so that the vertical and horizontal rules
% fit together.
\omit& \omit&\omit & W(-k-1,1) & W(-k,1) & W(-k+1,1) &\omit\vrule \cr
W(-k-4,0) & W(-k-3,0) & W(-k-2,0) & W(-k-1,0) & W(-k,0) & W(-k+1,0) & W(-k+2,0) & W(-k+3,0)&\omit\vrule \cr
}
}}
\caption{}
\end{figure}
And also
\begin{figure}[H]
\centerline{\vbox{%
\offinterlineskip % no lead between lines
\dimen0=5em % size of a square cell
\mathsurround0pt % precaution; although I've newer seen it used
\def\cr{\crcr\noalign{\hrule}} % put a rule between every row with \cr
\halign{&\vrule\hbox to\dimen0{$\vcenter to\dimen0{}\hfil\scriptstyle#\hfil$}\crcr
\omit& \omit& \multispan3\hrulefill\crcr\noalign{\kern-.4pt}
% ^omit drawing a box for the first two columns, then, span the next
% three columns drawing the "hat", and finally, back up the amount of
% the width of the rule so that the vertical and horizontal rules
% fit together.
\omit & W(k-1,2n+2) & W(k,2n+2) & W(k+1,2n+2) & ? &\omit\vrule \cr
? & W(k-1,2n+1) & W(k,2n+1) & W(k+1,2n+1) & ? &\omit\vrule \cr
? & W(k-1,2n) & W(k,2n) & W(k+1,2n) & ? &\omit\vrule \cr
? & W(k-1,2n-1) & W(k,2n-1) & W(k+1,2n-1) & ? &\omit\vrule \cr
}
}}
\label{Sdouble}
\end{figure}
xcoffins
.&
character is the column separator character. The\omit
omits the preamble definition taking place in the cell it is called in. The\multispan
takes a number as its first argument which tells how many columns it ought to span, and the\hrulefill
fills the cell content with a rule (/line).