Sometimes we need to render tables which do not fit in a page since the tables are too wide. Now, since longtable
renders tables which do not
fit in a page lengthwise, how can we build a package which do not
fit in a page width-wise?
The capabilities I am looking for in the proposed package are:
Feature 1
Automatic splitting of columns when the table width exceeds page width.
\begin{tabular}{*{40}{c}}
H1&H2&H3&H4&H5&H6&H7&H8&H9&H10&H11&H12&H13&H14&H15&H16&H17&H18&H19&H20&H21&H22&H23&H24&H25&H26&H27&H28&H29&H30&H31&H32&H33&H34&H35&H36&H37&H38&H39&H40\\
1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&19&20&21&22&23&24&25&26&27&28&29&30&31&32&33&34&35&36&37&38&39&40
\end{tabular}
In the above code, since all the columns will not fit in the page width, it will split the table at an appropriate column automatically.
Feature 2
Repeat columns at left.
\begin{tabular}{ll*{40}{c}}
Name&ID&H1&H2&H3&H4&H5&H6&H7&H8&H9&H10&H11&H12&H13&H14&H15&H16&H17&H18&H19&H20&H21&H22&H23&H24&H25&H26&H27&H28&H29&H30&H31&H32&H33&H34&H35&H36&H37&H38&H39&H40\\
A&00001&1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&19&20&21&22&23&24&25&26&27&28&29&30&31&32&33&34&35&36&37&38&39&40
\end{tabular}
When the table has been split at appropriate column, there should be an optional provision to repeat the leftmost two columns.
Feature 3
Provision not to break columns when a header cell is formed using multiple columns.
\begin{tabular}{ll*{40}{c}}
\multicolumn{2}{c}{Particulars}&\multicolumn{5}{c}{Subject 1}&\multicolumn{10}{c}{Subject 2}&\multicolumn{7}{c}{Subject 3}&\multicolumn{8}{c}{Subject 4}&\multicolumn{10}{c}{Subject 5}\\
Name&ID&H1&H2&H3&H4&H5&H6&H7&H8&H9&H10&H11&H12&H13&H14&H15&H16&H17&H18&H19&H20&H21&H22&H23&H24&H25&H26&H27&H28&H29&H30&H31&H32&H33&H34&H35&H36&H37&H38&H39&H40\\
A&00001&1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&19&20&21&22&23&24&25&26&27&28&29&30&31&32&33&34&35&36&37&38&39&40
\end{tabular}
The table will not be split at the mid point any multi-column Subject n
header.
These are the primary features I can think of. May be more can be added once that package is born.
Surprisingly, all the major spreadsheets have all or majority of the above features.
(Why am I not writing the above package? Simple, that is above my knowledge grade. And that is why I am asking this question.)
(Perhaps you may want to take a look at this related question. This issue has remained unsolved at my end for more than a couple of years.)