GithubHelp home page GithubHelp logo

herbrant / i.upmath.me Goto Github PK

View Code? Open in Web Editor NEW

This project forked from parpalak/i.upmath.me

0.0 0.0 0.0 531 KB

Upmath LaTeX Renderer

Home Page: https://i.upmath.me/

License: MIT License

JavaScript 14.99% PHP 72.33% CSS 6.86% TeX 3.92% HTML 0.57% Dockerfile 0.90% Shell 0.43%

i.upmath.me's Introduction

Upmath LaTeX Renderer

Service for generating nice SVG pictures from LaTeX equations for web. You can try it in action in the Markdown and LaTeX online editor.

Requirements

  1. TeX Live. I prefer a full installation and disabling write18 support.
  2. nginx web server with ngx_http_lua_module (for example, nginx-extras Debian package).
  3. php-fpm. proc_open() function must be enabled.
    • Add the TeX bin directory (e.g. /home/tex/tl-2020/bin/x86_64-linux) to the PHP PATH environment variable. Otherwise there can be floating bugs when generating font files.
    • Make the /home/tex/tl-2020/texmf-var dir writable for the php-fpm process user.
  4. Node.js and frontend tools: npm, bower, grunt-cli.
  5. ghostscript (used internally by dvisvgm TeX component).
  6. Utilities: rsvg-convert, optipng, pngout. Install them or modify the code to disable PNG support.

Installation

Deploy files:

git clone [email protected]:parpalak/i.upmath.me.git
cd i.upmath.me
yarn install
composer install
bower install
grunt

Create the site config file:

cp config.php.dist config.php
mcedit config.php # specify the LaTeX bin dir and other paths

Set up the host:

sudo cp nginx.conf.dist /etc/nginx/sites-available/i.upmath.me
sudo mcedit /etc/nginx/sites-available/i.upmath.me

Set up systemd unit for SVGO http service:

sudo cp http-svgo.service.dist /etc/systemd/system/http-svgo.service
sed -i "s~@@DIR@@~$PWD~g" /etc/systemd/system/http-svgo.service
sudo systemctl start http-svgo
sudo systemctl enable http-svgo

Docker

You can run the project using docker. The docker image is built automatically after a push to the main branch using the github actions.

You can run it with

docker run -t -p 8080:80 ghcr.io/parpalak/upmath.me:master

You will find the service active at localhost:8080.

i.upmath.me's People

Contributors

parpalak avatar herbrant avatar jonaprieto 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.