A Sinatra Web App which lets you convert LaTeX to different formats (pdf/png)
- Install MacTex via Homebrew (brew cask install mactex) or download fromhttps://www.tug.org/mactex/and install it.
- Clone this repository git clone https://github.com/codegestalt/sinatratex.git
- Change directory cd sinatratex
- Run bundler bundle install
- Start the Rack server bundle exec rackup
Converting math tex to png needs the STIX font for some characters e.g.: \mathbb{N}.
You need to install STIX Fonts so those get correctly converted.
- Download: http://www.stixfonts.org/
- Follow Instructions: http://tug.org/fonts/fontinstall.html
http://localhost:9292/png?tex=y=f(x)
Parameters:
- tex: Math formula e.g.:- y=f(x)
HTTP POST to http://localhost:9292
Parameters:
- name: Document name, only needed for caching (document name needs to be adjusted on application side).
- tex: The TeX string which contents the whole document.