# Hide an entire table (but still generate it)

In this answer the following code appears. The idea is that the initial table sets up the column widths used by the subsequent tables. The initial table itself is not supposed to be shown. Its only there to set up the widths which \usetabu retrieves. Unresolved from that post is whether there is any way to generate the first table but not have it visible or take up any space.

\documentclass{article}
\usepackage{tabu}
\begin{document}

\begin{center}
1 & 2 \\
3 & 4 \\
abcdefghijklmnopqrstuvwxyz & 10 \\
5 & 6 \\
\end{tabu}
\end{center}

\begin{center}
\begin{tabu}{\usetabu{mytabu2}}
1 & 2 \\
3 & 4 \\
\end{tabu}
\end{center}

\begin{center}
\begin{tabu}{\usetabu{mytabu2}}
abcdefghijklmnopqrstuvwxyz & 10 \\
5 & 6 \\
\end{tabu}
\end{center}

\end{document}


Output (this shows the three tables but what is desired is that only the last two are shown and the first runs so that it sets up the column widths but is not visible).

-

Put it in a box, but don't use the box.

\documentclass{article}
\usepackage{tabu}
\newbox\mybox %New
\begin{document}

\sbox\mybox{ %New
1 & 2 \\
3 & 4 \\
abcdefghijklmnopqrstuvwxyz & 10 \\
5 & 6 \\
\end{tabu}
}

\begin{center}
\begin{tabu}{\usetabu{mytabu2}}
1 & 2 \\
3 & 4 \\
\end{tabu}
\end{center}

\begin{center}
\begin{tabu}{\usetabu{mytabu2}}
abcdefghijklmnopqrstuvwxyz & 10 \\
5 & 6 \\
\end{tabu}
\end{center}

\end{document}

-