【发布时间】:2020-06-01 23:09:11
【问题描述】:
我想从命令行从.svg 导出到.pdf_tex,但在inkscape 1.0 或更高版本上,例如https://stackoverflow.com/a/41110512/9302545。
说明
在 Inkscape 0.92 或更早版本中,如果我在.tex 中使用.svg 文件,我只使用lualatex --shell-scape myfile.tex,并且此编译器会创建一个文件夹svg-inkscape,其中包含几个文件name_svg_tex.pdf 和name_svg-tex.pdf_tex。然后我更喜欢手动完成,并从.tex 生成嵌入 svg 的最后两个文件。换句话说,我想为 Inkscape 0.92 复制
inkscape -D --export-filename=MyOutput.pdf_tex spektralnorm.svg
这些是错误:
所以
Did you run the export with Inkscape? There's no file
`./svg-inkscape/spektralnorm.pdf_tex'
although `./svg-inkscape/spektralnorm.pdf' was found.
inkscape:42353): Unknown option -z
Package svg Warning: The export with Inkscape failed for file
(svg) `img/spektralnorm.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 31.
重要的是生成文件.pdf_tex,生成.pdf被覆盖。
inkscape -D --export-type="pdf" spektralnorm.svg
谢谢,我希望 svg package 为 Inkscape 1.0 更新 pdflatex、xelatex、lualatex
请注意我做不到
inkscape -D --export-filename=MyOutput.pdf_tex spektralnorm.svg
因为只支持InkFileExportCmd::export: Unknown export type: pdf_tex. Allowed values: [svg,png,ps,eps,pdf,emf,wmf,xaml],甚至不支持.tex。
这个inkscape's docs 帮助我从.svg 创建一个.pdf,但不是.pdf_tex。
【问题讨论】:
-
'inkscape -D --export-latex --export-filename=my_file.pdf my_file.svg' 怎么样?
-
这很奇怪,对于单个 svg,导出 pdf 中的 12 页。我试过这个svg 并且与使用 \usepackage{svg} 和 lualatex --shell-escape foo.tex 的原生导出不同。
-
@Oromion 由于文本和图形元素的不同层,创建了 12 个页面。它在您的文档中看起来不错
-
哦,谢谢 SamCarter。那么莫尼的回答是正确的。我提出这个问题是因为同时我有 TexLive 2019 和 Inkscape 1.X 我在将 svg 转换为 pdf 并生成 .pdf_tex 时遇到了 lualatex 问题。但现在我有 TeXLive 2020 并且工作正常。
-
这个问题的主题,抱歉离开了 TX.SX 所以我很高兴将继续在新论坛中学习 LaTeX。