I want some rectangles that are adjacent to each other in a line. Almost got it, but the rectangles have borders which touch, and I want the borders to overlap. Is there a way to do this?
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
%%%<
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%
%%%>
\title{boxes1}
\tikzset{
>=latex,
font=\sffamily
}
\begin{document}
\begin{tikzpicture}
\coordinate (pen) at (0,0);
\foreach \x [count = \xi] in {0.1,0.2,0.1,0.1}
{
\node[rectangle, thin, draw, anchor=west, minimum width=\x*3 cm](rnode)at (pen) {\xi} ;
\coordinate (pen) at (rnode.east);
}
\end{tikzpicture}
\end{document}

\begin{document} \begin{tikzpicture}[ font = \sffamily, node distance = 0pt, start chain = going right, boxes/.style = {draw, thin, outer sep=0pt, on chain} ] \foreach \x [count = \xi] in {0.1,0.2,0.1,0.1} {\node[boxes,minimum width=\x*3 cm] {\xi};} \end{tikzpicture} \end{document}`, which also solve your problem.
– Zarko Jan 08 '17 at 17:33