Use the svg package in Overleaf.
You can include SVG files in your LaTeX document by loading the svg package and using the \includesvg command. Because the compiler needs to convert SVG files to PDF, you must often tell the package to skip the LaTeX-based text export to avoid errors.
The short answer: use \usepackage[inkscapelatex=false]{svg} in your preamble. This avoids errors about missing Inkscape-generated files and ensures your images render correctly.
How to include an SVG
| Step | Action |
|---|---|
| 1. Preamble | Add \usepackage[inkscapelatex=false]{svg} to your main.tex file. |
| 2. Upload | Upload your .svg file to your project folder. |
| 3. Include | Use \includesvg{filename} in your document body. |
The svg package automates the conversion of vector graphics into a format LaTeX can display. Follow these steps to set it up in your project.
Fixing common errors
The inkscapelatex=false option
By default, the svg package tries to extract text from your SVG to typeset it with LaTeX. This requires specific Inkscape features that may fail on some online editors. Setting this to false treats the SVG as a single image, which is more reliable.
\usepackage[inkscapelatex=false]{svg}Missing file errors
If you see an error saying a file like 'image_svg-tex.pdf' is missing, it means the conversion process did not finish. Check that your file path is correct and ensure you are using the correct filename without the .svg extension in the command.
\includesvg[width=0.5\textwidth]{my-figure}
Using subfolders
| Command | Usage |
|---|---|
| \svgpath{{images/}} | Tells the package to search the 'images' folder for your files. |
If you keep your images in a separate folder, use the \svgpath command to tell the compiler where to look. This prevents the package from losing track of your files.
Questions
Can I use SVG images in Overleaf?
Yes. You can include them by using the svg package. The online environment supports the necessary tools to convert SVG to a format LaTeX can process.
Why does my SVG not render?
If you see only the caption, the conversion process likely failed. Use the [inkscapelatex=false] option in your package declaration to simplify the conversion and fix most rendering issues.
Do I need to install Inkscape?
No. The online environment handles the conversion for you. You just need to provide the SVG file and load the package.
Should I include the .svg extension?
No. The \includesvg command expects the filename without the extension, similar to how \includegraphics works.
How do I resize an SVG?
Use the optional arguments in the \includesvg command, such as [width=0.5\textwidth] or [scale=0.8], just as you would with standard images.
Does Texeno support SVG images?
Yes. Texeno supports the svg package and handles the conversion process automatically on every plan.
Try your own paper in Texeno.
Start free, upload a project as a .zip and press Recompile. Upgrade when you need longer compiles.
Start writing