I am trying to create a flowchart and each of the boxes contains two additional boxes, a white box on the top left and a white box on the top right with the block number.
Is there a way to automate the process of drawing the white boxes when the main box is defined in the \tikzstyle{}
declaration? Or do I have to draw them manually for each block? My current workaround is to define the white boxes as nodes and shift them in x-y coordinates to align them where I need them.
Here is my current code:
\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}
\usepackage[letterpaper, margin=1.0cm,showframe, nohead, nofoot, nomarginpar]{geometry}
\usepackage[default]{lato}
% Define Styles
\tikzstyle{nominal} = [rectangle, minimum width=5.5cm, minimum height=3cm, draw=black, line width=0.5mm, fill=gray!40, text width=50mm]
\tikzstyle{white} = [rectangle, minimum width=0.5cm, minimum height=0.5cm, text centered, draw=black, line width=0.5mm, fill=white]
\tikzstyle{arrow} = [thick, ->, >=stealth]
\begin{document}
\vspace*{1em}
% Tikz Picture
\begin{tikzpicture}[node distance=2cm]
% Input Nodes
\node (1) [nominal ] {\hspace{0.5cm}\textbf{\_\_ / \_\_:\_\_}\newline First block};
\node (2) [nominal, right of=1, xshift=4.5cm] {\hspace{0.5cm}\textbf{\_\_ / \_\_:\_\_}\newline the second block};
\node (3) [nominal, below of=2, yshift=-2.5cm] {\hspace{0.5cm}\textbf{\_\_ / \_\_:\_\_}\newline the third block};
% Draw White boxes
\node (w1_L) [white, below of=1, xshift=-2.5cm, yshift=3.25cm] {};
\node (w1_R) [white, below of=1, xshift=2.5cm, yshift=3.25cm] {1};
\node (w2_L) [white, below of=2, xshift=-2.5cm, yshift=3.25cm] {};
\node (w2_R) [white, below of=2, xshift=2.5cm, yshift=3.25cm] {2};
\node (w3_L) [white, below of=3, xshift=-2.5cm, yshift=3.25cm] {};
\node (w3_R) [white, below of=3, xshift=2.5cm, yshift=3.25cm] {3};
% Draw Arrows
\draw [arrow] (1) -- (2);
\draw [arrow] (1) |- (3);
\end{tikzpicture}
\end{document}
1.north west
or similar...