ディレクトリ構造は次のようになります。
main.tex
chapter/
chapter1.tex
img/
image.svg
以下の内容ですmain.tex
:
\documentclass{report}
\usepackage{svg}
\begin{document}
\import{chapter/}{chapter1}
\end{document}
これはchapter/chapter1.tex
:
\begin{figure}
\centering
\includesvg[width=0.7\textwidth, svgpath = img/]{image}
\caption{Caption}
\end{figure}
インポート パッケージを使用してサブファイル内の相対パス参照を保持し、同時に SVG ファイルを使用するにはどうすればよいでしょうか?
svg をサブファイルではなくメイン ファイルで使用すると、正しく生成されます。
答え1
追加
\makeatletter
\svgpath{{\input@path/img/}}
\makeatother
工事開始までchapter1.tex
。