skip to navigation
skip to content

tex2pix 0.3.1

Lightweight renderer of LaTeX to a variety of graphics formats

A little library which renders LaTeX to various formats, using applications on your system like latex, pdflatex, bibtex, dvips, ps2eps, and convert. LaTeX is automatically run as many times as necessary to achieve a clean compile (with a user-provided max number of attempts), and Bibtex processing is supported.

Compilation takes place in temporary directories which are automatically cleaned up, can be initiated on a file or text string and include extra input files, and rendering stages are cached to reduce rendering latency.

See also the ‘tex’ module, for a more established TeX renderer with different design requirements.

Usage example:

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')
TODO:
  • Provide mechanism (hidden?) for threaded parallel compilation.
 
File Type Py Version Uploaded on Size
tex2pix-0.3.1.tar.gz (md5) Source 2016-04-16 5KB
  • Author: Andy Buckley
  • Keywords: tex latex bibtex pdf eps postscript png graphics renderer
  • License: GPL
  • Package Index Owner: andybuckley
  • DOAP record: tex2pix-0.3.1.xml