I'm trying to write a paper in Overleaf and trying to follow Gilles Castel's format of importing SVG files into my TeX document. I understand he used VIM to program his TeX documents, but the fundamental should be the same. However, when compiling the file I'm trying to include is recognized as a *.pdf instead of *.pdf_tex, which results in a blank figure box to appear in my document with the text which is included in the figure, but not any of the graphic art drawn.
Below is a minimal reproducible example of how I attempted to import the image.
\documentclass{article}
\usepackage{import}
\usepackage{pdfpages}
\newcommand{\incfig}[1]{%
\def\svgwidth{\columnwidth}
\import{./figures/}{#1.pdf_tex}
}
\begin{document}
\begin{figure}[h!]
\centering
\incfig{myfigure}
\caption{A figure.}
\label{fig:myfigure}
\end{figure}
\end{document}
My SVG files are stored in a local folder ./pdftex/ and has figure name HBRIDGE-CIRCDIAGRAM. However, to reproduce, you can choose whichever filename with *.pdf_tex.
I'm expecting that the file name is recognized and pulled from ./figures/ but instead the program recognizes it as a *.pdf file instead, resulting in a blank image.
Below is an image of how I have the files set up in my folder:
I then include it in my code in the following fashion:
And Overleaf produces the following output:
Any thoughts on why this is happening and how to fix it?
Thank you.