我需要使用图像魔术师代替Inkscape将svg
s 转换为pdf
s 以便将图形包含到我的文档中。
我找到了这一段在svg and svg-extract
手册中:
这是我目前所做的:
- 我没有
InkScape
安装。(我已删除了一个) - 添加了
convert
(即图像魔术师)shell_escape_commands
在/usr/share/texlive/texmf-dist/web2c/texmf.cnf
- 命令提示符:
lualatex --shell-escape -output-directory=build -aux-directory=build/a -include-directory=src test.tex
我的 tex 文件:
\documentclass[]{article}
\author{}
\usepackage{graphicx}
\usepackage{svg} % <-----------
\usepackage[convert]{svg-extract} % <-----------
\usepackage{transparent}
\usepackage{import}
\usepackage{xcolor}
\def\svgFld{src/images}
\begin{document}
\includesvg{\svgFld/red.svg}
\end{document}
图像文件位于src/images
。
输出:
("|'inkscape' -V ")
Package svg Warning: No version of Inkscape was detected by invoking
(svg) `inkscape -V'
(svg) so the Inkscape export will fail quite sure as the
(svg) command is probably unknown to your OS. You could set
(svg) `inkscapeversion=<version>' manually but this is very
(svg) unlikely to work on input line 12.
/bin/sh: 1: inkscape: not found
/bin/sh: 1: inkscape: not found
! Package svg Error: Inkscape version not detected.
See the svg package documentation for explanation.
Type H <return> for immediate help.
...
l.14 \includesvg{\svgFld/red.svg}
我如何让编译器知道我想使用哪个转换器并通过图像魔术师?