0

I was unable to fit the 2 data tables needed for my thesis in portrait mode and hence have put it in landscape mode but it is going beyond the page length. I have seen other posts on many latex pages but haven't found a satisfactory answer that works.

I also tried using

\usepackage{threeparttable}

and

\setlength\tabcolsep{8.75pt}

within threeparttable. But it is not working.

The only other option that works is

\tiny

but this reduces the table size considerable and it can't be read.

MWE is given here

\documentclass[twoside,12pt]{Latex/   Classes/PhDthesisPSnPDF}
\usepackage{lscape}



\begin{document}   
\begin{landscape}
\begin{table}[ht]
    \centering
    \caption{\textbf{Global parameters of low redshift AGN (z $<$ 1.0).} } 
    \label{LowRS} 
    \begin{tabular}{cccccccccc}
        \hline 

Sl No   &   Object Name &   RA  &   Declination &   Redshift (ULDA) &   Redshift (NED)          &   N$_{HI}$    &   E(B-V)  &   No of Spectrum  &   (LWP    +   LWR +   SWP)    \\ \hline
        
1   &   Mrk 335 &   0h 03m 45.10s   &   19d 55m 45.15   &   0.025   &   0.02578 $\pm$   0.00006 &   3.3E+20 &   0.598911071 &   77  &   23  +   12  +   42  \\

2   &   NGC 1275    &   3h 16m 29.63s   &   41d 19m 51.8s   &   0.017   &   0.01756 $\pm$   0.00004 &   1.35E+21    &   2.450090744 &   28  &   6   +   4   +   18  \\

3   &   Mrk 421 &   11h 01m 40.30s  &   38d 28m 34.0s   &   0.031   &   0.03002 $\pm$   0.00008 &   1.33E+20    &   0.24137931  &   319 &   118 +   20  +   181 \\

4   &   NGC 3516    &   11h 03m 18.11s  &   72d 49m 00.7s   &   0.009   &   0.00884 $\pm$   0.00002 &   3.08E+20    &   0.558983666 &   120 &   19  +   11  +   90  \\

6   &   QSO 1226+023    &   12h 26m 33.32s  &   2d 19m 43.2s    &   0.158   &   0.15834 $\pm$   0.00007 &   1.68E+20    &   0.304900181 &   473 &   201 +   17  +   255 \\

5   &   NGC 4151    &   12h 08m 01.06s  &   39d 41m 01.8s   &   0.032   &   0.00332 $\pm$   0.00001 &   2.1E+20 &   0.381125227 &   1080    &   400 +   90  +   590 \\

8   &   Mrk  478    &   14h 40m 04.60s  &   35d 38m 53.0s   &   0.079   &   0.07906 $\pm$   0.00026 &   9.05E+19    &   0.164246824 &   49  &   14  +   12  +   23  \\

7   &   NGC 5548    &   14h 15m 42.14s  &   25d 22m 00.2s   &   0.017   &   0.01717 $\pm$   0.00002 &   1.55E+20    &   0.281306715 &   402 &   147 +   23  +   232 \\

9   &   Mrk 841 &   15h 04m 01.2s   &   10d 26m 16.15s  &   0.036   &   0.03642 $\pm$   0.00012 &   2.01E+20    &   0.364791289 &   28  &   10  +   1   +   17  \\

