各种图形格式的轻量级乳胶渲染器
tex2pix的Python项目详细描述
一个小库,它使用 你的系统像乳胶,PDflatex,bibtex,dvips,ps2eps,和convert。乳胶是 根据需要自动运行多次以实现干净的编译(使用 用户提供的最大尝试次数),并且支持bibtex处理。
编译在自动清理的临时目录中进行 up,可以在文件或文本字符串上启动,并包含额外的输入文件,以及 缓存渲染阶段以减少渲染延迟。
另请参见“tex”模块,以获取具有不同 设计要求。
用法示例:
import tex2pix f = open('example.tex') r = tex2pix.Renderer(f, runbibtex=True, extras=['example.bib']) #r.verbose = True # be loud to the terminal #r.rmtmpdir = False # keep the working dir around, for debugging r.mkeps('example.eps') r.mkpng('example.png') r.mkpdf('example.pdf') # uses cached version from PNG build r.mk('duplicate.pdf') # auto-detect format; uses cached PDF tex2pix.check_latex_package('tikz.sty')
- 待办事项:
- 提供机制(隐藏?)用于线程并行编译。