# Tag Archives: twocolumn

## LaTeX documentclass options illustrated

The three most commonly used standard document-classes in LaTeX include: article, report and book. A number of global options allows customization of certain elements of the document by the author. Different document-classes might have different default settings. The following post illustrates available options with figures, provides alternatives and highlights the default option for each document-class.

To change the default behavior, the option is provided as an optional parameter to the documentclass command.

\documentclass[option1, option2, etc.]{article}

• Font size (10pt, 11pt, 12pt)
• Paper size and format (a4paper, letterpaper, etc.)
• Draft mode (draft)
• Multiple columns (onecolumn, twocolumn)
• Formula-specific options (fleqn and leqno)
• Landscape print mode (landscape)
• Single- and double-sided documents (onepage, twopage)
• Titlepage behavior (notitlepage, titlepage)
• Chapter opening page (openright, openany)
•

##### Font size

LaTeX knows three standard font sizes:

• 10pt (default)
• 11pt
• 12pt

Other global and local font sizes are available through various packages.

The following example sets the global document font size to 12pt. The picture below compares the three LaTeX standard font sizes.

\documentclass[12pt]{article}
\usepackage{blindtext}
\begin{document}
\blindtext
\end{document}

##### Paper size and format

Different regions of the world use different standard physical paper sizes. Available are:

• a4paper (default)
• letterpaper (default in some distributions)
• a5paper
• b5paper
• executivepaper
• legalpaper

The following example compares (from left to right): legal, A4, Letter and A5.

\documentclass[a4paper]{article}
\usepackage{showframe}
\begin{document}
\begin{center}{\Huge A4 paper}\end{center}
\end{document}

The geometry package provides similar options and additional flexibility for paper size and margins.

##### Draft mode

Setting the draft option will speed up typesetting, because figures are not loaded, just indicated by a frame. LaTeX will also display hyphenation (Overfull hbox warning) and justification problems with a small black square. Delete the draft option or replace it with final in the final document version.

##### Multiple columns
• onecolumn (default)
• twocolumn

By default, text is typeset in a single column (onecolumn). LaTeX provides an easy way to switch to two columns through the document-class option twocolumn.

The multicol package allows creating more than two columns globally as well as locally.

##### Formula-specific options
• fleqn: left-alignment of formulas
• leqno: labels formulas on the left-hand side instead of right

These are two independent options manipulating the alignment and label position of formulas.

The top figure illustrates the default case with neither option set. The bottom figure shows how formulas are typeset when both options, fleqn and leqno, are set.

##### Landscape print mode

The landscape option changes the page layout to landscape mode. This, however, does not change the page margins accordingly (first page in figure), which is why for landscape documents with landscape content the pdflscape or geometry packages (second page in figure and code) are more suitable.

\documentclass[a4paper]{article}
\usepackage{blindtext, showframe}
\usepackage[landscape]{geometry}
\begin{document}
\blindtext
\end{document}

##### Single- and double-sided documents
• oneside (default for article and report)
• twoside (default for book)

In single-sided documents (oneside), the left and right margins are symmetric and headers are exactly the same on every page. In other words, the document does not distinguish between inner and outer margin. Twoside, on the other hand, generates double-sided content. The outer margin (even page: left; odd page: right) is wider by default (see figure below). It might appear that the header “switches” sides, but that because they are placed with respect to the margins. The twoside option is usually set for bound texts such as theses or books.

\documentclass[twoside]{report}
\usepackage{blindtext, showframe, fancyhdr}
\pagestyle{fancy}
\begin{document}
\chapter{First chapter}
\section{First section}
\blindtext
\clearpage
\Blindtext
\end{document}

##### Titlepage behavior
• notitlepage (default for article)
• titlepage (default for report and book)

The option titlepage ends the page after \maketitle and restarts on the next page. In article, the content starts right after \maketitle. The titlepage option is quivalent to:

\maketitle
\clearpage

The example below illustrates the default behavior of article.

\documentclass{article}
\usepackage{blindtext}
\title{This is an article}
\begin{document}
\maketitle
\begin{abstract}
\blindtext
\end{abstract}
\end{document}

##### Chapter opening page
• openany (default for report)
• openright (default for book)

Finally, the option openright always starts a chapter on the right (odd pages), leaving one page blank in case the last paragraph of the previous chapter ended on an odd page. It only works and makes sense with the twoside option set. The openany option starts the chapter on the next page (even or odd).

The openany, openright options are not available in article as it does not support \chapter!

\documentclass[twoside, openright]{report}
\usepackage{blindtext}
\begin{document}
\chapter{First chapter}
\blindtext
\chapter{Second chapter}
\blindtext
\end{document}

## Creating two columns in article, report or book

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.