I have a big font size document where i want to add 4*9 table containing images.
I used resizebox
to automatically reduce the font size and the images to fit the cell, and to force the table to be wide as the textwidth and with height a bit less than the page height.
The problem is that the text looks weird after the resizing as the resizing vertically stretches the text.
Is there any solution?
\documentclass[48pt,oneside,a4paper,extrafontsizes]{memoir}
\usepackage[demo]{graphicx}
\begin{document}
\begin{table*}[h!]\centering
\resizebox{\textwidth}{0.4\textheight}{
\begin{tabular}{|c|c|c|c|}
\hline\noalign{}
Chair&
air&
international&
Ali
\\\hline
latex &latex &latex &latex\\\hline
latex &latex &latex &latex\\\hline
latex &latex &latex &latex\\\hline
\includegraphics[width=\linewidth,height=0.2\textwidth]{demo}
&\includegraphics[width=\linewidth,height=0.2\textwidth]{demo}
&\includegraphics[width=\linewidth,height=0.2\textwidth]{demo}
&\includegraphics[width=\linewidth,height=0.2\textwidth]{demo}\\\hline
Chair&
air&
international&
Ali
\\\hline
Chair&
air&
international&
Ali
\\\hline
latex &latex &latex &latex\\\hline
latex &latex &latex &latex\\\hline
\end{tabular}}
\end{table*}
\end{document}
Best Answer
I tried expanding on the comments (I thank @StevenB.Segletes and @DavidCarlisle) and:
0.4\textheight
to keep the font aspect ratio[h!]
which is not to be used withtable*
height
of the image to keep the aspect ratio (you could choose the other one)Then I also:
booktabs
package for fancy linesarray
package (mainly to suppress the extra external separations with@{}
)I am now ready to propose two solutions. The "natural" one (which I think looks the best)
This table looks already ok for me, and way less dense than before. Should you feel it too dense still, I can propose you one with the array stretched, the line:
Basically inserts vertical spacing between the lines. Please feel free to readjust it to obtain what you want. I still prefer the first example