Skip to main content

More readable LaTeX language extension and transcompiler to LaTeX

Project description

SugarTeX is a more readable LaTeX language extension and transcompiler to LaTeX. Designed to be used instead of $formula$ insertions to markdown.

See SugarTeX documentation. Examples of input to output conversion see in this PDF.

I use Markdown with Python code blocks for document programming via Pandoctools (like R-Markdown).

Both Python and Markdown are very readable languages. Unfortunately LaTeX is not like this. So I wrote SugaTeX extension+transpiler that is highly readable. In order to achieve this it heavily uses Unicode so that SugarTeX install instructions even have recommended monospace font fallback chains. And more: SugarTeX Completions Atom package helps write all that Unicode in a moment.

I am trying to incorporate LaTeX into .md using the Markdown Philosophy of “you should write something that’s readable as plain text, without compilation, also”.


Install as part of Pandoctools - convenient interface and works out of the box.

Or install:

pip install sugartex

If you use conda package manager (Anaconda/Miniconda) then you can install dependencies first:

conda install -c defaults -c conda-forge "pip>=10.0.1" "pandoc>=2.2.1" pyyaml future shutilwhich
pip install sugartex

if pip install fails try to change codepage: chcp 1252

Also can install from GitHub:

pip install git+

In this case you need to have installed Git available from command prompt.

Atom editor with full Unicode support

Highly recommended to install Atom editor as it’s the best for markdown.

Atom is perfect for Unicode rich texts. But you need to install some fonts first. Recommended font fallback chains:

Noto fonts can also be freely downloaded (if you need CJK support). TC is Traditional Chinese but it can also be SC, JP, KR. I used monospacified fonts with the help of If you do not like Consolas/Roboto Mono you can pick there monospacified versions for other monospace fonts.

SugarTeX Completions for Atom

Install SugarTeX Completions package for easy typing SugarTeX and lots of other Unicode characters. (it’s incompatible with latex-completions package).

In the SugarTeX documentation appropriate shortcuts for SugarTeX Completions for Atom are given.

Usage examples

Example of input to output conversion is at the end of [this PDF].


chcp 65001 > NUL

type | ^
pre-sugartex | ^
pandoc -f markdown --filter sugartex -o



cat | \
pre-sugartex | \
pandoc -f markdown --filter sugartex -o

Or splitting Pandoc reader-writer:


cat | \
pre-sugartex | \
pandoc -f markdown -t json | \
sugartex --kiwi | \
pandoc -f json -o

Panflute scripts are also installed so you can use it in default Panflute automation interface in metadata or in recommend panfl CLI:

  • panfl sugartex --to markdown,
  • panfl -t markdown.

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
sugartex-0.1.13.tar.gz (33.2 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page