0

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,

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

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

1
  • 1
    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 '17 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.