10  &   QSO 2155-304    &   21h 55m 58.23s  &   30d 27m 51.8s   &   0.117   &   0.116   $\pm$   0.002   &   1.29E+20    &   0.234119782 &   597 &   278 +   13  +   306 \\ \hline
    \end{tabular}

    \caption{\textbf{Global parameters of intermediate redshift AGN (1.0 $<$ z $<$ 3.53).}} 
    \label{InterRS} 
    \begin{tabular}{cccccccccc}
        \hline 
    Sl No   &   Object Name &   RA  &   Declination &   Redshift (ULDA) &   Redshift (NED)          &   N$_{HI}$    &   E(B-V)  &   No of Spectrum  &   (LWP    +   LWR +   SWP)    \\ \hline
        
    1   &   QSO 215+015 &   2h 15m 13.50s   &   1d 30m 54.0s    &   1.715   &   1.715   $\pm$    N/A    &   3.35E+20    &   0.607985481 &   11  &   (5  +   5   +   1)  \\

    2   &   PG 0946+301 &   9h 46m 46.30s   &   30d 09m 19.0s   &   1.216   &   1.22345 $\pm$   0.00044 &   1.47E+20    &   0.266787659 &   11  &   (4  +   0   +   7)  \\

    3   &   QSO  57+561A    &   9h 57m 57.30s   &   56d 08m 22.9s   &   1.39    &   1.4134  $\pm$    N/A    &   8.78E+19    &   0.159346642 &   20  &   (10 +   8   +   2)  \\

    4   &   PG 1241+176 &   12h 41m 41.00s  &   17d 37m 29.0s   &   1.273   &   1.273   $\pm$    N/A    &   1.94E+20    &   0.352087114 &   7   &   (6  +   0   +   1)  \\

    5   &   QSO 1246-057    &   12h 46m 28.92s  &   -05d 42m 58.3s  &   2.212   &   2.247   $\pm$   0.0016  &   2.11E+20    &   0.382940109 &   1   &   (0  +   1   +   0)  \\

    6   &   PG 1247+268 &   12h 47m 39.00s  &   26d 47m 28.0s   &   2.041   &   2.038   $\pm$    N/A    &   9.4E+19 &   0.170598911 &   2   &   (0  +   1   +   1)  \\

    7   &   PG 1329+412 &   13h 29m 29.90s  &   41d 17m 23.0s   &   1.935   &   1.93866 $\pm$   0.00044 &   9.1E+19 &   0.165154265 &   3   &   (0  +   2   +   1)  \\

    8   &   QSO1331+170 &   13h 31m 10.10s  &   17d 04m  24.0s  &   2.084   &   2.084   $\pm$    N/A    &   1.59E+20    &   0.288566243 &   4   &   (3  +   0   +   1)  \\

    9   &   PG1338+416  &   13h 38m 52.20s  &   41d 38m 18.0s   &   1.219   &   1.21708 $\pm$   0.00044 &   7.97E+19    &   0.144646098 &   4   &   (1  +   0   +   3)  \\

    10  &   QSO1442+101 &   14h 42m 50.55s  &   10d 11m 13.0s   &   3.53    &   3.55234 $\pm$   0.00052 &   1.51E+20    &   0.274047187 &   4   &   (1  +   0   +   3)  \\

    11  &   PG1634+706  &   16h 34m 51.70s  &   70d 37m 37.0s   &   1.334   &   1.334   $\pm$    N/A    &   5.58E+20    &   1.012704174 &   20  &   (15 +   2   +   3)  \\

    12  &   PG1718+481  &   17h 18m 17.70s  &   48d 07m 11.0s   &   1.084   &   1.084   $\pm$    N/A    &   2E+20   &   0.362976407 &   3   &   (0  +   1   +   2)  \\

    13  &   QSO2126-158 &   21h 26m 26.69s  &   15d 51m 51.5s   &   3.275   &   3.268   $\pm$   0.001   &   4.46E+20    &   0.809437387 &   4   &   (0  +   1   +   3)  \\

    14  &   QSO 2204-408    &   22h 04m 33.00s  &   40d  51m 35.0s  &   3.17    &   3.155   $\pm$   0.001   &   1.08E+20    &   0.19600726  &   10  &   (3  +   0   +   7)  \\

    15  &   QSO2223-052 &   22h 23m 11.05s  &   5d 12m 17.0s    &   1.404   &   1.404   $\pm$    N/A    &   4.88E+20    &   0.885662432 &   26  &   (19 +   3   +   4)  \\
        \hline    %inserts double horizontal lines
    \end{tabular}

\end{table}

\end{landscape}

 \end{document}

The following is the pdf when \tiny is not used. table not within the page

4
  • 1
    If you want it to break over pages, use longtable.
    – Bernard
    Feb 17, 2021 at 17:31
  • your MWE is not a MWE it can't be run as is. But assuming a US letter or A4 page there really is not that much text there, you should be able to reformat the data to fit on the page at a reasonable font size. You are best placed to re-arrange the table as you have the subject knowledge Feb 17, 2021 at 17:40
  • 1
    eg you could put the headings in the first column and have two columns instead of two rows of data Feb 17, 2021 at 17:45
  • Did you include all rows of both tables in your MWE or do your actual tables contain more rows? If so, how many? Probably, you could transpose the tables in order to make them narrower?
    – leandriis
    Feb 17, 2021 at 18:13

2 Answers 2

0

In general, I do not like tables to be in the text, data should be in an appendix and be referenced. Tables in text are always disturbing. In this case, as you have long data, I would not bother about table conventions and split the table lines.

\documentclass[twoside,12pt]{book}
\usepackage{pdflscape}
    \begin{document}
    \begin{landscape}
    \begin{table}[ht]
