Daninet / i.upmath.me

Upmath LaTeX Renderer

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 git@github.com: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

About

Upmath LaTeX Renderer

https://i.upmath.me/

License:MIT License


Languages

Language:PHP 73.0%Language:JavaScript 15.4%Language:CSS 7.0%Language:TeX 4.0%Language:HTML 0.6%