答案1
以下代码定义了\algcaption{<caption>}
为算法设置“伪标题”:
\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}
您还可以使用上面的代码添加编号标题(必要时取消注释)。