![不使用算法,在算法包中添加标题](https://linux22.com/image/404437/%E4%B8%8D%E4%BD%BF%E7%94%A8%E7%AE%97%E6%B3%95%EF%BC%8C%E5%9C%A8%E7%AE%97%E6%B3%95%E5%8C%85%E4%B8%AD%E6%B7%BB%E5%8A%A0%E6%A0%87%E9%A2%98.png)
答案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}
您还可以使用上面的代码添加编号标题(必要时取消注释)。