Reputation: 125
I am working on my dissertation and lamentably I have a 17 column table (writing below). I have tried tabular*, tabularx and I have yet to fit this in the whole page.
\begin{sidewaystable}[htp]
\begin{tabular}{l@{\hspace{4pt}}*{17}{c}}
\multicolumn{17}{ c }{Title}\\
\hline
\hline
Organism Family & UniProt (Main) & Interactor & Domains & PDB (Main) & PDB (Interactor) & Complex & IntType & SpeMain & TaxIDMain & BioRoleMain & NamInt & PUBMED (URL)\\
\hline
\multirow{2}{*}{3l6p}& 2.40.10.120 & 1\\
& 2.40.10.10 & 1\\ \hline
1l9k & 3.40.50.150 & 1\\ \hline
\multirow{4}{*}{1oanA/B}& 2.60.98.10 & 3\\
& 3.30.387.10 & 1\\
& 3.30.67.10 & 1\\
& 2.60.40.350 & 1\\ \hline
\multirow{4}{*}{1uzgA/B}& 2.60.98.10 & 3\\
& 3.30.387.10 & 1\\
& 3.30.67.10 & 1\\
& 2.60.40.350 & 1\\ \hline
3we1B & 2.60.40.350 & 2 \\ \hline
\multirow{4}{*}{4cbfA/B}& 2.60.98.10 & 4\\
& 3.30.387.10 & 1\\
& 3.30.67.10 & 1\\
& 2.60.40.350 & 1\\ \hline
4al8L/H & 2.60.40.10 & 2\\
4al8C & 2.60.40.350 & 1\\ \hline
\multirow{2}{*}{2bhrA/B} & 3.40.50.300 & 2\\
& 3.40.50.300 & 2\\ \hline
\multirow{2}{*}{2fomB} & 2.40.10.120 & 1\\
& 2.40.10.10 & 1 \\ \hline
\end{tabular}
\caption{Dengue Domains Modelled}{TThis Table shows the domains modelled for each of the selected Dengue proteins. It also includes the number of domain repetitions in each protein structure.}
\label{Sample Data}
\end{sidewaystable}
The end result is shown in the image bellow.
Could please someone enlighten me on how to force the table to be within the page?
Also, the "Title" does not appear in the center of the table.
Upvotes: 1
Views: 3185
Reputation: 125
I have managed to control the length of one of the 17 columns by using the following modifications.
\begin{sidewaystable}[htp]
\begin{tabularx}{\textwidth}{l@{\hspace{4pt}}*{17}{c}}\\
\multicolumn{17}{>{\centering\setlength\hsize{1\hsize} }X}{Title}\\
\hline
\hline
\multicolumn{1}{>{\centering\setlength\hsize{0.07\hsize} }X|}{Organism Family} & \multicolumn{1}{>{\centering\setlength\hsize{0.02\hsize} }X|}{UniProtM} & \multicolumn{1}{>{\centering\setlength\hsize{0.07\hsize} }X|}{UniProtI} & \multicolumn{1}{>{\centering\setlength\hsize{0.06\hsize} }X|}{Domains}
& \multicolumn{1}{>{\centering\setlength\hsize{0.04\hsize} }X|}{pdbM}
& \multicolumn{1}{>{\centering\setlength\hsize{0.04\hsize} }X|}{PDBI}
& \multicolumn{1}{>{\centering\setlength\hsize{0.06\hsize} }X|}{Complex}
& \multicolumn{1}{>{\centering\setlength\hsize{0.06\hsize} }X|}{IntType}
& SpeM & TaxIDM & BioRoleM & NamI & PUBMED\\
\hline
\multirow{2}{*}{3l6p}& 2.40.10.120 & 1\\
& 2.40.10.10 & 1\\ \hline
1l9k & 3.40.50.150 & 1\\ \hline
\multirow{4}{*}{1oanA/B}& 2.60.98.10 & 3\\
& 3.30.387.10 & 1\\
& 3.30.67.10 & 1\\
& 2.60.40.350 & 1\\ \hline
\multirow{4}{*}{1uzgA/B}& 2.60.98.10 & 3\\
& 3.30.387.10 & 1\\
& 3.30.67.10 & 1\\
& 2.60.40.350 & 1\\ \hline
3we1B & 2.60.40.350 & 2 \\ \hline
\multirow{4}{*}{4cbfA/B}& 2.60.98.10 & 4\\
& 3.30.387.10 & 1\\
& 3.30.67.10 & 1\\
& 2.60.40.350 & 1\\ \hline
4al8L/H & 2.60.40.10 & 2\\
4al8C & 2.60.40.350 & 1\\ \hline
\multirow{2}{*}{2bhrA/B} & 3.40.50.300 & 2\\
& 3.40.50.300 & 2\\ \hline
\multirow{2}{*}{2fomB} & 2.40.10.120 & 1\\
& 2.40.10.10 & 1 \\ \hline
\end{tabularx}
\caption{Dengue Domains Modelled}{TThis Table shows the domains modelled for each of the selected Dengue proteins. It also includes the number of domain repetitions in each protein structure.}
\label{Sample Data}
\end{sidewaystable}
I used \multicolumn{1}{>{\centering\setlength\hsize{0.07\hsize} }X|}{Column Name}
This allow me to control the specific size in each part of it.
I will keep working on how to control each one of the inputs inside the table.
Upvotes: 1
Reputation: 1
I can't test it right now, but I believe putting your table into a minpage
environment would help here.
Upvotes: 0