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 using the r function tabular() to produce tables that I can turn into pdfs. The output looks fine, except for some of the tables I am producing. When I compile the pdfs, the table is cutoff on the page, in the sense that it should continue onto another page but there is no other page of output but the latex code is there for the rest of the table. The tables are sometimes not quite centered either. Is there a simple option I am missing in tabular that will remedy this? Below is the stuff I have added to the latex() output from r. Thanks.

\documentclass{article}
\usepackage{rotating}
\begin{document}
\pagenumbering{gobble}
\begin{sidewaysfigure}
\begin{tabular}

.....

\end{tabular}
\end{sidewaysfigure}
\end{document}
share|improve this question

migrated from stackoverflow.com Mar 7 '13 at 13:52

This question came from our site for professional and enthusiast programmers.

    
Latex is not going to add pages that should be on the right. It's gonna add pages in the bottom, but not on the right. You can try to center your tabulars using begin{center}. For the tabular not to disappear on the right of your page, you have to format your lines so that they are written on multiple lines. –  double_squeeze Mar 6 '13 at 1:40

2 Answers 2

\documentclass{article}
\usepackage{longtable,pdflscape}
\begin{document}
\begin{landscape}% starts a new page
\begin{longtable}{...}

.....

\end{longtable}
\end{landscape}

foo
\end{document}
share|improve this answer
2  
Can you please add some explanation why your code solves the problem? So it could be hard for someone to understand what is going on ... –  Kurt May 6 '13 at 14:34

You should really go to the LaTeX site for pure latex questions, but you could try

...
\scalebox{0.8}{
\begin{tabular}
...
\end{tabular}
}
...

Also to break the table over multiple pages, you can use

tab <- tabular(...)
latex(tab, options = list(tabular = longtable)

as mentioned in the comment to your former question

Other than that, as suggested, I would ask the good folks at the LateX site...

share|improve this answer
    
This is not a good solution at all. You should never scale a table. You might, sensibly and consistenly, use a smaller font, but even that is frowned upon in many situations. –  tohecz May 6 '13 at 15:42

Your Answer

 
discard

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