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

Posting math equations in Reddit is very annoying, you either have to post a screenshot of rendered LaTeX, or use Reddit's limited markdown features. Using TeXicode in Reddit code blocks makes posting math in Reddit much easier.

Quick tutorial NOW
  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

Also useful for quickly inserting single line equations into Word documents.

CLI

Install

pipx install TeXicode

Basic Usage

  • txc '\LaTeX' 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)
    • \[ \], \( \), $ $, $$ $$, \begin{...} \end{...} is optional
  • Add -c at the end of the command to output in color (black on white)
  • Add -n at the end of the command to use normal fonts instead of cursive italic
  • 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 txc -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-1.0.1.tar.gz (18.8 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.1-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for texicode-1.0.1.tar.gz
Algorithm Hash digest
SHA256 04a7195540bedcd8f668f8e06d3740d1beb469a912584e202ca7b599bd022e5a
MD5 10915ca0f49ddc4488f71837f7d8b596
BLAKE2b-256 83c923bfe1d20b5903ca84827d3f716cc9159921ae14898b376ffa377c8d3072

See more details on using hashes here.

Provenance

The following attestation bundles were made for texicode-1.0.1.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.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for texicode-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a28376879f66871b861102bf666ac8346640630629e1776b05ae1642dd37c68
MD5 c7fd565443da89f2125688a8e3d6b8b4
BLAKE2b-256 4e226d0714b9cf970fa82d071adbc214bb5106e696ecbf95fc7816e11c90ded3

See more details on using hashes here.

Provenance

The following attestation bundles were made for texicode-1.0.1-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