Skip to main content

Convert LaTeX or TeX source to PDF or DVI, and escape strings for LaTeX.

Project description

The python-tex project is obsolete! Please have a look at Texcaller.

Python-tex is a convenient interface to the TeX command line tools that handles all kinds of errors without much fuzz.

Temporary files are always cleaned up. The TeX interpreter is automatically re-run as often as necessary, and an exception is thrown in case the output fails to stabilize soon enough. The TeX interpreter is always run in batch mode, so it won’t ever get in your way by stopping your application when there are issues with your TeX source. Instead, an exception is thrown that contains all information of the TeX log.

This enables you to debug TeX related issues directly within your application or within an interactive Python interpreter session.

Example:

>>> from tex import latex2pdf
>>> document = ur"""
... \documentclass{article}
... \begin{document}
... Hello, World!
... \end{document}
... """
>>> pdf = latex2pdf(document)
>>> type(pdf)
<type 'str'>
>>> print "PDF size: %.1f KB" % (len(pdf) / 1024.0)
PDF size: 5.6 KB
>>> pdf[:5]
'%PDF-'
>>> pdf[-6:]
'%%EOF\n'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tex-1.8.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

tex-1.8-py2.7.egg (9.1 kB view details)

Uploaded Egg

File details

Details for the file tex-1.8.tar.gz.

File metadata

  • Download URL: tex-1.8.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tex-1.8.tar.gz
Algorithm Hash digest
SHA256 b6950860c733b37b7c3631228abd3a70d8f75a96c3a2f17eac61158185dd224d
MD5 ac0e996e8154cd7e64ab84d2cc74d1cf
BLAKE2b-256 97647f5d45a782be53b88e5d0963b1ef9a9fc3c6ff409fbbd2006418c5b285ff

See more details on using hashes here.

File details

Details for the file tex-1.8-py2.7.egg.

File metadata

  • Download URL: tex-1.8-py2.7.egg
  • Upload date:
  • Size: 9.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tex-1.8-py2.7.egg
Algorithm Hash digest
SHA256 3331ba333dde628c126fa174fb91883bd52e37569506b9122d8d3a865e253948
MD5 dc72e6494b5cf66acfeb1659daf692ba
BLAKE2b-256 bf39f845edf3cd3955575bbdf3b4dc9afa6bd28121d3b0c8fd4272c0d06d4a38

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page