Latex算法包错误"一个missings \ item"

时间:2018-04-29 12:32:37

标签: latex pdflatex

我试图编译我的文本并从以下oart

获取错误
\begin{algorithm}
\caption{$Point2PointCollision()$}
\label{P2P}
\begin{algorithmic}[1]
\State {\textbf{Input:} $bla bla$}
\State {\textbf{Output:} $bla bla$}
\State {calculate $blabla$}
    \If {$bla bla$} 
    \State {$bla bla$}
    \Else 
    \State {$bla bla$}
    \EndIf
\end{algorithmic}
\end{algorithm}

错误是

  

LaTeX错误:有些不对劲 - 可能是缺少\项目。

     

有关说明,请参阅LaTeX手册或LaTeX Companion。输入H.     立即帮助。 ......

                                               l.383 \end{algorithmic}

这是主要的tex文件:

\documentclass[twoside,10pt]{Latex/Classes/PhDthesisPSnPDF}

% put the packages you want to use here
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{paralist}
\usepackage{graphicx} % for pdf, bitmapped graphics files
\usepackage{epsfig} % for postscript graphics files
\usepackage{textcomp}
\usepackage{adjustbox}
\usepackage{epsf}
\usepackage{epstopdf} % for postscript graphics files
\usepackage{times} % assumes new font selection scheme installed
\usepackage{amsmath} % assumes amsmath package installed
\usepackage{amssymb}  % assumes amsmath package installed
\let\proof\relax
\let\endproof\relax
\usepackage{cite}
\usepackage{graphicx}
\usepackage{psfrag}
\usepackage{algorithm}  %for algorithm environment
%\usepackage{algorithmic}
\usepackage{algpseudocode}
\renewcommand{\algorithmicrequire}{\textbf{Input:}}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
\usepackage{enumerate}
\usepackage{makecell}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{dblfloatfix}
\usepackage{setspace}
\usepackage{paralist}
\usepackage{booktabs}
\theoremstyle{definition}
\newtheorem{exmp}{Definition}
\usepackage{bm,upgreek}
\usepackage{bmpsize}
\usepackage{tikz}
\newtheorem{definition}{Definition}

\usepackage[normalem]{ulem}
\include{3_chapter/chapter}
\end{document}

任何人都可以帮我解决这个问题吗?

提前致谢

0 个答案:

没有答案