graphicspath 和 pdf_tex 的问题

graphicspath 和 pdf_tex 的问题

我将其用作\input子部分,其中我想通过 包含一个 pdf_tex 文件 MK.pdf_tex。pdf_tex\input文件位于文件夹 /fig 中。如果我使用\input{./fig/MK.pdf_tex}它,它会返回错误“未找到 MK.pdf”。

如果我尝试使用如下面的代码所示的图形路径,我会收到错误“未找到MK.pdf_tex”。

\usepackage{graphicx}
\graphicspath{{C:/Thesis/fig/}{./fig/}}
\begin{document}
\input{subsection}
\end{document}

在我的小节中:

\begin{figure}[!ht]
\centering
\def\svgwidth{8cm}
\input{MK.pdf_tex}  
\end{figure}

因此,我假设在第一种情况下,只有 pdf_tex 从输入中获取路径信息。在第二种情况下,我猜想 graphicspath 不起作用。

如果我将 MK 文件放在与 subsection.tex 相同的文件夹中,它就可以工作。

非常感谢,Doedork

答案1

\graphicspath{}命令仅为 定义目录\includegraphics{},因此在\input命令中您必须使用相对位置,例如\input{./fig/MK.pdf_tex}。如果我没记错的话,有一个\inputx包允许对 执行相同操作\input;也许你想试一试。

相关内容