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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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