Skip to main content

No project description provided

Project description

TeXicode

TeXicode, short for TeX to Unicode, a CLI that turns TeX math expressions into Unicode art.

Installation

Run as Script

  1. Have python3 installed, check with python3 --version
  2. Clone and cd into this repo.
  3. Make sure this is the correct directory by running ./txc '\Delta', should output Δ.
  4. pwd to get the path
  5. In ~/.zshrc or ~/.bashrc, add line alias txc="<the_path>/txc"

Install form pip

pip install TeXicode

Usage

Basic Usage

  • txc '\prod_{i=0}^n\ x ~=~ x^n' to output Unicode art
    • replace your own TeX equation inside quotes
    • use single quotes
    • if expression contains single quotes like f'(x), replace with f\'(x)
    • \[ \], \( \), $ $, or $$ $$ is optional, \begin{} \end{} is not supported yet
  • Add -c at the end of the command to output in color (black on white)
  • Unsupported commands will be rendered as ?, or raise an error. If you see these or other rendering flaws, please post an issue, most can be easily fixed.

Rendering Math in Markdown

  • txc -f filename.md to replace latex expressions in markdown files with Unicode art in text blocks.
  • Pipe into a markdown renderer like glow for ultimate markdown previewing:

Here is example.md rendered with txr -f example.md -c | glow, using the JuliaMono font.

Screenshot

Features

  • Supports most LaTeX math commands
  • Uses Unicode
    • Not limited to ASCII characters
    • Unicode italic glyphs are used to differentiate functions from letters, similar to LaTeX
  • Works with any good terminal font
    • Does not use any legacy glyphs
    • Go to src/arts.py, comment/uncomment some parts if your font support legacy glyphs to get even better symbols

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

texicode-0.1.5.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

TeXicode-0.1.5-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file texicode-0.1.5.tar.gz.

File metadata

  • Download URL: texicode-0.1.5.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for texicode-0.1.5.tar.gz
Algorithm Hash digest
SHA256 bf16baa2ce445b5d91b4aafe0ae30336e0268aeca7163a6319b1f05100f77ff9
MD5 90f9cddc8bf826ab587efaf522339a0c
BLAKE2b-256 778f16421a08d1b3911cddd7442e2be7903ca2f5198fa96ce4ab5f6e34fde52d

See more details on using hashes here.

File details

Details for the file TeXicode-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: TeXicode-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for TeXicode-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 331f233e6a3a24fc66d92baa998a6eb26bfb21b05409021d1d6cefd1329b411e
MD5 11a850af3efbde2362d3a61d4d4f0469
BLAKE2b-256 510faf747936f7fd473de2ab8f774eb9ef4862ff71e643d411a01bc86c2c7108

See more details on using hashes here.

Supported by

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