1

For an IEEE submission I am not allowed to use algorithm package. They recommend to use algorithmic package. I am not able to add caption in the algorithmic package. This and this answer solves the problem using algorithm package, which is of no use to me.

I am allowed to use algorithmicx package too. I am using IEEEtran file.

1 Answer 1

1

The following code defines \algcaption{<caption>} that sets a "pseudo-caption" for an algorithm:

enter image description here

\documentclass[conference]{IEEEtran}

\usepackage{lipsum}% Just for this example
\usepackage{algorithmic}

% A regular caption without a number
\newcommand{\algcaption}[1]{%
  \par\noindent
  \textbf{Algorithm:}
  #1\par
}

% If you need an algorithm counter, then use the following code definitions instead
% \newcounter{algorithm}
% \newcommand{\algcaption}[1]{%
%   \par\noindent
%   \refstepcounter{algorithm}%
%   \textbf{Algorithm \thealgorithm:}
%   #1\par
% }

\begin{document}

\title{A title}
\author{An author}

\maketitle

\section{A section}\lipsum[1]

\algcaption{This is an algorithm}

\begin{algorithmic}[1]
  \STATE Some statement
  \IF{some conditional}
    \STATE Another statement
  \ENDIF
\end{algorithmic}

\end{document}

You can also add a numbered caption using the code above (uncomment as necessary).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.