%%%% ijcai21.tex
\typeout{IJCAI--21 Instructions for Authors}
% These are the instructions for authors for IJCAI-21.
\documentclass{article}
\pdfpagewidth=8.5in
\pdfpageheight=11in
% The file ijcai21.sty is NOT the same than previous years'
\usepackage{ijcai21}
% Use the postscript times font!
\usepackage{times}
\usepackage{soul}
\usepackage{url}
\usepackage[hidelinks]{hyperref}
\usepackage[utf8]{inputenc}
\usepackage[small]{caption}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{booktabs}
\usepackage{algorithm}
\usepackage{algorithmic}
\urlstyle{same}
\newtheorem{example}{Example}
\newtheorem{theorem}{Theorem}
\pdfinfo{
/TemplateVersion (IJCAI.2021.0)
}
\title{IJCAI--21 Formatting Instructions}
% Single author syntax
\author{
}
\begin{document}
\maketitle
\begin{algorithm}[tb]
\caption{Example algorithm}
\label{alg:algorithm}
\textbf{Input}: Your algorithm's input\\
\textbf{Parameter}: Optional list of parameters\\
\textbf{Output}: Your algorithm's output
\begin{algorithmic}[1] %[1] enables line numbers
\STATE Let $t=0$.
\WHILE{condition}
\STATE Do some action.
\IF {conditional}
\STATE Perform task A.
\ELSE
\STATE Perform task B.
\ENDIF
\ENDWHILE
\STATE \textbf{return} solution
\end{algorithmic}
\end{algorithm}
\end{document}
All I want to use the procedure contains input and the three statements.
Best Answer
If you want/have to use the
algorithmic
package, you have to define the procedure statement yourself. Put the following code into your preamble.Use it as follows:
If you use the
algpseudocode
package (which is based on thealgorithmicx
package), procedures are predefined.Package "algorithmic"
Package "algpseudocode"