ieee-pandoc-template icon indicating copy to clipboard operation
ieee-pandoc-template copied to clipboard

Undefined Control Sequence When Inserting Image

Open cansurmeli opened this issue 6 years ago • 2 comments

When I use the below code to insert a figure:

\begin{figure*}
  \centering
  \includegraphics[width=\textwidth,height=668px]{images/overall-architecture.png}
  \caption{The overall architecture.}
  \label{fig:overall-architecture}
\end{figure*}

I get the following error:

pandoc -o build/paper.pdf --bibliography=bibliography.bib --csl=bibliography.csl -s -f markdown --template=template.latex paper.md metadata.yaml                                                                
Error producing PDF.                                                                                                                                                                                            
! Undefined control sequence.                                                                                                                                                                                   
l.239     \includegraphics                                                                                                                                                                                      

make: *** [pdf] Error 43

Also, for some weird reason, the error regarding LaTeX gets resolved once I add an image via the Markdown syntax:

![]([PATH_TO_IMAGE])

What's causing this error? As far as I can see, this is all valid LaTeX.

cansurmeli avatar Jun 21 '18 11:06 cansurmeli

Workaround: remove $if(graphics)$ from line 129 and the corresponding $endif from line 139 in in template.latex.

matthiasdiener avatar Aug 27 '19 21:08 matthiasdiener

($if(graphics)$ and $endif$ can't be commented out with %s; as @matthiasdiener writes, they must be deleted.)

seanakabry avatar Aug 28 '22 04:08 seanakabry