여러 열로 구성된 포스터(다중 열)에 알고리즘x 삽입

여러 열로 구성된 포스터(다중 열)에 알고리즘x 삽입

저는 여러 열이 있는 포스터를 작업 중입니다(를 통해 multicols, 아마도 사용자 정의 포스터 제목이 있기 때문일 것입니다). 를 사용할 수 있다는 것을 알고 있지만 algorithmic2e계속 사용하고 싶다고 가정합니다 algorithmicx. 이를 처리할 수 있는 방법이 있습니까?

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

내가 찾을 수 있는 모든 솔루션은 algorithmic2e문서를 \documentclass[twocolumn]{article}.

후자를 어떻게 사용하는지 잘 모르겠습니다.포스터 템플릿.

algorithm다음은 환경 및 알고리즘 코드가 복사된 위 템플릿의 최소 작업 코드입니다.이 질문하지만 아무것도 표시되지 않는 것 같습니다.

\documentclass[a0,landscape]{a0poster}

\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

\usepackage{tikz}
\usepackage{relsize}
\usepackage{anyfontsize}
\usepackage{algpseudocode,algorithm,algorithmicx}

\newcommand*\DNA{\textsc{dna}}
\newcommand*\Let[2]{\State #1 $\gets$ #2}
\algrenewcommand\algorithmicrequire{\textbf{Precondition:}}
\algrenewcommand\algorithmicensure{\textbf{Postcondition:}}

\begin{document}

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

\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

\begin{abstract}
Some abstract.
\end{abstract}
\section*{Introduction}
Some intro
\section*{Main Objectives}
\begin{enumerate}
\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.
\end{enumerate}
\color{Black}

\begin{algorithm}
  \caption{Counting mismatches between two packed \DNA strings
    \label{alg:packed-dna-hamming}}
  \begin{algorithmic}[1]
    \Require{$x$ and $y$ are packed \DNA strings of equal length $n$}
    \Statex
    \Function{Distance}{$x, y$}
      \Let{$z$}{$x \oplus y$} \Comment{$\oplus$: bitwise exclusive-or}
      \Let{$\delta$}{$0$}
      \For{$i \gets 1 \textrm{ to } n$}
        \If{$z_i \neq 0$}
          \Let{$\delta$}{$\delta + 1$}
        \EndIf
      \EndFor
      \State \Return{$\delta$}
    \EndFunction
  \end{algorithmic}
\end{algorithm}

\end{multicols}
\end{document}

감사합니다.

답변1

덕분에데이비드 찰리슬, 나는 그것을 알아 냈습니다.

해결책은 간단합니다. 다음을 교체하기만 하면 됩니다.

\begin{algorithm}

~와 함께

\begin{algorithm}[H]

그리고 모든 것이 마법처럼 작동하기 시작합니다. 실제로, 다른 부동 환경 내에서 부동 환경을 사용하는 것은 피해야 할 것입니다.

관련 정보