XeLaTeX 在导出 svg 时传递给 Inkscape 错误路径

XeLaTeX 在导出 svg 时传递给 Inkscape 错误路径

这是我的.tex文件:

\documentclass[12pt]{article}
\author{}

\usepackage{svg}
\usepackage{graphicx}
\graphicspath
  {
  {./images/svg/}
  }
\begin{document}

\newpage

\includesvg{src/images/svg/demo.svg}

\end{document}

输出:


** (org.inkscape.Inkscape:182359): WARNING **: 17:28:44.888: Can't open file: /home/mykola/Projects/Latex/images/svg/demo.svg (doesn't exist)

** (org.inkscape.Inkscape:182359): WARNING **: 17:28:44.888: Can't open file: /home/mykola/Projects/Latex/images/svg/demo.svg (doesn't exist)
ink_file_open: '/home/mykola/Projects/Latex/images/svg/demo.svg' cannot be opened!
InkscapeApplication::document_open: Failed to open: /home/mykola/Projects/Latex/images/svg/demo.svg
ConcreteInkscapeApplication::on_open: failed to create document!



Package svg Warning: The export with Inkscape failed for file
(svg)                `images/svg/demo.svg'
(svg)                Troubleshooting: Please check in the log file how
(svg)                the invocation of Inkscape took place and try to
(svg)                execute it yourself in the terminal on input line 2.


! Package svg Error: File `demo_svg-tex.pdf' is missing.

See the svg package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                            

该文件实际上位于./src/images/svg/demo.svg

如您所见,它为 Inkscape 传递了错误的路径(即我的~)。我该如何处理?

更新:现在它找到了该文件。原因是它似乎\graphicspath与我导入的文件没有任何联系svg

相关内容