Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to create a large table, it is both wide and has a lot of rows. I've gotten long table to work and break it up, and I've managed to turn it landscape. However, due to the size of the whitespace on the bottom of the page in particular, the table is still too wide to fit the landscape pages. I want to override the normal margins drop in the table so that it takes up more of the page. I've tried using geometry but it doesn't seem to work with the longtable.

Is there a way that I can do this. There will likely be many tables like this in my thesis so I need a reasonably efficient solution.

\documentclass[a4paper,12pt,oneside]{article}
\usepackage{longtable}
\usepackage{geometry}
\usepackage{lipsum,pdflscape}
\usepackage{booktabs}



\begin{document}

\lipsum[1-4]



\newgeometry{ left=1cm,right=1cm,top=0.5cm, bottom=0.5cm}
\begin{landscape}
\thispagestyle{empty}

\tiny
\begin{table}
\caption{\lipsum[11]}
% Table generated by Excel2LaTeX from sheet 'without formulas'
\begin{longtable}{llllclcccc}
\toprule
           &   GenBank  &            &            &            &            &            &            &            &            \\

           &  accession &            &            &            &    Fluoro        &            & Allelic size  &            &            \\

     Locus &     number & Repeat motif & Primer sequence (5' - 3') &  Multiplex & label &        N$_{A}$ & range (bp) &    H$_{o}$/H$_{e}$ &          N \\
\midrule
 Locusname &  GH1114444 & (TG)2TTTG(TG)12TTTG & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &      6-FAM &          2 &    123-125 & 0.454/0.466 &        273 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\
           \\

 Locusname &  GH1114444 & (AC)19AG(AC)3 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &      6-FAM &          3 &    267-270 & 0.491/0.458 &        271 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\
           \\

 Locusname &  GH1114444 & (AC)6AA(AC)2(AAC)2AC(A)6 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        VIC &          5 &    273-298 & 0.612/0.598 &        273 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (GT)10 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &      6-FAM &          3 &    124-129 & 0.39/0.367 &        272 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (GT)12 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        PET &          3 &    271-276 & 0.655/0.642 &        264 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 & (TG)13(TATG)4 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        VIC &          2 &    364-368 & 0.155/0.143 &        252 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (TG)22 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &      6-FAM &          7 &    134-158 & 0.824/0.805 &        272 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 & (TC)5…(TC)2TT(TC)3…(TC)6AA(AC)12 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        PET &          2 &    285-287 & 0.500/0.496 &        266 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 & (AC)7ATACACAG(TC)5 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        VIC &          3 &    139-146 & 0.517/0.496 &        263 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (AC)15 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        VIC &          3 &    167-175 & 0.376/0.399 &        271 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (TG)13 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        NED &          3 &    194-198 & 0.631/0.618 &        255 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 & GTTG(GTTT)2(GTT)12(T)2 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &      6-FAM &          4 &    186-198 & 0.663/0.633 &        273 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &      (GT)8 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &      6-FAM &          3 &    164-167 & 0.121/0.115 &        272 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &      (AG)7 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        NED &          2 &    175-177 & 0.213/0.231 &        267 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &    (GGGA)6 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        VIC &          5 &    152-176 & 0.781/0.758 &        270 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &    (GACA)5 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        PET &          2 &    124-132 & 0.261/0.227 &        268 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &    (AAAC)5 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &      6-FAM &          2 &    198-209 & 0.495/0.471 &        273 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &    (TTTA)5 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        PET &          2 &    175-178 & 0.576/0.500 &        269 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (CCT)5 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &        NED &          2 &    151-154 & 0.246/0.227 &        268 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (GAG)6 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &      6-FAM &          2 &    166-168 & 0.084/0.080 &        274 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 & (GT)8GA(GT)11AA(GT)5AT(GT)2 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &        PET &          4 &    111-130 & 0.524/0.502 &        273 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (GT)10 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &        PET &          2 &    180-184 & 0.007/0.007 &        273 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 & (CT)5TT(CT)12–16 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &        VIC &          3 &    197-201 & 0.600/0.628 &        270 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (GT)12 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &      6-FAM &          2 &    200-205 & 0.489/0.497 &        272 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 & (AGGG)9 (ATGG)12 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        PET &          4 &    418-439 & 0.786/0.730 &        257 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (GT)19 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        NED &          6 &    144/164 & 0.831/0.789 &        248 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &    (AGC)16 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &        NED &          3 &    223-232 & 0.310/0.300 &        261 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 & (AC)15 G (CA)10 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        NED &          4 &    125-133 & 0.813/0.740 &        252 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &    G(AG)13 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &      6-FAM &          2 &    260-262 & 0.393/0.398 &        270 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 & (TC)4T(CTTT)5 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        VIC &          2 &    192-196 & 0.517/0.498 &        271 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (CA)16 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &        PET &          3 &    202-206 & 0.580/0.538 &        269 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (TG)13 & F: TTTTTTTTTTAAAAAAAAAAAAA &          1 &       FAMa &          7 &    329-346 & 0.869/0.838 &        259 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (GT)15 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        NED &          5 &    281-287 & 0.480/0.549 &        221 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (CA)17 & F: TTTTTTTTTTAAAAAAAAAAAAA &          2 &        PET &          7 &    173-205 & 0.785/0.735 &        260 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\

 Locusname &  GH1114444 &     (AC)11 & F: TTTTTTTTTTAAAAAAAAAAAAA &          3 &        NED &          3 &    194-198 & 0.621/0.577 &        243 \\

           &            &            & R: GGGGGGGGGGGGGGGGGGGGGG &            &            &            &            &            &            \\
\bottomrule
\end{longtable}
\end{table}
\end{landscape}
\restoregeometry

\lipsum[1]
\end{document}



\end{document}
share|improve this question
    
Welcome to TeX.sx. Please provide a minimal working example that shows you documentclass and related packages. –  Marco Daniel Nov 9 '11 at 10:14
add comment

1 Answer

Here is an example on how to do this. As Marco commented already, usually it is better to provide an example. This way you will get an answer that solves your problem best.

\documentclass{article}
\usepackage{longtable}
\usepackage{lipsum,pdflscape}

\usepackage{geometry}
\geometry{left=5cm,right=5cm}%fairly narrow for demonstration

\begin{document}

\lipsum[1-4]

\newgeometry{left=1cm,right=1cm,top=0.5cm,bottom=0.5cm}
\begin{landscape}
\thispagestyle{empty}
\begin{longtable}{p{\linewidth}}
\lipsum[1]
\end{longtable}
\end{landscape}
\restoregeometry%get the old one pack
\lipsum[1]
\end{document}

It uses the geometry package to provide a new geometry for the landscape part. If you contine with normal text afterwards you should restore the old geometry

enter image description here

share|improve this answer
    
Thank you so much. Using that I was able to produce the table looking very close to how it needs to be. Sorry for not providing code, it is a pretty convoluted example, I've attached some now made as anonymous as possible without sending my actual data around. Where I'm still struggling is in the ability to add captions and a footnote to explain aspects of the table (that comes immediately below the bottomrule. When I place the whole thing in the tabular environment the long table set up as you suggest stops working for me. ETA, I've tried to paste in my code and it is too long. –  robin Nov 9 '11 at 20:26
    
I've added the code to the original question. Thanks. –  robin Nov 9 '11 at 20:32
    
My other question is how to add some white space between every second row in the table, I've done it in the example for the first two adding an extra line but would rather do less that a full extra line. –  robin Nov 9 '11 at 20:38
    
The usual \\[distance] at the end of a row should work. Eg. something & something \\[10ex] –  Martin H Nov 10 '11 at 9:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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