我希望从命令行从.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.pdf
和name_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更新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可以帮助我从.pdf
创建一个.svg
,而不是.pdf_tex
。
答案 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