如何解决在 vscode 中使用 pythontex
我终生无法弄清楚如何在 vscode 的 Latex 研讨会扩展中使用 pythontex 编译甚至格式化 tex 文件。有人可以分享一个有效的例子、一个好的教程,或者建议一个替代方案吗?
解决方法
在 VSCode 的 const selected = array.filter((i) => i.selected)
const highlighted = array.filter((i) => i.highlighted)
const selectedHighlighted = array.filter((i) => i.selected && selectedHighlighted)
中,粘贴以下内容以在 settings.json
部分添加 pythontex
:
tools
然后将其添加到 "latex-workshop.latex.tools": [
... some code ...
{
"name": "pythontex","command": "pythontex","args": [
"%DOC%"
]
},... some code ...
]
部分:
recipes
(可选地,用您选择的编译器替换 "latex-workshop.latex.recipes": [
... some code ...
{
"name": "compile with pythontex enabled","tools": [
"pdflatex","pythontex","pdflatex"
]
},... some code ...
]
。)
pdflatex
需要一个三步编译过程,包括调用 pythontex
,然后是 pdflatex
,然后是 pythontex
。您需要将其配置为 pdflatex
(如上所示)以使特定于包的代码起作用。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。