{"id":14981011,"url":"https://github.com/kiwi0fruit/sugartex","last_synced_at":"2025-07-08T20:34:24.734Z","repository":{"id":57472214,"uuid":"119576352","full_name":"kiwi0fruit/sugartex","owner":"kiwi0fruit","description":"SugarTeX is a more readable LaTeX language extension and transcompiler to LaTeX. Fast Unicode autocomplete in Atom editor via https://github.com/kiwi0fruit/atom-sugartex-completions","archived":false,"fork":false,"pushed_at":"2020-10-21T16:00:32.000Z","size":2133,"stargazers_count":75,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-29T05:03:35.386Z","etag":null,"topics":["latex","markdown","pandoc","python","transcompiler","transpiler","unicode"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiwi0fruit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-30T18:24:06.000Z","updated_at":"2024-01-13T23:57:51.000Z","dependencies_parsed_at":"2022-08-30T17:01:35.160Z","dependency_job_id":null,"html_url":"https://github.com/kiwi0fruit/sugartex","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwi0fruit%2Fsugartex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwi0fruit%2Fsugartex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwi0fruit%2Fsugartex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwi0fruit%2Fsugartex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiwi0fruit","download_url":"https://codeload.github.com/kiwi0fruit/sugartex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219858397,"owners_count":16556045,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["latex","markdown","pandoc","python","transcompiler","transpiler","unicode"],"created_at":"2024-09-24T14:02:44.200Z","updated_at":"2024-10-11T22:02:06.540Z","avatar_url":"https://github.com/kiwi0fruit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SugarTeX\n\nSugarTeX is a more readable LaTeX language extension and transcompiler to LaTeX. Designed to be used instead of `$formula$` insertions to markdown. \n\nSee [SugarTeX documentation](https://github.com/kiwi0fruit/sugartex/blob/master/sugartex.md). Examples of input to output conversion see in [this PDF](https://github.com/kiwi0fruit/sugartex/blob/master/examples/examples.pdf?raw=true).\n\nI use Markdown with Python code blocks for document programming via [Pandoctools](https://github.com/kiwi0fruit/pandoctools) (like R-Markdown).\n\nBoth 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](#sugartex-completions-for-atom) Atom package helps write all that Unicode in a moment.\n\nI 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”.\n\n\n## Install\n\nInstall as part of [Pandoctools](https://github.com/kiwi0fruit/pandoctools) - convenient interface and works out of the box.\n\nVia conda:\n\n```bash\nconda install -c defaults -c conda-forge sugartex\n```\n\nVia pip:\n\n```bash\npip install sugartex\n```\n\n\n### Atom editor with full Unicode support\n\nHighly recommended to install [Atom editor](https://atom.io/) as it's the best for markdown.\n\nAtom is perfect for Unicode rich texts. But you need to install some fonts first. See [**this instruction**](https://github.com/kiwi0fruit/open-fonts/blob/master/README.md#best-monospace) how to install recommended font fallback chains for Unicode support.\n\n\n### SugarTeX Completions for Atom\n\nInstall [SugarTeX Completions](https://atom.io/packages/sugartex-completions) package for easy typing SugarTeX and lots of other Unicode characters. (it's incompatible with [latex-completions](https://atom.io/packages/latex-completions) package).\n\nIn the [SugarTeX documentation](https://github.com/kiwi0fruit/sugartex/blob/master/sugartex.md) appropriate shortcuts for SugarTeX Completions for Atom are given.\n\n\n## Usage examples\n\nExample of input to output conversion is at the end of [this PDF].\n\nWindows:\n\n```bat\n@echo off\nchcp 65001 \u003e NUL\nset PYTHONIOENCODING=utf-8\nset PYTHONUTF8=1\n\ntype doc.md | ^\npre-sugartex | ^\npandoc -f markdown --filter sugartex -o doc.md.md\n```\n\nUnix (`convert` bash script to use like `./convert doc.md`):\n\n```bash\n#!/bin/bash\nexport PYTHONIOENCODING=utf-8\nexport PYTHONUTF8=1\n\ncat \"$@\" | \\\npre-sugartex | \\\npandoc -f markdown --filter sugartex -o \"$@.md\"\n```\n(or `pandoc -f markdown --filter sugartex --to docx+styles -o \"$@.docx\"`)\n\nOr splitting Pandoc reader-writer:\n\n```sh\nexport PYTHONIOENCODING=utf-8\n\ncat doc.md | \\\npre-sugartex | \\\npandoc -f markdown -t json | \\\nsugartex --kiwi | \\\npandoc -f json -o doc.md.md\n```\n\n[Panflute](https://github.com/sergiocorreia/panflute) scripts are also installed so you can use it in default Panflute [automation interface in metadata](http://scorreia.com/software/panflute/guide.html#running-filters-automatically) or in recommend [panfl](https://github.com/kiwi0fruit/pandoctools/blob/master/docs/panfl.md) CLI:\n\n* `panfl sugartex --to markdown`,\n* `panfl sugartex.kiwi -t markdown`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiwi0fruit%2Fsugartex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiwi0fruit%2Fsugartex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiwi0fruit%2Fsugartex/lists"}