Graphics, Figures & TablesPosition and Size of long Table

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
gking92
Posts: 2
Joined: Tue Mar 12, 2013 12:26 am

Position and Size of long Table

Post by gking92 »

Hi

I'm not sure how to a manipulate the positioning and size of a long table on the page.

With a regular table I have tried the adjustwidth environment from chngpage and the \scalebox command from graphicx, but they don't seem to be compatible with longtable. Trying to change the font size with \footnotesize also doesn't seem to work.

Here is a working example of the table:

Code: Select all

\documentclass[a4paper,10pt]{article}
\usepackage{longtable}
\begin{document}

\begin{longtable}{cc|cccc|cccc|cc|c}
\caption{The full catalogue produced by SExtractor in ASSOC mode. Note that the 'Star/Galaxy' values are a probability associated with the likelihood that the object is a star.}
 \footnotesize \\
  
 \multicolumn{2}{c|}{Position on Final Image} & \multicolumn{4}{|c|}{Red Passband} & \multicolumn{4}{|c|}{Blue Passband} & \multicolumn{2}{|c|}{B-R} &  \\
    X     & Y     & Magnitude & Mag. Error & Flux  & Flux Error & Magnitude & Mag. Error & Flux  & Flux Error & Magnitude & Mag. Error & Star/Galaxy \\
\hline
\endfirsthead

