WinEdt开启write18和shell-escape

一些宏包必须开启write18或者shell-escape才能运行, 例如mpgraphics. 下面我们来看看在WinEdt+Miktex下如何开启.

开启shell-escape1

因为write18会有一定的安全风险, 所以我们先来看看安全的方式shell-escape.

在WinEdt主界面打开Options → Execution Modes, 我们需要修改相应引擎的switches参数:

  • LaTeX

    --shell-escape

  • Pdflatex

    --shell-escape

  • Texify

    --tex-option=-shell-escape

  • PDFTeXify

    --pdf --tex-option=-shell-escape

  • ConTeXt

    --shell-escape

write182

  • 永久式开启

    在命令行里面输入

    initexmf --edit-config-file=miktex\config\pdflatex.ini

    在打开的文本文档里面添加

    EnableWrite18=t

    保存(Ctrl+S)并退出, 即可永久打开write18

  • 参数方式

    和添加--shell-escape参数一样, 你也可以尝试将上面的--shell-escape参数换成-enable-write18

参考文献

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

*