\def\nameofcol#1{\textbf{#1}}
\caption{\textbf{GlobalparametersoflowredshiftAGN(z$<$1.0).}}
    \begin{tabular}{lllllllllll}
    \nameofcol{Colname}&\nameofcol{test}&\nameofcol{test}&\nameofcol{test}&\nameofcol{test}\\ \\
    \nameofcol{Nextline colname}&\nameofcol{test}&\nameofcol{test}&\nameofcol{test}&\nameofcol{test}\\ \\
    \hline \\
    1&2&3&4&5\\
10000006&7&8&9&1000000\\
\hline \\
1&2&3&4&5\\
10000006&7&8&9&1000000\\
\hline \\
1&2&3&4&5\\
10000006&7&8&9&1000000\\\hline \\
1&2&3&4&5\\
10000006&7&8&9&1000000\\\hline \\
\end{tabular}
\end{table}
\end{landscape}
    \end{document}
   
0

enter image description here

Using tabular*, macro \extracolsep{\fill}, footnotesize for font size and larger \textheight (if this is not possible, then you need smaller font size):

\documentclass[twoside,12pt]{book}%{Latex/   Classes/PhDthesisPSnPDF}
\usepackage[vmargin=25mm]{geometry}
\usepackage{pdflscape}
\usepackage{booktabs, makecell}



\begin{document}
\begin{landscape}
\begin{table}[ht]
\footnotesize
    \centering
    \caption{\textbf{Global parameters of low redshift AGN (z $<$ 1.0).} }
    \label{LowRS}
\setlength\tabcolsep{0pt}
    \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} cccccccccc }
        \toprule
Sl No   &   Object Name &   RA  &   Declination 
        &   \makecell{Redshift\\ (ULDA)} 
        &   \makecell{Redshift\\ (NED)} &   N$_{HI}$ &   E(B-V)  
        &   \makecell{No of\\ Spectrum}  
        &   \makecell{(LWP + \\LWR + SWP)}          \\  
        \midrule
%% table body
1   &   Mrk 335 &   0h 03m 45.10s   &   19d 55m 45.15   &   0.025   &   0.02578 $\pm$   0.00006 &   3.3E+20 &   0.598911071 &   77  &   23  +   12  +   42  \\

2   &   NGC 1275    &   3h 16m 29.63s   &   41d 19m 51.8s   &   0.017   &   0.01756 $\pm$   0.00004 &   1.35E+21    &   2.450090744 &   28  &   6   +   4   +   18  \\

3   &   Mrk 421 &   11h 01m 40.30s  &   38d 28m 34.0s   &   0.031   &   0.03002 $\pm$   0.00008 &   1.33E+20    &   0.24137931  &   319 &   118 +   20  +   181 \\

4   &   NGC 3516    &   11h 03m 18.11s  &   72d 49m 00.7s   &   0.009   &   0.00884 $\pm$   0.00002 &   3.08E+20    &   0.558983666 &   120 &   19  +   11  +   90  \\

6   &   QSO 1226+023    &   12h 26m 33.32s  &   2d 19m 43.2s    &   0.158   &   0.15834 $\pm$   0.00007 &   1.68E+20    &   0.304900181 &   473 &   201 +   17  +   255 \\

5   &   NGC 4151    &   12h 08m 01.06s  &   39d 41m 01.8s   &   0.032   &   0.00332 $\pm$   0.00001 &   2.1E+20 &   0.381125227 &   1080    &   400 +   90  +   590 \\

8   &   Mrk  478    &   14h 40m 04.60s  &   35d 38m 53.0s   &   0.079   &   0.07906 $\pm$   0.00026 &   9.05E+19    &   0.164246824 &   49  &   14  +   12  +   23  \\

7   &   NGC 5548    &   14h 15m 42.14s  &   25d 22m 00.2s   &   0.017   &   0.01717 $\pm$   0.00002 &   1.55E+20    &   0.281306715 &   402 &   147 +   23  +   232 \\

9   &   Mrk 841 &   15h 04m 01.2s   &   10d 26m 16.15s  &   0.036   &   0.03642 $\pm$   0.00012 &   2.01E+20    &   0.364791289 &   28  &   10  +   1   +   17  \\

10  &   QSO 2155-304    &   21h 55m 58.23s  &   30d 27m 51.8s   &   0.117   &   0.116   $\pm$   0.002   &   1.29E+20    &   0.234119782 &   597 &   278 +   13  +   306 \\ 
    \bottomrule
    \end{tabular*}

    \caption{\textbf{Global parameters of intermediate redshift AGN (1.0 $<$ z $<$ 3.53).}}
    \label{InterRS}
