Page LayoutTwo column layout - \include causes pagebreak

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Bradford
Posts: 2
Joined: Mon Feb 21, 2011 6:12 pm

Two column layout - \include causes pagebreak

Post by Bradford »

I'm preparing a document where I'd like two columns of text and for each section to start straight after the last without moving to a new page. However, both [twocolumn] and using multicol package force a page break when I use \include. Any ideas on how to suppress this? \nopagebreak does not work.

The following code produces a four page document when using include, or a one page document when I put the code from the include files into the main file instead. I've left all my packages in the code so any conflicts may be identified.

Any ideas?

Code: Select all

Code, edit and compile here:
\documentclass[a4paper,9pt]{article}
\usepackage{float,setspace,graphicx,url,subfig,times,fancyhdr,enumerate,booktabs,epstopdf,multicol,overcite}
\begin{document}
\pagestyle{empty}
\begin{multicols}{2}
\include{file1}
Some text
\include{file2}
Some more text
% file1/file2.tex include a simple \section*{heading} and a few lines of text.
\end{multicols}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Last edited by Bradford on Tue Feb 22, 2011 3:11 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Two column layout - \include causes pagebreak

Post by localghost »

Just use \input in this case.


Best regards and welcome to the board
Thorsten
Bradford
Posts: 2
Joined: Mon Feb 21, 2011 6:12 pm

Re: Two column layout - \include causes pagebreak

Post by Bradford »

Ah, how silly of me. Thanks.
Post Reply