ieee-pandoc-template
ieee-pandoc-template copied to clipboard
Undefined Control Sequence When Inserting Image
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.
Workaround: remove $if(graphics)$
from line 129 and the corresponding $endif
from line 139 in in template.latex.
($if(graphics)$
and $endif$
can't be commented out with %
s; as @matthiasdiener writes, they must be deleted.)