# AAAI \includegraphics undefined control sequence

I searched a lot about an issue I'm facing when I'm trying to insert \includegraphics to my aaai latex document. I'm using the online editor so you may trace the error easier. Here is my sample

\documentstyle[aaai]{article}
\bibliographystyle{aaai}
\author{xxx}
\title{xxx}
\begin{document}
\maketitle
\nocite{*}
\section{xxx}
\begin{figure}
\includegraphics{fish}
\caption{This is a fish.}
\end{figure}

\bibliography{references}

\end{document}


I'm getting undefined control sequence. I'm using aaai.sty so I can't include any package. If there is any way to include aaai as a class this may solve the problem, any suggestion please?

Regards,

• \includegraphics is defined in the graphicx package so you need \usepackage{graphicx} Feb 10, 2017 at 1:06

Thank you, I solve it by changing \documentstyle[aaai]{article}

to

\documentclass{article}
\usepackage{aaai}
\usepackage{graphicx}


Because when using \documentstyle it will not allow you to use any package

Thnks for the hint

• sorry I didn't notice that you had \documentstyle absolutely no latex2e document should ever use that!!!! It is the old latex2.09 command and is just there for compatibility with documents written before 1993. To see it being used this century is very weird. Feb 10, 2017 at 1:27