\multicolumn{4}{c}%
{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
\hline
 \multicolumn{2}{c|}{Position on Final Image} & \multicolumn{4}{|c|}{Red Passband} & \multicolumn{4}{|c|}{Blue Passband} & \multicolumn{2}{|c|}{B-R} &  \\
    X     & Y     & Magnitude & Mag. Error & Flux  & Flux Error & Magnitude & Mag. Error & Flux  & Flux Error & Magnitude & Mag. Error & Star/Galaxy \\
\hline
\endhead

\multicolumn{4}{r}{\textit{Continued on next page}} \\
\endfoot
\endlastfoot
    588.32 & 564.49 & 13.643 & 0.021 & 99385 & 1958  & 16.747 & 0.040 & 5694  & 208   & 3.105 & 0.045 & 0.00 \\
    859.74 & 120.21 & 13.704 & 0.018 & 93964 & 1541  & 16.299 & 0.031 & 8606  & 247   & 2.595 & 0.036 & 0.00 \\
    614.76 & 542.12 & 14.013 & 0.017 & 70691 & 1102  & 16.466 & 0.023 & 7381  & 153   & 2.453 & 0.028 & 0.00 \\
    814.56 & 117.26 & 14.129 & 0.023 & 63485 & 1343  & 17.018 & 0.050 & 4436  & 205   & 2.889 & 0.055 & 0.00 \\
    613.75 & 550.21 & 14.303 & 0.021 & 54081 & 1059  & 17.058 & 0.041 & 4277  & 162   & 2.755 & 0.046 & 0.00 \\
    747.36 & 537.90 & 14.486 & 0.026 & 45726 & 1072  & 17.237 & 0.049 & 3626  & 164   & 2.752 & 0.055 & 0.00 \\
    773.80 & 462.08 & 14.538 & 0.026 & 43554 & 1024  & 17.264 & 0.058 & 3539  & 189   & 2.725 & 0.063 & 0.00 \\
    834.76 & 259.83 & 14.621 & 0.024 & 40376 & 885   & 17.040 & 0.056 & 4351  & 225   & 2.419 & 0.061 & 0.01 \\
    482.60 & 560.27 & 14.689 & 0.029 & 37913 & 1021  & 17.006 & 0.038 & 4486  & 155   & 2.317 & 0.048 & 0.00 \\
    867.49 & 196.45 & 14.713 & 0.030 & 37086 & 1014  & 17.101 & 0.057 & 4112  & 217   & 2.388 & 0.065 & 0.00 \\
    864.52 & 692.87 & 14.760 & 0.031 & 35525 & 1024  & 17.582 & 0.074 & 2640  & 181   & 2.822 & 0.081 & 0.00 \\
    696.55 & 255.19 & 14.826 & 0.035 & 33411 & 1061  & 17.582 & 0.050 & 2640  & 121   & 2.756 & 0.061 & 0.00 \\
    503.71 & 588.08 & 14.885 & 0.036 & 31645 & 1059  & 17.688 & 0.070 & 2394  & 155   & 2.803 & 0.079 & 0.00 \\
    402.38 & 449.28 & 15.044 & 0.037 & 27344 & 924   & 17.322 & 0.046 & 3356  & 143   & 2.278 & 0.059 & 0.00 \\
    321.51 & 292.18 & 15.054 & 0.034 & 27092 & 836   & 18.018 & 0.090 & 1767  & 146   & 2.964 & 0.096 & 0.00 \\
    548.05 & 950.54 & 15.060 & 0.029 & 26950 & 716   & 17.370 & 0.036 & 3211  & 105   & 2.310 & 0.046 & 0.01 \\
    428.04 & 619.32 & 15.144 & 0.031 & 24945 & 706   & 17.266 & 0.047 & 3532  & 154   & 2.123 & 0.057 & 0.00 \\
    651.96 & 537.39 & 15.231 & 0.036 & 23011 & 764   & 17.879 & 0.061 & 2008  & 113   & 2.648 & 0.071 & 0.00 \\
    857.26 & 537.14 & 15.264 & 0.034 & 22334 & 701   & 17.994 & 0.075 & 1807  & 124   & 2.730 & 0.082 & 0.02 \\
    451.24 & 929.66 & 15.274 & 0.030 & 22115 & 602   & 17.318 & 0.038 & 3366  & 117   & 2.044 & 0.048 & 0.02 \\
    633.02 & 891.50 & 15.294 & 0.034 & 21710 & 680   & 18.460 & 0.136 & 1176  & 147   & 3.166 & 0.140 & 0.02 \\
    558.13 & 241.99 & 15.297 & 0.042 & 21666 & 844   & 17.726 & 0.057 & 2313  & 120   & 2.429 & 0.071 & 0.00 \\
    93.85 & 720.72 & 15.301 & 0.046 & 21569 & 916   & 18.330 & 0.081 & 1326  & 98    & 3.028 & 0.093 & 0.00 \\
    476.26 & 663.13 & 15.304 & 0.058 & 21525 & 1143  & 18.147 & 0.115 & 1569  & 166   & 2.844 & 0.129 & 0.00 \\
    760.96 & 546.67 & 15.307 & 0.037 & 21451 & 728   & 18.764 & 0.119 & 889   & 97    & 3.456 & 0.125 & 0.01 \\
    674.45 & 312.70 & 15.319 & 0.060 & 21231 & 1170  & 18.390 & 0.105 & 1254  & 122   & 3.071 & 0.121 & 0.00 \\
    175.42 & 352.48 & 15.329 & 0.036 & 21020 & 704   & 17.480 & 0.043 & 2901  & 114   & 2.150 & 0.056 & 0.00 \\
    611.95 & 271.44 & 15.344 & 0.040 & 20743 & 769   & 18.126 & 0.065 & 1600  & 96    & 2.782 & 0.077 & 0.00 \\
    323.11 & 623.47 & 15.348 & 0.036 & 20671 & 682   & 17.542 & 0.042 & 2739  & 107   & 2.195 & 0.055 & 0.00 \\
    650.21 & 334.20 & 15.356 & 0.036 & 20507 & 682   & 17.460 & 0.046 & 2954  & 124   & 2.104 & 0.058 & 0.00 \\
    685.71 & 549.03 & 15.359 & 0.037 & 20455 & 691   & 17.910 & 0.054 & 1952  & 97    & 2.551 & 0.065 & 0.00 \\
    614.87 & 869.35 & 15.360 & 0.081 & 20433 & 1530  & 17.916 & 0.075 & 1941  & 135   & 2.556 & 0.111 & 0.00 \\
    573.33 & 657.17 & 15.385 & 0.046 & 19975 & 846   & 18.514 & 0.126 & 1119  & 129   & 3.129 & 0.134 & 0.00 \\
    576.91 & 304.64 & 15.386 & 0.038 & 19954 & 694   & 18.092 & 0.059 & 1651  & 90    & 2.706 & 0.070 & 0.00 \\
    639.39 & 757.01 & 15.392 & 0.038 & 19851 & 688   & 17.547 & 0.061 & 2727  & 154   & 2.155 & 0.072 & 0.01 \\
    611.41 & 673.18 & 15.406 & 0.038 & 19590 & 685   & 17.910 & 0.065 & 1952  & 116   & 2.504 & 0.075 & 0.00 \\
    269.84 & 262.85 & 15.408 & 0.043 & 19554 & 768   & 17.936 & 0.102 & 1906  & 179   & 2.528 & 0.111 & 0.00 \\
    601.49 & 180.26 & 15.415 & 0.056 & 19422 & 997   & 17.952 & 0.099 & 1877  & 171   & 2.537 & 0.114 & 0.00 \\
    518.19 & 770.70 & 15.415 & 0.042 & 19420 & 743   & 18.318 & 0.088 & 1340  & 109   & 2.903 & 0.097 & 0.00 \\
    577.00 & 742.40 & 15.420 & 0.059 & 19343 & 1048  & 18.223 & 0.110 & 1463  & 148   & 2.803 & 0.124 & 0.00 \\
    605.43 & 735.35 & 15.438 & 0.040 & 19018 & 691   & 17.768 & 0.051 & 2224  & 105   & 2.330 & 0.065 & 0.00 \\
    283.64 & 299.52 & 15.446 & 0.035 & 18882 & 601   & 18.505 & 0.087 & 1128  & 90    & 3.059 & 0.093 & 0.00 \\
    285.14 & 658.79 & 15.452 & 0.047 & 18770 & 807   & 18.213 & 0.074 & 1477  & 101   & 2.760 & 0.088 & 0.00 \\
    675.37 & 259.39 & 15.484 & 0.055 & 18239 & 917   & 18.431 & 0.078 & 1208  & 87    & 2.947 & 0.095 & 0.00 \\
    558.17 & 492.71 & 15.503 & 0.042 & 17913 & 687   & 18.124 & 0.065 & 1603  & 95    & 2.620 & 0.077 & 0.00 \\
    454.11 & 41.91 & 15.517 & 0.041 & 17681 & 668   & 18.123 & 0.063 & 1604  & 93    & 2.606 & 0.075 & 0.00 \\
    652.28 & 860.43 & 15.518 & 0.040 & 17670 & 648   & 18.195 & 0.066 & 1501  & 91    & 2.677 & 0.077 & 0.01 \\
    710.29 & 393.78 & 15.544 & 0.042 & 17255 & 661   & 17.978 & 0.057 & 1833  & 96    & 2.434 & 0.070 & 0.00 \\
    783.11 & 79.25 & 15.562 & 0.043 & 16965 & 671   & 17.872 & 0.069 & 2022  & 129   & 2.310 & 0.082 & 0.00 \\
    814.29 & 701.48 & 15.562 & 0.046 & 16963 & 712   & 18.360 & 0.082 & 1290  & 97    & 2.797 & 0.094 & 0.00 \\
    421.95 & 404.47 & 15.570 & 0.042 & 16845 & 658   & 18.294 & 0.073 & 1370  & 92    & 2.724 & 0.084 & 0.01 \\
    708.27 & 10.71 & 15.611 & 0.052 & 16212 & 781   & 19.069 & 0.109 & 671   & 67    & 3.458 & 0.120 & 0.00 \\
    298.85 & 576.28 & 15.613 & 0.057 & 16193 & 848   & 17.808 & 0.056 & 2143  & 111   & 2.196 & 0.080 & 0.00 \\
    491.86 & 72.66 & 15.613 & 0.045 & 16188 & 668   & 17.754 & 0.049 & 2254  & 102   & 2.141 & 0.066 & 0.00 \\
    868.52 & 579.56 & 15.614 & 0.044 & 16178 & 658   & 17.993 & 0.070 & 1808  & 117   & 2.379 & 0.083 & 0.00 \\
    54.68 & 434.77 & 15.627 & 0.075 & 15988 & 1102  & 18.471 & 0.133 & 1164  & 143   & 2.845 & 0.153 & 0.00 \\
    91.42 & 1015.21 & 15.682 & 0.041 & 15192 & 577   & 18.231 & 0.088 & 1452  & 117   & 2.549 & 0.097 & 0.00 \\
    672.36 & 144.32 & 15.702 & 0.055 & 14911 & 750   & 17.466 & 0.061 & 2938  & 165   & 1.764 & 0.082 & 0.00 \\
    537.90 & 171.20 & 15.716 & 0.049 & 14727 & 661   & 18.758 & 0.110 & 893   & 91    & 3.043 & 0.121 & 0.00 \\
    188.01 & 855.95 & 15.717 & 0.067 & 14715 & 907   & 17.725 & 0.050 & 2313  & 107   & 2.009 & 0.084 & 0.00 \\
    742.11 & 380.39 & 15.720 & 0.058 & 14673 & 778   & 17.923 & 0.099 & 1929  & 176   & 2.203 & 0.114 & 0.00 \\
    748.60 & 873.48 & 15.731 & 0.058 & 14528 & 775   & 18.442 & 0.122 & 1196  & 135   & 2.711 & 0.135 & 0.00 \\
    821.63 & 411.08 & 15.739 & 0.060 & 14422 & 795   & 17.970 & 0.101 & 1848  & 172   & 2.231 & 0.117 & 0.00 \\
    691.53 & 819.46 & 15.740 & 0.051 & 14408 & 673   & 18.556 & 0.084 & 1076  & 84    & 2.817 & 0.099 & 0.00 \\
    637.25 & 435.35 & 15.793 & 0.071 & 13710 & 892   & 17.820 & 0.111 & 2120  & 216   & 2.027 & 0.131 & 0.00 \\
    418.29 & 579.74 & 15.821 & 0.061 & 13370 & 749   & 18.174 & 0.068 & 1531  & 96    & 2.353 & 0.091 & 0.00 \\
    215.55 & 102.38 & 15.822 & 0.058 & 13352 & 708   & 18.419 & 0.079 & 1221  & 89    & 2.597 & 0.098 & 0.00 \\
    800.03 & 547.49 & 15.838 & 0.051 & 13156 & 623   & 18.009 & 0.056 & 1782  & 91    & 2.171 & 0.076 & 0.02 \\
    820.88 & 221.57 & 15.862 & 0.063 & 12875 & 752   & 17.933 & 0.064 & 1910  & 112   & 2.072 & 0.090 & 0.02 \\
    500.09 & 656.81 & 15.866 & 0.089 & 12823 & 1044  & 18.609 & 0.146 & 1025  & 138   & 2.743 & 0.171 & 0.00 \\
    177.26 & 365.50 & 15.874 & 0.052 & 12731 & 609   & 18.676 & 0.133 & 964   & 118   & 2.802 & 0.143 & 0.00 \\
    380.64 & 683.40 & 15.883 & 0.085 & 12623 & 982   & 19.082 & 0.131 & 663   & 80    & 3.199 & 0.156 & 0.00 \\
    170.89 & 35.26 & 15.896 & 0.055 & 12475 & 626   & 17.902 & 0.056 & 1967  & 102   & 2.006 & 0.078 & 0.00 \\
    464.45 & 73.39 & 15.903 & 0.094 & 12393 & 1075  & 18.925 & 0.146 & 766   & 103   & 3.022 & 0.174 & 0.00 \\
    532.60 & 468.19 & 15.903 & 0.077 & 12392 & 873   & 18.447 & 0.145 & 1190  & 159   & 2.544 & 0.164 & 0.00 \\
    294.07 & 546.33 & 15.926 & 0.073 & 12138 & 818   & 17.824 & 0.065 & 2113  & 126   & 1.898 & 0.098 & 0.00 \\
    121.75 & 862.63 & 15.947 & 0.058 & 11907 & 636   & 18.598 & 0.121 & 1036  & 116   & 2.651 & 0.134 & 0.00 \\
    391.38 & 19.28 & 15.948 & 0.070 & 11888 & 769   & 18.449 & 0.132 & 1188  & 144   & 2.501 & 0.149 & 0.00 \\
    604.92 & 840.09 & 15.955 & 0.075 & 11813 & 813   & 18.006 & 0.060 & 1786  & 98    & 2.051 & 0.096 & 0.00 \\
    418.31 & 593.28 & 15.964 & 0.066 & 11721 & 710   & 18.549 & 0.120 & 1083  & 119   & 2.585 & 0.136 & 0.00 \\
    556.69 & 483.89 & 15.980 & 0.064 & 11541 & 683   & 18.471 & 0.139 & 1164  & 149   & 2.491 & 0.153 & 0.00 \\
    222.11 & 625.22 & 16.008 & 0.059 & 11248 & 612   & 18.195 & 0.116 & 1501  & 160   & 2.187 & 0.130 & 0.00 \\
    792.61 & 772.04 & 16.045 & 0.057 & 10875 & 571   & 18.978 & 0.105 & 730   & 70    & 2.933 & 0.119 & 0.00 \\
    397.94 & 99.56 & 16.049 & 0.058 & 10832 & 579   & 18.209 & 0.076 & 1482  & 103   & 2.160 & 0.095 & 0.00 \\
    388.95 & 206.41 & 16.078 & 0.057 & 10545 & 549   & 18.742 & 0.112 & 907   & 94    & 2.663 & 0.126 & 0.00 \\
    100.51 & 721.01 & 16.079 & 0.082 & 10535 & 792   & 18.294 & 0.084 & 1370  & 106   & 2.215 & 0.117 & 0.00 \\
    75.64 & 790.16 & 16.094 & 0.064 & 10399 & 608   & 18.340 & 0.103 & 1314  & 125   & 2.246 & 0.121 & 0.00 \\
    597.26 & 440.76 & 16.096 & 0.073 & 10378 & 701   & 18.667 & 0.092 & 972   & 82    & 2.572 & 0.118 & 0.00 \\

\end{longtable}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Position and Size of long Table

Post by cgnieder »

For such a large table it might be worth considering to rotate it:

Code: Select all

\documentclass[a4paper,10pt]{article}
\usepackage{lscape}
\usepackage{longtable}
\begin{document}

\begin{landscape}\small
\begin{longtable}{cc|cccc|cccc|cc|c}
 ...
\end{longtable}
\end{landscape}
\end{document}
Regards
site moderator & package author
Post Reply