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

with pipx (recommended)

pipx install TeXicode

or with pip

pip 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-0.2.2.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-0.2.2-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: texicode-0.2.2.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-0.2.2.tar.gz
Algorithm Hash digest
SHA256 c35f92b03df667dcc47af8d3fef8da0d430103213236c68b1905e9ec66da9f14
MD5 235ab27007fd8f52c4c68db30e1bc684
BLAKE2b-256 ee82c9100a87880add6cce36adb4c07d72ad1740c78af3fca6922a8928e94ea1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: texicode-0.2.2-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-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9ba54fb060fb32b710c8ba252fae3702712381e7a8fce93c4abfe45da4ae4bf6
MD5 69f3d36a7eefdec8120ab0af860506d6
BLAKE2b-256 a048ce7fee34c696028b4e0dac2b8e65e2f5059e395a50fca3baa0a7fb404a11

See more details on using hashes here.

Provenance

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