Based on this tabular-environment-created-in-tikz, I was looking to wrap a simple tabular with TikZ (probably tcolorbox could be used, but the documentation looks like an Everest to climb for me).
My problematic
The "long" tabular is separated in 4 blocks (for this example, more in reality). Each block will be analysed in a lecture. At the end of the 4 lectures the long tabular will make sense as a whole.
My question
What should I do (I have the feeling I took things on the wrong foot) to type this big table only once, but actually use each block (poorly separated between \hline in the example but I imagine there's a far better way to do this), with the same format as the original ?
MWE below
\documentclass{standalone}
\usepackage[dvipsnames,table]{xcolor}
\usepackage{array}
\usepackage{environ}
\usepackage{tikz}
\usepackage{caption}
\newsavebox{\tablebox}
\definecolor{tablecolor}{named}{orange}
\NewEnviron{rndtable}[1]{%
\addtolength{\extrarowheight}{1ex}%
\rowcolors{2}{tablecolor!5}{tablecolor!20}%
\sffamily
\newcommand{\header}[1]{%
\multicolumn{1}{l}{%
\cellcolor{tablecolor}%
\color{white}%
\bfseries##1%
}%
}%
\savebox{\tablebox}{%
\begin{tabular}{#1}%
\BODY
\end{tabular}%
}%
%
\begin{tikzpicture}
\begin{scope}
\clip[rounded corners=1ex]
(0,-\dp\tablebox) rectangle (\wd\tablebox,\ht\tablebox);
\node at (0,-\dp\tablebox) [anchor=south west,inner sep=0pt]
{\usebox{\tablebox}};
\end{scope}
\draw[tablecolor,very thick,rounded corners=1ex]
(0,-\dp\tablebox) rectangle (\wd\tablebox,\ht\tablebox);
\end{tikzpicture}%
}
\newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}
\begin{document}
\begin{rndtable}{r P{5cm}} %
\multicolumn{2}{l}{Block 2} \\ \hline
Block 1 Field 1 & Description that can be long, very long, even longer\\
Block 1 Field 2 & Description \\
Block 1 Field 3 & Description \\
Block 1 Field 4 & Description \\
\hline
Block 2 Field 1 & Description that can be long, very long, even longer\\
Block 2 Field 2 & Description \\
Block 2 Field 3 & Description \\
Block 2 Field 4 & Description \\
\hline
Block 3 Field 1 & Description that can be long, very long, even longer\\
Block 3 Field 2 & Description \\
Block 3 Field 3 & Description \\
Block 3 Field 4 & Description \\
\hline
Block 4 Field 1 & Description that can be long, very long, even longer\\
Block 4 Field 2 & Description \\
Block 4 Field 3 & Description \\
Block 4 Field 4 & Description \\
\hline
\end{rndtable}
\end{document}




block{nameBlock1}{this is the header of the block}? – JeT Apr 23 '20 at 23:50tikzexternalize, so I can't really help there either. If the issue is including complex Tikz pictures, this might help; if it's the time it takes for the table blocks themselves to compile (i.e. wanting to be able to compile a block once and then reuse it arbitrarily many times without extra compilation time), I'm afraid I don't know of a good answer at the moment. – steve Apr 24 '20 at 10:53\tikzset{every node/.style={concept, execute at begin node=\hskip0pt}}to avoid indentation... it messed up everything. All good now. – JeT Apr 24 '20 at 14:04