Service for generating nice SVG pictures from LaTeX equations for web. You can try it in action in the Markdown and LaTeX online editor.
You can run the project locally using docker. The docker image is built automatically after a push to the main branch using the github actions. Before using the image, make sure you are logged in at ghcr.io.
You can run it with
docker run -t -p 8080:80 ghcr.io/parpalak/i.upmath.me:master
You will find the service active at localhost:8080
.
- TeX Live. I prefer a full installation and disabling write18 support.
nginx
web server with ngx_http_lua_module (for example, nginx-extras Debian package).php-fpm
.proc_open()
function must be enabled.- Make the
/home/tex/tl-202*/texmf-var
dir writable for thephp-fpm
process user.
- Make the
- Node.js and frontend tools:
npm
,grunt-cli
. ghostscript
(used internally bydvisvgm
TeX component).- Utilities:
rsvg-convert
,optipng
,pngout
. Install them or modify the code to disable PNG support.
Deploy files:
git clone [email protected]:parpalak/i.upmath.me.git
cd i.upmath.me
yarn install
composer 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