\setlength\tabcolsep{0pt}
    \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} cccccccccc }
        \toprule
Sl No   &   Object Name &   RA  &   Declination
        &   \makecell{Redshift\\ (ULDA)}
        &   \makecell{Redshift\\ (NED)} &   N$_{HI}$ &   E(B-V)
        &   \makecell{No of\\ Spectrum}
        &   \makecell{(LWP + \\LWR + SWP)}          \\
        \midrule
%% table body
    1   &   QSO 215+015 &   2h 15m 13.50s   &   1d 30m 54.0s    &   1.715   &   1.715   $\pm$    N/A    &   3.35E+20    &   0.607985481 &   11  &   (5  +   5   +   1)  \\

    2   &   PG 0946+301 &   9h 46m 46.30s   &   30d 09m 19.0s   &   1.216   &   1.22345 $\pm$   0.00044 &   1.47E+20    &   0.266787659 &   11  &   (4  +   0   +   7)  \\

    3   &   QSO  57+561A    &   9h 57m 57.30s   &   56d 08m 22.9s   &   1.39    &   1.4134  $\pm$    N/A    &   8.78E+19    &   0.159346642 &   20  &   (10 +   8   +   2)  \\

    4   &   PG 1241+176 &   12h 41m 41.00s  &   17d 37m 29.0s   &   1.273   &   1.273   $\pm$    N/A    &   1.94E+20    &   0.352087114 &   7   &   (6  +   0   +   1)  \\

    5   &   QSO 1246-057    &   12h 46m 28.92s  &   -05d 42m 58.3s  &   2.212   &   2.247   $\pm$   0.0016  &   2.11E+20    &   0.382940109 &   1   &   (0  +   1   +   0)  \\

    6   &   PG 1247+268 &   12h 47m 39.00s  &   26d 47m 28.0s   &   2.041   &   2.038   $\pm$    N/A    &   9.4E+19 &   0.170598911 &   2   &   (0  +   1   +   1)  \\

    7   &   PG 1329+412 &   13h 29m 29.90s  &   41d 17m 23.0s   &   1.935   &   1.93866 $\pm$   0.00044 &   9.1E+19 &   0.165154265 &   3   &   (0  +   2   +   1)  \\

    8   &   QSO1331+170 &   13h 31m 10.10s  &   17d 04m  24.0s  &   2.084   &   2.084   $\pm$    N/A    &   1.59E+20    &   0.288566243 &   4   &   (3  +   0   +   1)  \\

    9   &   PG1338+416  &   13h 38m 52.20s  &   41d 38m 18.0s   &   1.219   &   1.21708 $\pm$   0.00044 &   7.97E+19    &   0.144646098 &   4   &   (1  +   0   +   3)  \\

    10  &   QSO1442+101 &   14h 42m 50.55s  &   10d 11m 13.0s   &   3.53    &   3.55234 $\pm$   0.00052 &   1.51E+20    &   0.274047187 &   4   &   (1  +   0   +   3)  \\

    11  &   PG1634+706  &   16h 34m 51.70s  &   70d 37m 37.0s   &   1.334   &   1.334   $\pm$    N/A    &   5.58E+20    &   1.012704174 &   20  &   (15 +   2   +   3)  \\

    12  &   PG1718+481  &   17h 18m 17.70s  &   48d 07m 11.0s   &   1.084   &   1.084   $\pm$    N/A    &   2E+20   &   0.362976407 &   3   &   (0  +   1   +   2)  \\

    13  &   QSO2126-158 &   21h 26m 26.69s  &   15d 51m 51.5s   &   3.275   &   3.268   $\pm$   0.001   &   4.46E+20    &   0.809437387 &   4   &   (0  +   1   +   3)  \\

    14  &   QSO 2204-408    &   22h 04m 33.00s  &   40d  51m 35.0s  &   3.17    &   3.155   $\pm$   0.001   &   1.08E+20    &   0.19600726  &   10  &   (3  +   0   +   7)  \\

    15  &   QSO2223-052 &   22h 23m 11.05s  &   5d 12m 17.0s    &   1.404   &   1.404   $\pm$    N/A    &   4.88E+20    &   0.885662432 &   26  &   (19 +   3   +   4)  \\
        \bottomrule
    \end{tabular*}
    \end{table}
\end{landscape}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.