Latex 排版报错的语句

\begin{[email protected]} on input line 927 ended by \end{algorithmic}. \end{algorithmic}

我源代码是这个样子的

\begin{algorithm}

\caption{Update Particles’s Position}

\label{alg5}

\begin{algorithmic}[1]

\STATE{ for each particlep } \\

\STATE{$a=sizeV^{t+1}_{w}(p)$ }\\

\STATE{$b=sizeW^{t}(p)$}\\

% \IF {$a=b$}

\STATE{ $W^{t+1}(p)=W^{t}(p)+V^{t+1}_{w}(p)$} \\

% \IF {$a<b$}

\STATE{$W^{t}(p)=size\_reduce(W^{t}(p)|a)$}\\

\STATE{$W^{t+1}(p)=W^{t}(p)+V^{t+1}_{w}(p)$}\\

% \Else

\STATE{$W^{t}(p)=\ size\_increase(W^{t}(p)|a)$}

\STATE{$W^{t+1}(p)=W^{t}(p)+V^{t+1}_{w}(p)$}\\

% \ENDIF

\STATE{end for}

\end{algorithmic}

\end {algorithm}

通过注解发现,影响出现这个问题的语句是if有关的语句,可以在查一下if语句的用法。

Latex 排版报错的语句 \begin{[email protected]} on input line 927 ended by \end{algorithmic}. \end{algorithmic}

 

通过再次对比发现,可能是if和endif匹配的问题

 

Latex 排版报错的语句 \begin{[email protected]} on input line 927 ended by \end{algorithmic}. \end{algorithmic}

 

Latex 排版报错的语句 \begin{[email protected]} on input line 927 ended by \end{algorithmic}. \end{algorithmic}

参考http://www.ctan.org/pkg/algorithms 给的文献,发现是书写的问题。

 

相关文章:

  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案