I am trying to create a number of figures in Overleaf which consist of several subpictures. To get highly resoluted pictures, I have saved them in .svg format. I have read different posts and learned that the svg package utilizes the subfigure (or subfig?) package to achieve this. I have tried to create my images in different ways, nothing really works. I have also read that there are workarounds using inkscape, but those seem outdated.. What code can I use in LaTeX to achieve what I want?
One of the versions I have tried is the following:
\documentclass{article}
\usepackage{svg}
\usepackage{subfigure}
\begin{document}
\begin{figure}[H]
\begin{subfigure}[t]{1\textwidth}
\includesvg[width=\linewidth]{sul_trends.svg}
\label{fig:a}
\end{subfigure}
\end{figure}
But it produces an error: Missing number, treated as zero. <to be read again> } l.322 \begin{subfigure}[t]{1\textwidth}
Best Answer
Since
svg
loadssubfig
, which is in turn incompatible withsubcaption
,there's not left: Use\subfloat
inside of afigure
environment.The
subfigure
package is obsolete and shouldn't be used any longer!