I'm working on a poster that has multiple columns (via multicols, probably because there's a custom poster title). I know I can use algorithmic2e, but assume I just want to stick with algorithmicx - is there any way I can handle this?

Package multicol Warning: Floats and marginpars not allowed 
inside `multicols' environment!.

All solutions I could find suggest either using algorithmic2e or declaring document as \documentclass[twocolumn]{article}.

I am not sure how to use the latter with the poster template.

Here's a minimal working code from template above with an algorithm environment and algorithm code copied from this question there, but it does not seem to show anything:


\usepackage{multicol} % This is so we can have multiple columns of text side-by-side
\columnsep=100pt % This is the amount of white space between the columns in the poster
\columnseprule=3pt % This is the thickness of the black line between the columns in the poster

\usepackage[svgnames]{xcolor} % Specify colors by their 'svgnames', for a full list of all colors available see here: http://www.latextemplates.com/svgnames-colors

% \usepackage{times} % Use the times font
\usepackage{palatino} % Uncomment to use the Palatino font

\usepackage{graphicx} % Required for including images
\graphicspath{{figures/}} % Location of the graphics files
\usepackage{booktabs} % Top and bottom rules for table
\usepackage[font=small,labelfont=bf]{caption} % Required for specifying captions to tables and figures
\usepackage{amsfonts, amsmath, amsthm, amssymb} % For math fonts, symbols and environments
\usepackage{wrapfig} % Allows wrapping text around tables and figures

%% custom packages


\newcommand*\Let[2]{\State #1 $\gets$ #2}


\veryHuge \color{NavyBlue} \textbf{Title} \color{Black}\\ % Title
\Huge\textit{Subtitle}\\[1cm] % Subtitle
% Department Name\\ % Address
\includegraphics[width=20cm]{logo.png} % Logo or a photo of you, adjust its dimensions here

\vspace{1cm} % A bit of extra whitespace between the header and poster content

\begin{multicols}{3} % This is how many columns your poster will be broken into, a poster with many figures may benefit from less columns whereas a text-heavy poster benefits from more

Some abstract.
Some intro
\section*{Main Objectives}
\item Lorem ipsum dolor sit amet, consectetur.
\item Nullam at mi nisl. Vestibulum est purus, ultricies cursus volutpat sit amet, vestibulum eu.
\item Praesent tortor libero, vulputate quis elementum a, iaculis.

  \caption{Counting mismatches between two packed \DNA strings
    \Require{$x$ and $y$ are packed \DNA strings of equal length $n$}
    \Function{Distance}{$x, y$}
      \Let{$z$}{$x \oplus y$} \Comment{$\oplus$: bitwise exclusive-or}
      \For{$i \gets 1 \textrm{ to } n$}
        \If{$z_i \neq 0$}
          \Let{$\delta$}{$\delta + 1$}
      \State \Return{$\delta$}


Thank you.

  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Dai Bowen Nov 20 '16 at 23:41
  • 1
    you haven't shown any relevant code but you presumably have an environment for the code inside a floating environment, and here you just want the inner environment. You would have the same error from a tabular in a table and the solution is just to have the tabular. – David Carlisle Nov 21 '16 at 0:18

Thanks to David Charlisle, I have figured that out.

The solution is simple, you just have to replace:




and everything starts magically working. Indeed, one should probably avoid using floating environments inside other floating environments.

  • You are phenomenal! This really was magical! – layser May 3 '19 at 4:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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