TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a simple document class adapted from article, but independent (.cls file). The document is twocolumn, but when I add a title with

    {\LARGE \@title \par}%

This makes the entire document onecolumn. How should I set the titlepage environment to be onecolumn without affecting the entire document?

share|improve this question
up vote 9 down vote accepted

The definition of the titlepage environment in article.cls depends on whether compatibility mode is on/off, but both variants include

\if@restonecol\twocolumn \else \newpage \fi

in the code to be executed at the end of the environment. In your version of titlepage, you simply switch to \onecolumn (which makes \@restonecoltrue superfluous) at the start of the environment, so you need to switch back to \twocolumn at the end. I suggest, however, to simply use the original non-compatibility variant of titlepage, as this will make your custom class also work in onecolumn mode.

share|improve this answer
very clear information! I wonder how I missed that critical line :) – All Apr 16 '12 at 17:11

You can define \maketitle using the optional argument to the command \twocolumn:

  \twocolumn[\vbox to \textheight{\vfil
    \begin{center}\LARGE \@title \par\end{center}%

The command \twocolumn does 3 things:

  1. starts a new page if necessary
  2. typesets its optional argument in one-column mode
  3. the rest of the new page is in two-column mode
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.