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 currently using the longtable environment, but I would like to change the orientation of the table and make it landscape. Using the lscape environment I am only able to modify the orientation of the page, rather than that of the table itself. Could you help me please?

In the preamble:

\usepackage{longtable} 
\usepackage{lscape}

Then the syntax to insert a longtable:

 \begin{document}
 \begin{landscape}
 \begin{center}
 \scriptsize
 \begin{longtable}{|p{2cm}|p{4cm}|p{8cm}|}\hline\hline
 \multicolumn{1}{|p{2cm}|}{\textbf{Text1}} &
 \multicolumn{1}{p{4cm}|}{\textbf{Text2}} &
 \multicolumn{1}{p{8cm}|}{\textbf{Text3}}\\ \hline 
 \endfirsthead

\multicolumn{3}{p{3cm}}
{{\bfseries \tablename\ \thetable{} -- continued from previous page}}\\ 
 \hline\multicolumn{1}{|p{2cm}|}{\textbf{Text1}} &
 \multicolumn{1}{p{4cm}|}{\textbf{Text2}} &
 \multicolumn{1}{p{8cm}|}{\textbf{Text3}}\\\hline 
 \endhead

\hline \multicolumn{3}{|r|}{{Continued on next page}} \\ \hline
\caption[Caption]{Caption}\label{label-caption} 
\endfoot
\caption[Caption]{Caption}\label{label-caption} 
\endlastfoot

\end{longtable}
\end{center}
\end{landscape}
\end{document}
share|improve this question

closed as too localized by Joseph Wright Mar 3 '12 at 22:45

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Your code runs fine with me and I get a table in the landscape. Can you give more details on your problem? –  Harish Kumar Feb 6 '12 at 9:13
    
I'm really not sure what you want to achieve. If you provided to images, one showing what you get and another one showing what you want, it would be easier to understand your desires. You can draw the images as sketches, they needn't come from LaTeX. –  tohecz Feb 6 '12 at 9:14
    
Hi all, thanks for your replies, apparently it now works fine. –  ilariac Feb 8 '12 at 0:37
add comment