I have this output:
Problem
Instead of hardcoding the resize parameter '0.8' in \resizebox{0.8\columnwidth}{!}{[...]}
- I would like to make some sort of automatic resize function.
I have these two requirements:
- I want the table to fill as much as possible/the rest of the page (in height/length of the paper)
- But only to the extend, that the columnwidt of the table does not exceed the textwidth
Any idea of how to write this function in Latex? Or links to sources which may help me further with this task.
Tex Code
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphics}
\usepackage{float}
\begin{document}
\section{Text}
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
\section{Table}
\begin{table}[H]
\resizebox{0.8\columnwidth}{!}{
\begin{tabular}{lllll}
\hline
\multicolumn{1}{|l|}{1} & \multicolumn{1}{c|}{Something} & \multicolumn{1}{c|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} \\ \hline
\multicolumn{1}{|l|}{2} & \multicolumn{1}{c|}{Something} & \multicolumn{1}{c|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} \\ \hline
\multicolumn{1}{|l|}{3} & \multicolumn{1}{c|}{Something} & \multicolumn{1}{c|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} \\ \hline
\multicolumn{1}{|l|}{4} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} \\ \hline
\multicolumn{1}{|l|}{5} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} \\ \hline
\multicolumn{1}{|l|}{6} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} \\ \hline
& & & & \\ \hline
\multicolumn{1}{|l|}{7} & \multicolumn{1}{c|}{Something} & \multicolumn{1}{c|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} \\ \hline
\multicolumn{1}{|l|}{8} & \multicolumn{1}{c|}{Something} & \multicolumn{1}{c|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} \\ \hline
\multicolumn{1}{|l|}{9} & \multicolumn{1}{c|}{Something} & \multicolumn{1}{c|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} \\ \hline
\multicolumn{1}{|l|}{10} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} \\ \hline
\multicolumn{1}{|l|}{11} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} \\ \hline
\multicolumn{1}{|l|}{12} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} & \multicolumn{1}{l|}{Something} \\ \hline
\end{tabular}
}
\end{table}
\end{document}
tabularx
.\multicolumn
: only for the rules?