The Oxford Bioinformatics journal's template is one of my favorites and I use it for many of my school assignments. The template uses a two-column layout, but in an appendix at the end of the document I would like to include some source code. This of course looks horrible in the two-column layout, but I have been unable to suppress the two-column mode using multicol macros. Is there any way I can do this?

  • 2
    Try the \figure* environment and put your source code inside.
    – user11232
    Mar 24, 2012 at 14:43
  • @HarishKumar Excellent idea. I tried it myself, and it would have worked...except that the source code is longer than a single page. :( Mar 24, 2012 at 15:23

3 Answers 3


Just put \onecolumn before the appendix. Note that the commands \onecolumn and \twocolumn start a new page.


You can put your source code inside a starred version of figure which will span both the columns in a two column document ( a misuse but for good).

  Your source code here.
  \caption{The source code for bla bla bla}

But these starred versions will either put the figure in a new page of their own or at the top of the page. (htbp do not work so neatly) To cure this one can load


in the preamble. Then the place holders option [tbp] can be used to put the figure at top, bottom of the page or in a new page. But [h] will still not be available.

Reference: wikibook


Insert the following in the preamble to be able to have full width code, and multicolumn text:

     showspaces=false,  % shows spacing symbol
     aboveskip=0pt, % compact the code looks ugly in type
     belowskip=0pt,  % user responsible to insert any skips
      backgroundcolor=\color{gray!15}, #1
%% Hack to have one column environments for Code

In the Appendix code is written as:


enter image description here

As a general suggestion add text in between code fragments rather than a long code listing it will look better.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .