Vertical Centering Table in Landscape Page

2,044

Some thing like this:

enter image description here

\documentclass{article}
\usepackage{pdflscape}
% Or with the lscape package. 
%\usepackage{lscape}
\begin{document}

\pagestyle{empty}
    \begin{landscape}
    \begin{table}[p!]\centering
    \begin{tabular}{ll|ll|ll|ll|ll}\hline \hline
    loooooooooong table part with many lines\\
    loooooooooong table part with many lines\\
    loooooooooong table part with many lines\\
    loooooooooong table part with many lines\\
    loooooooooong table part with many lines\\
    loooooooooong table part with many lines\\
    loooooooooong table part with many lines\\
    loooooooooong table part with many lines\\
    \hline
    legend\\
    \hline \hline
    \end{tabular}
    \end{table}
    \end{landscape}
    \pagestyle{plain}

\end{document}
Share:
2,044

Related videos on Youtube

Admin
Author by

Admin

Updated on May 04, 2020

Comments

  • Admin
    Admin over 3 years

    I'm trying to center this very wide and loooong table in a landscape page. I tried \vfill and couldn't do anything. Also tried to trim margins: nada. Anyone has an idea?

        \pagestyle{empty}
        \begin{landscape}
        \begin{table}[p!]
        \centerline{
        \begin{tabular}{ll|ll|ll|ll|ll}\hline \hline
        loooooooooong table part with many lines\\
        loooooooooong table part with many lines\\
        loooooooooong table part with many lines\\
        loooooooooong table part with many lines\\
        loooooooooong table part with many lines\\
        loooooooooong table part with many lines\\
        loooooooooong table part with many lines\\
        loooooooooong table part with many lines\\
        \hline
        \legend\\
        \hline \hline
        \end{tabular}}
        \end{table}}
        \end{landscape}
        \pagestyle{plain}
    
    • Melian
      Melian about 8 years
      Try adding \centering after \begin{table}[p!].
    • David Carlisle
      David Carlisle about 8 years
      you can remove the table environment and the \centerline which are not doing anything useful, other than that hard to say as the example code isn't an example of the problem described, it is just a one column table with a 8 column preamble. Please make the example generate a problem table.
    • David Carlisle
      David Carlisle about 8 years
      @Melian \centering will have no effect until \centerline is removed.
    • John Kormylo
      John Kormylo about 8 years
      The only float on a page of floats should always be centered vertically.