[pdftex] Table in the PDF looks different whith the same tex file

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Jan 28 09:04:07 CET 2010


On 28/01/2010 07:21, Prabhu wrote:
> Hi,
>
> Please check the attached tex file and the pdf. In the tex file I am
> creating a table.
>
> Try to run “pdflatex SampleTable.tex” to see the PDF.
>
> I ran my tex file twice and compared the two pdfs (SampleTable_First Run.pdf
> and SampleTable_next run.pdf). They both are not similar.
>
> To me it looks like second pdf is proper.  In the first pdf
> (SampleTable_First Run.pdf) the header are not properly placed.
>
>     1. I am not changing anything in the text file, then why in the next run
>     the table in the pdf looks different?
>     2. Please help me to correct this problem.

Hello Prabhu,

As you are using the longtable package, this is entirely to be expected. 
longtable works by getting the width of columns correct over a number of 
runs.  For a short table such as the one you have, you don't really need 
to use longtable: a standard tabular will work fine. However, if the 
table is going to grow you may need the longtable environment, of could 
consider an alternative such as xtab.
-- 
Joseph Wright


More information about the pdftex mailing list