0

I have two separate files, in different folders/directories, but with the same file name.

\begin{figure}[htp]
\includesvg[width = \textwidth]{/home/con/identify.target/A/svg/msa.svg}
\caption{}
\label{fig:1}
\end{figure} \FloatBarrier
\begin{figure}[htp]
\includesvg[width = \textwidth]{/home/con/identify.target/B/svg/msa.svg}
\caption{}
\label{fig:2}
\end{figure} \FloatBarrier

which is what I did originally, which doesn't work, as both images show identically

I have tried the solution from: \graphicspath : Images with duplicate filenames, different folder locations

which makes my code into

    \graphicspath{{/home/con/identify.target/A/}}
    \begin{figure}[htp]
    \includesvg[width = \textwidth]{msa.svg}
    \caption{}
    \label{fig:1}
    \end{figure} \FloatBarrier
\graphicspath{{/home/con/identify.target/B/}}
    \begin{figure}[htp]
    \includesvg[width = \textwidth]{msa.svg}
    \caption{}
    \label{fig:2}
    \end{figure} \FloatBarrier

which unfortunately produces the same result, the images are still treated identically

I have also tried extractpath and extractname from the manual https://mirror.math.princeton.edu/pub/CTAN/graphics/svg/doc/svg.pdf

Renaming the files should work,but I don't want to have to rename thousands of files.

4
  • 1
    Did you copy/past the same path, in your example code? Looks the same.
    – user287367
    Commented Jan 17 at 18:54
  • @rallg that's a typo, when I made the minimum working example. Sorry about that, I've corrected it
    – con
    Commented Jan 17 at 19:13
  • I cannot answer the question, but I notice that there seems to be a difference in your code and the code in your linked answer: Your code uses absolute path, but the other code uses relative path to subfolder. Is that relevant, or not?
    – user287367
    Commented Jan 18 at 0:32
  • 1
    @rallg I don't think that's relevant, but github.com/mrpiggi/svg/issues/11 provides a workaround for this problem
    – con
    Commented Jan 18 at 15:45

1 Answer 1

1

This is a (unfortunately long standing) known issue. See https://github.com/mrpiggi/svg/issues/11. As a workaround, you should use inkscapepath=svgsubdir.

You must log in to answer this question.

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