All Projects → kiwi0fruit → sugartex

kiwi0fruit / sugartex

Licence: MIT license
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

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to sugartex

Invoice Boilerplate
Simple automated LaTeX invoicing system
Stars: ✭ 604 (+716.22%)
Mutual labels:  latex, pandoc
Pandoc Plantuml Filter
Pandoc filter for PlantUML code blocks
Stars: ✭ 51 (-31.08%)
Mutual labels:  latex, pandoc
Pandoc Latex Tip
A pandoc filter for adding tip in LaTeX
Stars: ✭ 7 (-90.54%)
Mutual labels:  latex, pandoc
Rmarkdown Cookbook
R Markdown Cookbook. A range of tips and tricks to make better use of R Markdown.
Stars: ✭ 324 (+337.84%)
Mutual labels:  latex, pandoc
Pandoc Markdown Template
Markdown templates for Pandoc
Stars: ✭ 135 (+82.43%)
Mutual labels:  latex, pandoc
Letter Boilerplate
Finest letter typesetting from the command line
Stars: ✭ 374 (+405.41%)
Mutual labels:  latex, pandoc
Cv Boilerplate
Programmatic generation of high-quality CVs
Stars: ✭ 967 (+1206.76%)
Mutual labels:  latex, pandoc
pandocker
🐳 A simple docker image for pandoc with filters, templates, fonts, and the latex bazaar
Stars: ✭ 118 (+59.46%)
Mutual labels:  latex, pandoc
Pandoc Action Example
using the pandoc document converter on GitHub Actions
Stars: ✭ 131 (+77.03%)
Mutual labels:  latex, pandoc
Oscp Exam Report Template Markdown
📙 Markdown Templates for Offensive Security OSCP, OSWE, OSCE, OSEE, OSWP exam report
Stars: ✭ 2,066 (+2691.89%)
Mutual labels:  latex, pandoc
Pandoc Latex Template
A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
Stars: ✭ 3,750 (+4967.57%)
Mutual labels:  latex, pandoc
Julia Vim
Vim support for Julia.
Stars: ✭ 556 (+651.35%)
Mutual labels:  unicode, latex
ntuthesis
台大碩博士論文模板 (R Package)
Stars: ✭ 14 (-81.08%)
Mutual labels:  latex, pandoc
Pandoc Starter
📄 My pandoc markdown templates and makefiles
Stars: ✭ 443 (+498.65%)
Mutual labels:  latex, pandoc
tufte-markdown
Use markdown to write your handouts and books in Tufte style.
Stars: ✭ 82 (+10.81%)
Mutual labels:  latex, pandoc
Readteractive
Tool for writing and generating interactive books.
Stars: ✭ 23 (-68.92%)
Mutual labels:  latex, pandoc
pandoc-amsthm
provide a syntax to use amsthm environments in pandoc, with output in LaTeX and HTML
Stars: ✭ 19 (-74.32%)
Mutual labels:  latex, pandoc
wikitopdf
Export a repo's wiki as a PDF ebook.
Stars: ✭ 14 (-81.08%)
Mutual labels:  latex, pandoc
Pandoc Letter Din5008
Pandoc template for writing Markdown letters (DIN 5008)
Stars: ✭ 77 (+4.05%)
Mutual labels:  latex, pandoc
Open Publisher
Using Jekyll to create outputs that can be used as Pandoc inputs. In short - input markdown, output mobi, epub, pdf, and print-ready pdf. With a focus on fiction.
Stars: ✭ 242 (+227.03%)
Mutual labels:  latex, pandoc

SugarTeX

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

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

Via conda:

conda install -c defaults -c conda-forge sugartex

Via pip:

pip install sugartex

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. See this instruction how to install recommended font fallback chains for Unicode support.

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].

Windows:

@echo off
chcp 65001 > NUL
set PYTHONIOENCODING=utf-8
set PYTHONUTF8=1

type doc.md | ^
pre-sugartex | ^
pandoc -f markdown --filter sugartex -o doc.md.md

Unix (convert bash script to use like ./convert doc.md):

#!/bin/bash
export PYTHONIOENCODING=utf-8
export PYTHONUTF8=1

cat "$@" | \
pre-sugartex | \
pandoc -f markdown --filter sugartex -o "$@.md"

(or pandoc -f markdown --filter sugartex --to docx+styles -o "[email protected]")

Or splitting Pandoc reader-writer:

export PYTHONIOENCODING=utf-8

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

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 sugartex.kiwi -t markdown.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].