On this page:
1 Install Java and Git
2 Build things
3 Run

Installation Part I
BystroTeX consists of the frontend (Racket) and backend (Java). The Java part works like a server. It is actually an HTTP server. It listens on some port on the localhost. We will start with setting up this server.

    1 Install Java and Git

    2 Build things

    3 Run

1 Install Java and Git

First of all, you need to have installed Java 7 or 8 (because Java 6 will not work), including the JDK. OpenJDK is OK. To verify that you have Java installed, type the commands:
java -version
javac -version
They should say something like “java version 1.7....” and “javac 1.7....”.

To install the server, you will need to install the following things on your computer:

  1. git

  2. ant and sbt

2 Build things

Now execute the following commands:

git clone https://github.com/amkhlv/latex2svg

cd latex2svg

git submodule init

git submodule update

cd jlatexmath


cd ..

sbt stage

This will take some time, as various libraries will have to be downloaded (and saved in ~/.ivy2 and ~/.sbt).

3 Run

Our Java server will communicate to the Racket frontend some initial settings (including the anti-CSRF token) by writing them into an XML file. You have to decide how it should name this file and where to put it. Suppose that you decided to call it bystroConf.xml, and choosen some directory where it will be:


remember this location; you will need need it in the following steps

Under this assumption, start the server by typing the following command:

target/universal/stage/bin/latex2svg -DbystroFile=/path/to/bystroConf.xml -Dhttp.port=9749 -Dhttp.address=

If you want to use BibTeX, add the option -Dbibfile=/path/to/your/file.bib

The port number 9749 is also up to you to choose. The frontend will know it because it will be written (among other things) to /path/to/bystroConf.xml

Now the server is running.

Notice that we specified the option -Dhttp.address= Therefore the server is only listening on a local interface (the “loopback”); it is not possible to connect to it from the outside. However, it would be still possible to attack it from a running browser by CSRF. Our defense is token and custom header. Should CSRF somehow succeed in spite of these measures, actually exploiting it would require a vulnerability in JLaTeXMath.