I am compiling my thesis using Latex, which eventually generates a PDF file. In addition to its textual content, I want to insert a graphical image (.png) as its cover page. This is what I am doing with the help of titlepic, pdfpages Latex packages.
In my permeable:
\usepackage{titlepic}
\usepackage{pdfpages}
In my document class:
\begin{document}
\includepdf[pages=1]{./figures/ThesisCover.png}
\end{document}
Now this brings the following Latex error:
! Undefined control sequence. l.31 \if@titlepage The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g.,
\hobx'), typeI' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.
Can anybody shed a light on how to solve this problem ?
Thanks

\includepdf[pages=1]{./figures/ThesisCover.png}you try to include page 1 of the PDF compile of your cover, which doesn't exist.pdfpagesdoesn't do that, see manual at ctan.org/pkg/pdfpages ; use packagegraphicxinstead, see also tex.stackexchange.com/a/755844/245790