Skip to main content

No project description provided

Project description

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

Webapp

Post math in Reddit/Discord/Teams or anywhere that supports code blocks. No more LaTeX screenshots or markdown exponents that don't work. Also useful for inserting single line equations into literally any text field.

Quick tutorial for Reddit
  1. Visit the TeXicode website, copy output to clipboard
  2. Make a new line in Reddit text field (check line spacing, if there is no line spacing above and below the cursor, it means Reddit does not see it as a separate line) Reddit1.png
  3. Add code block Reddit2.png
  4. Paste Reddit3.png If the output from TeXicode is a single line, can be placed inline using Code instead of Code Block

CLI

Install

pipx install TeXicode

Basic Usage

  • txc '\LaTeX' to output Unicode art
    • wrap TeX equation inside single quotes
    • escape expression like f'(x) with f\'(x)
    • \[ \], \( \), $ $, $$ $$, \begin{...} \end{...} is optional
  • -h show help message and exit
  • -d enable debug
  • -f <FILE> input Markdown file, see more below
  • -c enable color (black on white)
  • -n use normal font instead of serif
  • 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 TeX expressions in markdown files with Unicode art in text blocks.
  • pipe into a markdown renderer like glow for ultimate terminal markdown preview:

Here is example.md rendered with txc -f example.md -c | glow, in 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 (actually you can't do that no more i removed the comments...)

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-1.0.3.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

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

texicode-1.0.3-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: texicode-1.0.3.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for texicode-1.0.3.tar.gz
Algorithm Hash digest
SHA256 a60a8cc5afc5cd2318c1d5f5d871f03cacdff9350f96f1129765a64bb763a9fd
MD5 0d3711d5559503b1f429929139e18775
BLAKE2b-256 7aad4abe852f0af1ee22d3f44099f437a94c401b98bb9351b18394a2c07b27f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for texicode-1.0.3.tar.gz:

Publisher: python-publish.yml on dxddxx/TeXicode

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file texicode-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: texicode-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for texicode-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 114853c4add5077ebdb07ad7e741c9761b32b6a452f62da8dd5e03d584bdfb63
MD5 df0c144827c9b1a0cd480f929188242f
BLAKE2b-256 6bbbae211595fe7d211b3c97f7de234701e61e2e73313fe832e6d980a0c0c847

See more details on using hashes here.

Provenance

The following attestation bundles were made for texicode-1.0.3-py3-none-any.whl:

Publisher: python-publish.yml on dxddxx/TeXicode

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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