Ceci est une ancienne révision du document !
The use of text in columns is fairly common. You are not likely to use columns when writing an essay for school, or in a resume, or writing a story. Newspapers, magazines (like FCM), journals, business reports, all set type in columns in which the text flows down the page, then up to the next column, then down again, and on and on. As is usual in Latex, there are different ways to accomplish the task, the current task being to set text in columns. For small amounts of text, it is possible to use a table. (Formatting tables was reviewed in Full Circle Magazine #182.) For longer sections of text, or to avoid using tables, there are several tools available to format columns. If you search on CTAN for “multicol”, you will find more than one dozen possible choices.
As is true for many features in Tex / Latex, there is little or no information to tell a new user how to include a new feature in their installation and how to use it. I checked information for the following environments: balance, balanced, cuted, doublecol, multicol, threecol, twocolumns, vwcol. Only multicol and vwcol had README files (which are identical, and generic, and do not provide any instructions for installation or use). Cuted, multicol and vwcol had informative documentation files.
Here is an explanation of cuted: Standard LATEX will switch between \onecolumn and \twocolumn only at the top of a page; the commands themselves clear the previous page. This package does away with the restriction, and allows you to mix one- and two-column modes on the same page. The PDF documentation is less than two pages, and explains what the options do and how to turn them on.
The documentation for vwcol is 24 pages. It sets out the purpose of the environment clearly at the beginning. Vwcol is designed for paragraphs of text to be in multiple columns of various widths. The columns cannot span multiple pages. The environment is not designed for anything but text.
The documentation for multicol is 39 pages, a lot to read if you are only trying to set up the layout of a document that is overdue. The environment multicols allows for single-column and multi-column layouts on the same page.
I am going to experiment only with multicol and vwcol in this article. I will use the lipsum package to generate fake text, as usual. I will experiment to find out if tables and images can be included in columns. I will start with vwcol since it was developed first (see code above).
I hope the code is reasonably self-explanatory. The option “widths” sets up the number and size of the columns. In this example I used decimals, per-cents are also acceptable, as are physical units like inch and cm. If Latex calculates the total of the column widths plus the spacing between columns exceeds the margin widths, the file will not compile. The “rule=1pt” tells Latex to put a line 1 point wide between the columns.
Vwcol is restricted to putting columns on one page. When I added lipsum[5] inside the vwcol environment, all of the columns shifted to the next page of the document and text filled to the physical bottom of the page, there was text in the bottom margin area. This is clearly an error.
If you are writing or laying out a newsletter or magazine you want to be able to have articles that flow from one page to the next. Vwcol is not adequate for this work. I will next experiment with the multicol environment using similar code to what I used with vwcol (top left).
Notice the name of the package is multicol but, to begin and end the environment, an “s” is added to the end of the package name. I am sure you can see that the three columns in the multicol example are equal width and that the column rule is missing. The column separator rule can be inserted using \setlength{\columnseprule}{2pt}. If the document uses the package color then the colour of the column rule can also be changed:
\def\columnseprulecolor{\color{red}}
If I add a few more paragraphs I can make the columns go onto the second page. I have also added a paragraph outside the multicols environment in a single column (see code above). I can introduce another multicols environment with either the same or a different number of columns. The ability to switch from multiple columns to a single column allows for images and tables and other items to go from left margin to right margin without interfering with the columns of text.
The multicol environment has a great deal of flexibility. It should satisfy the needs of most writers and editors who need multi-column layouts. I strongly recommend reading the accompanying PDF file and experimenting with various options before attempting to use the multicol environment in production.