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

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

问题描述

我能够使用python脚本创建LaTeX文件,但我想获取该文件并进行编译,因此它通过使用python脚本创建了pdf.我已经看到了一些使用os和子进程的东西,但我真的不明白.

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天全站免登陆