Skip to main content

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
  • options:
    • -h, --help show help message and exit
    • -d, --debug enable debug
    • -m, --markdown treat input as Markdown: find and replace math blocks
    • -f, --file treat input filename
    • -c, --color enable color (black on white)
    • -n, --normal-font 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 -mf foo.md to input a markdown file and replace math blocks with Unicode art.

  • 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...)

Metadata

Release files for TeXicode 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for TeXicode 1.0.4
File Size Uploaded
texicode-1.0.4.tar.gz 19.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for TeXicode 1.0.4
File Interpreter ABI Platform
texicode-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 39.9 kB

Release files / texicode-1.0.4.tar.gz

Download URL texicode-1.0.4.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5cb3453f02d5ee39a0d94e6aa42ce61c20500fefba81ed19f940480648b78e40
BLAKE2b-256 checksum
How to use checksums
f183b877b801558737f914655f9b89cdfbb6d9c7895d9c371357e36681837b87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / texicode-1.0.4-py3-none-any.whl

Download URL texicode-1.0.4-py3-none-any.whl
Size 20.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1de4812843d681b500c6d9eac799078ee87ca6a73e6357a06cfda0cc7849a194
BLAKE2b-256 checksum
How to use checksums
6a9516c16588ae0abf033797d70fce70448d61524f7ce5ac1a66908f1cbd03e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release history Release notifications | RSS feed

1.0.5

2 release files

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.1

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page