Re: multicols inserts a page-break before the end of the page



On 2008-07-15, Ulrike Fischer <news2@xxxxxxxxxxx> wrote:
Am Tue, 15 Jul 2008 13:51:56 -0000 schrieb Justin C:

I am using some test-data for a price-list I am working on in LaTeX. The
test-data is 16 lines of products. I can fit it on a four times
vertically, and in two columns. The problem I have is, though the
columns are the same length, the last part is carrying over to a new
page.

Here's a skeleton of what I have:

\documentclass[a4paper]{article}
\usepackage[top=1cm, bottom=1cm, left=0cm, right=0cm]{geometry}
\usepackage{multicol, colortbl}
\pdfpagewidth 21cm
\pdfpageheight 29.7cm
\setlength\textheight{27.7cm}
\setlength\textwidth{21cm}

Why aren't your using geometry to set all lengths?
Also use the option dvips, then geometry will set \pdfpagewidth/height
when run with pdflatex.



\begin{document}
\sf

\sffamily

\footnotesize
\begin{multicols}{2}
\begin{tabular*}{9.6cm}{|p{1mm}|m{1mm}|m{1mm}|b{1mm}|p{59mm}|r|}

[sample data]

\columnbreak

I hope that doesn't mean that the \columbreak is inside the tabular.

Bad copy/paste on my part. No, I'm not doing a column break inside the
tabular. There is an \end{tabular*} before the column break, and then
another \begin... after it. Sorry for the confusion.



[sample data]

\end{tabular*}
\end{multicols}
\line(1,0){562}

This should fit - with the sample data - on a page four times, but the
last instance of sample data carries onto the next page, and ignores the
margin on that page, sitting right at the page edge.

Did you look in the log if there is a complain about overfull boxes?

I've gone back to the start, taken out the repeats of the sample data,
and shall concentrate on getting something that works without complaints
before I try to get this to work as a multi-page document... learn to
walk before I run, etc.



Any suggestions as to why this might be happening?

No. Make a complete example. (You can avoid to add a lot of data by
using \\[Xcm] in the tabulars).

I'm not sure what you mean here - this is all new to me! ... hmmm,
\\[Xcm] ... bunch of errors .... ah, 'X' is a number, and cm is
measurement unit... hmmmm.... so, replace one cell content with, for
example \\[7cm] messes some layout..... hmmm..... OK, replace all
content between \begin{tab... and \end{tab.. OK, I see what you're
suggesting. I'll remember that for the future.

OK, bottom line is: in reply to your question, yes there are complaints.
I am going to resolve these before I try again. Thanks for pointing me
in the right direction.

Justin.

--
Justin C, by the sea.
.



Relevant Pages


Loading