Skip to content

Instantly share code, notes, and snippets.

@ivand58
Last active January 19, 2018 08:33
Show Gist options
  • Save ivand58/4e0a5405284ad2a5b01c47f50f7c420e to your computer and use it in GitHub Desktop.
Save ivand58/4e0a5405284ad2a5b01c47f50f7c420e to your computer and use it in GitHub Desktop.
stack
\documentclass[border=2pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\newcounter{shifty} \setcounter{shifty}{0}
\foreach \n/\w in {A/1,B/2,A/1,A/1,B/2}{
\node[yshift=\theshifty cm,draw,minimum height=1cm,minimum width=\w cm,anchor=west,outer sep=0pt]{\n};
\draw[yshift=\theshifty cm,thick] (0,.6cm)--(0,-.6cm);
\addtocounter{shifty}{\w}
}
\end{tikzpicture}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment