【发布时间】:2021-12-10 02:39:10
【问题描述】:
我想创建一个自定义编译规则,它接受 foo.tex 并输出 foo_bar.pdf
我在我的 texrc 中使用了以下配置,但我没有找到从输出名称中排除 .tex 扩展名的方法。
TexLet g:Tex_CompileRule_bar = 'pdflatex -interaction=nonstopmode -file-line-error-style -halt-on-error -jobname=%_bar $*'
结果:foo.tex_bar.pdf
TexLet g:Tex_CompileRule_bar = 'pdflatex -interaction=nonstopmode -file-line-error-style -halt-on-error -jobname=$*_bar $*'
结果:foo.tex_bar.pdf
TexLet g:Tex_CompileRule_bar = 'pdflatex -interaction=nonstopmode -file-line-error-style -halt-on-error -jobname=bar_$ $*'
结果:bar_$.tex
【问题讨论】:
-
太棒了,成功了!我意识到我的无知正在表现出来,但我想了解该语法的来源?它是 RegExp 的一部分吗?
-
作为答案发布,包含更多详细信息和对文档的参考。