https://github.com/dxddxx/texicode
TeXicode - TeX to Unicode, a Unicode TeX renderer that renders TeX into Unicode by rendering the TeX
https://github.com/dxddxx/texicode
ascii-art cli latex unicode
Last synced: 5 months ago
JSON representation
TeXicode - TeX to Unicode, a Unicode TeX renderer that renders TeX into Unicode by rendering the TeX
- Host: GitHub
- URL: https://github.com/dxddxx/texicode
- Owner: dxddxx
- License: mit
- Created: 2025-08-18T13:11:45.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2026-01-13T02:10:47.000Z (5 months ago)
- Last Synced: 2026-01-13T05:21:32.984Z (5 months ago)
- Topics: ascii-art, cli, latex, unicode
- Language: Python
- Homepage:
- Size: 19.6 MB
- Stars: 36
- Watchers: 0
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
TeXicode, short for TeX to Unicode, a CLI that turns TeX math expressions into Unicode art.
# [Webapp](https://texicode.dx512.com)
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](https://texicode.dx512.com), copy output to clipboard
1. 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)

1. Add code block

1. Paste

If the output from TeXicode is a single line, can be placed inline using `Code` instead of `Code Block`
# CLI
### Install
```bash
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 ` input Markdown file, see more [below](#Rendering-Math-in-Markdown)
- `-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](https://github.com/charmbracelet/glow) for ultimate terminal markdown preview:
Here is [example.md](example.md) rendered with `txc -f example.md -c | glow`, in the [JuliaMono](https://juliamono.netlify.app/) font.

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