使用 python 脚本编译 Latex 文件 [英] Compile Latex file using a python script

查看:45
本文介绍了使用 python 脚本编译 Latex 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用 python 脚本创建一个 LaTeX 文件,但我想获取该文件并对其进行编译,因此它使用 python 脚本创建了一个 pdf.看到过一些使用os和subprocess的东西,但是实在看不懂.

I am able to use python script to create a LaTeX file, but I want to take that file and compile it, so it creates a pdf by using a python script. I have seen some things using os and subprocess but I really don't understand it.

推荐答案

试试这个.

  import os  
  os.system("pdflatex mylatex.tex")

这篇关于使用 python 脚本编译 Latex 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