Three different styles have to be distinguished when creating multiple columns in a Latex document. Either we want the whole document to have two columns, single pages or only part of a page. In order to do so, three different Latex commands are used…
Whole document (using article to write a paper):
The only thing you need to do is changing the first command of your Latex-file.
\documentclass[11pt,twocolumn]{article}
It will automatically create two columns in the entire document.
Note: if you are writing a paper, IEEE provides useful templates which can be used and adapted to your needs. You can download them from their “Author Digital Tool Box“.
Single pages:
The command \twocolumn starts a new page having two columns. Accordingly, \onecolumn starts a new page with a single column assuming you are in a two column environment as described above. Both commans do not take any arguments.
The is a way to define the distance between the two columns, use
\setlength{\columnsep}{distance}
If you need a line to separate the columns, the following command will do the job:
\setlength{\columnseprule}{thickness}
Part of a page:
I have posted another article on that, just have a look there. \minipage can also be used for text, not only for figures and tables.
Tags: book, columnsep, columnseprule, documentclass, LaTex, letter, minipage, report, twocolumn
July 8, 2008 at 3:08 pm |
Hi, many thanks for this space of big help for LaTeX. I want to wite a paper with two columns but I need to insert a table (a little bit big, horizontally full page) and next, I must continue with two columns. Is that possible?
Thanks,
Víctor
July 12, 2008 at 10:22 pm |
Hi Victor,
The following code might help you solving your problem. The command “\twocolumn”, “\onecolumn” respectively will allways insert a new page, which is probably not what you want. When using “multicols” instead, you can have different layouts on a single page:
\documentclass{article}
\usepackage{multicol}
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\begin{multicols}{2}[\textbf{Example for a two column text}]
\blindtext
\end{multicols}
\begin{table}[ht]
\caption{default}
\begin{center}
\begin{tabular}{|c|c|c|c|c|}
\hline
onecolumn& onecolumn& onecolumn& onecolumn&onecolumn\\
\hline
onecolumn& onecolumn& onecolumn& onecolumn&onecolumn\\
\hline
\end{tabular}
\end{center}
\label{default}
\end{table}%
\begin{multicols}{2}
\blindtext[10]
\end{multicols}
\end{document}
October 6, 2008 at 8:44 am |
Hi,
Thank you for this very useful tip. However, I think there a backslash missing in both commands: it shoud be:
\setlength{\columnsep}{distance}
and
\setlength{\columnseprule}{thickness}
instead of
\setlength{columnsep}{distance}
and
\setlength{columnseprule}{thickness}
Regards,
Christophe
October 6, 2008 at 10:34 am |
Hi Christophe,
You are right, there was a typo and I corrected it. Thanks for your help, I appreciate it very much.
Cheers,
Tom
August 23, 2009 at 1:39 am |
Tanks. Yours comands are very good and clear