为Inkscape 1.0导出`.pdf_tex`

时间:2020-06-01 23:09:11

标签: svg latex inkscape

我希望从命令行从.svg导出到.pdf_tex,但是在inkscape 1.0或更高版本上,例如,https://stackoverflow.com/a/41110512/9302545

说明

在Inkscape 0.92或更早的版本中,如果我在.svg中使用.tex文件,则仅使用lualatex --shell-scape myfile.tex,并且此编译器将创建包含两个文件的文件夹svg-inkscape name_svg_tex.pdfname_svg-tex.pdf_tex。然后,我更愿意手动执行此操作,并生成.tex中以pdf格式嵌入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更新pdflatexxelatexlualatex

请注意,我不能做

 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可以帮助我从.pdf创建一个.svg,而不是.pdf_tex

2 个答案:

答案 0 :(得分:2)

然后,我将把我的评论形式化为答案:

对于Inkscape 1.0,命令应为:

inkscape -D --export-latex --export-filename=my_file.pdf my_file.svg

答案 1 :(得分:2)

或者,如果有人出于某种原因不想命名导出的文件,这对我有用:

inkscape -D --export-latex --export-type="pdf" my_file.svg
相关问题