Skip to main content

A simple command line tool to convert TeX equations to SVG.

Project description

pytex2svg

A simple command line tool written in Python to convert TeX equations to SVG. Input can be read from stdin, provided directly as command line argument, or read from a file.

Installation

pip install pytex2svg

Dependencies

  • matplotlib

Usage

usage: pytex2svg [-h] [-o OUTFILE] [-v] [input]

converts a TeX string to an SVG file

positional arguments:
  input                 The TeX equation or file to be converted to svg,
                        defaults to stdin

optional arguments:
  -h, --help            show this help message and exit
  -o OUTFILE, --outfile OUTFILE
                        Path or name of the output file, defaults to
                        "equation.svg". If more than one equation is provided,
                        the output files are numbered.
  -v, --verbose         Enable verbose output

Examples:

# from stdin
echo "\log_{2}10 \approx 3.322" | pytex2svg -o whybinary.svg
# as command line argument
pytex2svg "\log_{2}10 \approx 3.322" -o whybinary.svg
# from a file
pytex2svg examples/integral.tex -o whybinary.svg

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

pytex2svg-0.0.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

pytex2svg-0.0.1-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file pytex2svg-0.0.1.tar.gz.

File metadata

  • Download URL: pytex2svg-0.0.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for pytex2svg-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0d3e8e77a15db2236bc2194c23fb4befc6b2374ecb98efe93630d48a5061fa55
MD5 9c051b1ed12a2dacd5fc92da0cb35a73
BLAKE2b-256 582e80841e9fecb19cd57942267d8f30a102192fa995638cedf2e3848253d018

See more details on using hashes here.

File details

Details for the file pytex2svg-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pytex2svg-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for pytex2svg-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a6ff86b9fc35f1074243655bffe9e7c1c2a8ba3a607c071202a3cb0a8561b7c2
MD5 90b28cf72c660b87507c15dfd7c4816d
BLAKE2b-256 acb334fdf03272c743f48d3d4c17dd6350cf8e3bbb1bcce53698c4bbff759c54

See more details on using hashes here.

Supported by

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