다음과 같은 디렉토리 구조가 있습니다.
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
.