8

Is there a minimal working example of using .svg figures in Overleaf with a project structured in folders?

1 Answer 1

6

This is a minimally working example of using .svg figures in Overleaf, with a folder structure.

Directory structure:

enter image description here

Code:

\documentclass{article}
%\usepackage[svgpath=../imgs/]{svg} % <- also works
\usepackage{svg}
\svgpath{{../imgs/}} % <- using \svgpath to avoid warning
\usepackage{amsmath}
\usepackage{url}
\usepackage{hyperref}

\title{Inkscape package on Overleaf }
\begin{document}
\maketitle

\begin{figure}[htbp]
  \centering
  \includesvg[inkscapelatex=false, width = 100pt]{image}
  \caption{svg image}
\end{figure}

\end{document}

MWE (with some comments): https://www.overleaf.com/read/bvnpfzbpvvmc

ps: I know there are many similar answers, but none made clear how to use folders and this literally took me 2 hours to figure out, so I'm posting here.

2
  • 1
    Just wanted to mention that the inkscapelatex=false argument solved another problem of mine! It prevents the text from being recompiled (not sure if this is correct terminology!) and keeps the text integrity in electronic svg schematics! Thank you.
    – Ben FM
    Nov 23, 2022 at 20:33
  • 1
    @BenFM glad it helped!
    – Bersan
    Nov 23, 2022 at 22:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .