A coworker and I are working on templates for documentation in which certain types of tables are a repeated element. These tables vary in content depth, often wrapping the content in Column B
of the MWE.
Because these elements repeat, we've set a consistent width for them. However, some are very short, widthwise, and do not stretch to meet the minimum width. The MWE shows this:
\documentclass{article}
\usepackage[margin=0.25in]{geometry}
\usepackage{mwe}
\usepackage{blindtext}
\usepackage{booktabs}
\usepackage{tabulary}
\begin{document}
\begin{table}[h]
\centering
\begin{tabulary}{0.66\textwidth}{lL}
\toprule
\multicolumn{2}{l}{Example A} \\
\midrule
\multicolumn{2}{c}{\includegraphics[scale=0.5]{example-image-a}} \\
\midrule
Column A & Column B \\
\midrule
Label I & A very little bit of text.\\
\bottomrule
\end{tabulary}
\caption{Example A}
\end{table}
\begin{table}[h]
\centering
\begin{tabulary}{0.66\textwidth}{lL}
\toprule
\multicolumn{2}{l}{Example B} \\
\midrule
\multicolumn{2}{c}{\includegraphics[scale=0.5]{example-image-b}} \\
\midrule
Column A & Column B \\
\midrule
Label I & \blindtext\\
\bottomrule
\end{tabulary}
\caption{Example B}
\end{table}
\end{document}
Adding the following hack to Example A
forces the desired width, but seems like a terrible solution: Label I & A very little bit of text.\hspace*{50em}\\
Certainly there is a better way to do this?
Update
This question regarding a similar scenario presented a patch and some helpful history regarding tabulary
.
However, something (perhaps the images?) involved here breaks the patch suggested there, resulting in an arithmetic overflow. Manual intervention to use tabularx
in underfull tables is reasonable, but not a scenario that will support automation.
Is there a way to provide arithmetic for the patch from the \includegraphics
calls, or is this simply pushing too far into unreasonable territory?
tabularx
, instead?