Eu tenho a seguinte estrutura de diretórios:
main.tex
chapter/
chapter1.tex
img/
image.svg
Este é o conteúdo de main.tex
:
\documentclass{report}
\usepackage{svg}
\begin{document}
\import{chapter/}{chapter1}
\end{document}
Isso é chapter/chapter1.tex
:
\begin{figure}
\centering
\includesvg[width=0.7\textwidth, svgpath = img/]{image}
\caption{Caption}
\end{figure}
Como usar o pacote de importação para manter referências de caminhos relativos em subarquivos e ao mesmo tempo usar arquivos SVG?
Se eu usar o svg em um arquivo principal e não em um subarquivo, ele será gerado corretamente.
Responder1
Adicionando
\makeatletter
\svgpath{{\input@path/img/}}
\makeatother
para o início das chapter1.tex
obras.