Code Monkey home page Code Monkey logo

atori's Introduction

atori

โ€ฆ is a self-host TeX compiling service with

  • Simple HTTP API
  • Result caching
  • Missing package detection (WIP)

and other experimental features.

It is designed to use this with [unamed], a simple JavaScript library that finds (La)TeX snippets in a HTML document, turn them into complete (La)TeX documents, feeds into this and then get neatly fitted SVGs.

Motivation

It is inspired by the karasu project, which allows mixed Markdown and LaTeX in the same document; karasu solved this problem by converting LaTeX contents to SVGs first.

Comparing Markdown and TeX, Markdown is minimalistic, but TeX is far more powerful than Markdown. Being able to use both in the same document would be quite interesting. The karasu project managed to do this, but adapting that to other environments turns out to be tricky because it is written in Haskell.
I managed to write a simple Lua filter for Pandoc that does the same, but I still don't like the solution. Is there a chance that we can render them on the fly?

Other notable projects while I was creating these two projects:

  • GladTeX, a program with similar approach; however it claims to have only partial Unicode support.
  • LaTeX SVG, a Pandoc filter that works in a similar way, written in Haskell.
  • TinyTeX, a customized TeX distribution that manages to implement auto-installing required packages.

General requirement

You will need

  • Python3
  • pip3
  • TeX Live distro. Currently it is recommended to use the full distro, but once the missing package detection is available, you can use a minimized distro for faster deployment. At the very minimum, you should have tex, latex, pdftex and dvisvgm available in your PATH.
  • Redis, unless you want to use alternative cache backend.

Setup development env

# Setup virtual env.
python3 -m venv venv
# Activate the virtual env.
. venv/bin/acvitave
# Install dependencies. 
# Currently, we depend on Flask, Flask-Cache and redis.
# Redis is not required if you choose other caching method.
pip3 install -r requirements.txt

Deploy to production env

WIP

gunicorn -w 4 -b 127.0.0.1:8080 -k gevent app:app

atori's People

Contributors

3tusk avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.