おそらく\itemが見つからないというエラーが繰り返し発生します

おそらく\itemが見つからないというエラーが繰り返し発生します

LaTeX コードに問題があります。エラーが繰り返し発生します:

Underfull \vbox (badness 10000) has occurred while \output is active [13]

! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.461 \end{algorithmic}

LaTeX コード:

\documentclass{article}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{pifont}

\begin{document}
\begin{algorithm}
\caption{ glavna\_zanka }%function 
\begin{algorithmic}[1]
\While{ končaj $\not=$ false } 
\State $ rotiraj\_robota()$
 \State obrobje o = $izberi\_raziskovalni\_cilj()$
\If { o $\neq$ null } 
    \State $ premakni\_do\_cilja(o)$
\Else
    \State  končaj = true
\EndIf
\EndWhile
\end{algorithmic}
\end{algorithm}

\begin{algorithm}
\caption{ izberi\_raziskovalni\_cilj() }
\begin{algorithmic}[1]
\end{algorithmic}
\end{algorithm}

\end{document} 

この問題に関する知見があればいただければ幸いです。

答え1

予想される本体にはいくつかのコード行がありますalgorithmic。コンパイル可能な例と比較してください。

\documentclass{article}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{pifont}

\begin{document}
\begin{algorithm}
\caption{ glavna\_zanka }%function 
\begin{algorithmic}[1]
\While{ končaj $\not=$ false } 
\State $ rotiraj\_robota()$
 \State obrobje o = $izberi\_raziskovalni\_cilj()$
\If { o $\neq$ null } 
    \State $ premakni\_do\_cilja(o)$
\Else
    \State  končaj = true
\EndIf
\EndWhile
\end{algorithmic}
\end{algorithm}



\begin{algorithm}
\caption{ izberi\_raziskovalni\_cilj() }
\begin{algorithmic}[1]
\While
\EndWhile
\end{algorithmic}
\end{algorithm}

\end{document} 

ところで、LaTeX Error: Something's wrong--perhaps a missing \item.私の経験では、まれに、欠品があるという意味です。:-)

答え2

アルゴリズム環境には次のようなコンテンツが必要であるようです:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{pifont}

\begin{document}
%
\begin{algorithm}
  \caption{ glavna\_zanka }%function
  \begin{algorithmic}[1]
    \While{ končaj $\not=$ false }
    \State $ rotiraj\_robota()$
    \State obrobje o = $izberi\_raziskovalni\_cilj()$
    \If { o $\neq$ null }
    \State $ premakni\_do\_cilja(o)$
    \Else
    \State končaj = true
    \EndIf
    \EndWhile
  \end{algorithmic}
\end{algorithm}

\begin{algorithm}
  \caption{izberi\_raziskovalni\_cilj()}
  \begin{algorithmic}[1]
    \State Lalala…
  \end{algorithmic}
\end{algorithm}

\end{document} 

ここに画像の説明を入力してください

関連情報