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 have couple of lines (text) followed by table. I want both the text and table to appear in same page, now text appears in one page and table in next page. How to change it? I have tried using \vspace{-5cm}but of no use, is there a better way?

Example:

\chapter{bbbb : aaaa}
\label{cccc}

\begin{footnotesize}
\sf
\section{eeee}
\label{fffff}

\#Print Out Time:          3/15/2010 2:06:07 PM                             
  \\ 
\#Ref:                     xyz
..............  

\begin{tabular}{lllrl}
........

\end{tabular}
share|improve this question
    
Have you tried using \nopagebreak between your tabular and the text? –  Werner Aug 24 '11 at 19:51
2  
You can try wrapping both of them in a samepage environment, or if that fails, in a minipage environment. –  Aditya Aug 24 '11 at 21:46
1  
The placins package provides the \FloatBarrier command, which could be useful –  cmhughes Aug 25 '11 at 7:33

1 Answer 1

Well, not knowing some salient variables --- such as (i) the size of the piece of the paper (a4, USletter, ...), (ii) the width and height of the text block on the paper, (iii) the font and font size you're using in the main text area and the tabular block, (iv) the line spacing (e.g., single- or double-spacing), or (v) the number of rows you need to display --- it's not easy to give specific suggestions. If you think it's just a matter of letting a couple of extra lines of text appear on the page in order for both the text and the table to coexist peacefully on the same page, you may want to issue the command

\enlargethispage{2\baselineskip}

and see what happens. If this doesn't work, you'll probably have to fiddle with the parameters that govern items (ii) through (v) above.

share|improve this answer

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.