Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/parpalak/i.upmath.me
Upmath LaTeX Renderer
https://github.com/parpalak/i.upmath.me
latex
Last synced: 3 months ago
JSON representation
Upmath LaTeX Renderer
- Host: GitHub
- URL: https://github.com/parpalak/i.upmath.me
- Owner: parpalak
- License: mit
- Created: 2015-01-10T08:59:44.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-07-20T09:48:26.000Z (4 months ago)
- Last Synced: 2024-07-20T10:56:30.101Z (4 months ago)
- Topics: latex
- Language: PHP
- Homepage: https://i.upmath.me/
- Size: 685 KB
- Stars: 52
- Watchers: 5
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Upmath LaTeX Renderer
Service for generating nice [SVG pictures from LaTeX equations](https://i.upmath.me/) for web. You can try it in action in the [Markdown and LaTeX online editor](https://upmath.me).
## Run with Docker
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](https://github.com/features/packages).You can run it with
```bash
docker run -t -p 8080:80 ghcr.io/parpalak/i.upmath.me:master
```You will find the service active at `localhost:8080`.
## Manual installation
### Requirements
1. [TeX Live](https://www.tug.org/texlive/quickinstall.html). I prefer a full installation and disabling write18 support.
2. `nginx` web server with [ngx_http_lua_module](https://github.com/openresty/lua-nginx-module) (for example, [nginx-extras Debian package](https://packages.debian.org/search?searchon=names&keywords=nginx-extras)).
3. `php-fpm`. `proc_open()` function must be enabled.
* Make the `/home/tex/tl-202*/texmf-var` dir writable for the `php-fpm` process user.
4. Node.js and frontend tools: `npm`, `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 steps
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
```