Second Life + LaTeX = SLaTeX


It has long been a problem that one of the biggest obstacles to doing mathematics in Second Life was the inability to write equations. Of course, there is a counter argument that this forces you to be more imaginative in finding ways to get the same ideas across and there is a huge amount to say about the benefits of being able to create complex 3D objects to get mathematical concepts across. But, there comes a point when you really need to be able to discuss equations to get the full picture.

Well, this is a problem no more with a little gadget I’ve come up with: say hello to SLaTeX! Or $$S\LaTeX$$ if you prefer. It’s still in an experimental stage and has a few small bugs to iron out, but it seems to be quite robust.It currently uses either mathtex or mimetex , depending on how the serverside processing is done as I play around with options… it’s a little rough and ready, but it works!

The current version allows you to type in your LaTeX source to a dedicated channel after pressing the “SLaTeX” button, or it can be set to listen on public chat for code inserted between a “\[” and a “/]” which seemed a natural way to do it. This is demonstrated in the picture below:

Until there is a finished release, you can pick up a beta version at Warwick University Maths, my workplace island in Second Life. Just right-click on it and buy for L$0. But make sure you keep checking back for updates! For the full current information notecard on the SLaTeX viewer read the rest of this post!

This is SLaTeX 0.27 – Very much in development!

Ee Maculate 1st May 2009

A simple LaTeX equation renderer for use in Second Life. The backend currently uses either Mimetex or Mathtex to render images


Setting Up:

– The SLaTeX viewer uses a parcel’s media settings so make sure that there are no other objects using media on the same parcel

– On land owned by you, rez the viewer and you’re ready to go.

– On group owned land rez the viewer and deed it to the group.

Using the viewer:

I have tried to make it as easy as possible to use, permissions depend on whether it is owned, set to group, or deeded to group. By “owner” for the rest of this notecard I mean the owner if it is not set to a group, or any member of the group if it is set or deeded to a group.

The viewer receives LaTeX formatted equations in two ways:

1 SLaTeX Button

Press the “SLaTeX” button and it waits for 30 seconds for you to enter an equation via chat on the channel given by the object’s description (default is channel 5). E.g. in the chat window type “/5 f(x)=\int_{-\infty}^x e^{-t^2}dt”.

In this time no one else can enter an equation. If you run of time press the SLaTeX button again.

You will also be shown the previous equation’s LaTeX source so you can cut, paste and edit into the chat window.

2 Eavesdropping

If eavesdropping is enabled (the button with an ear on doesn’t have a cross over it) then the viewer listens on the public chat channel 0. If it hears someone use the symbols \[ and \] then it interprets what is in between as a LaTeX equation. Eg if you say the following in public chat:

“I think the equation \[ f(x)=\int_{-\infty}^x e^{-t^2}dt \] is very interesting!”

Then the equation f(x)=\int_{-\infty}^x e^{-t^2}dt will be rendered.

WARNING: listens on channel 0 can cause lag in busy sims.


Zoom in and zoom out of the display using the magnifying glass buttons.

Touching the screen itself will spawn a pointer which will vanish after 3 seconds, or if another pointer is spawned. If screen locked then only person who can enter formulae can use pointer (see below).

The “refresh” button next to them resets the viewer to it’s default state (owner) or clears screen and resets zoom (anyone else).

Locking the viewer (padlock button) will only allow owner(s) to enter formulae.

Turn eavesdropping on and off (only owners can do this).

Information button will either give this notecard, or open an equation editor in the default browser… from where LaTeX can be cut and pasted into chat.


The viewer will understand most standard LaTeX shortcuts, including arrays, but there is a size limit of 250 odd characters imposed by the viewer. Currently the equation is sent to the server as a variable to a php page, and html addresses are limited to 254 characters.

In future I may develop a more sophisticated method, as well as importing equations from an external equation editor that can be accessed from the internal browser.

I am also aware of the griefing possibilities… rude messages being left for example… I hope to implement some kind of swear filter sever side soon.


Try these examples from the Mimetex guide:


e^x=\lim_{n\to\infty} \left(1+\frac~xn\right)^n

\tilde y=\left\{  {\ddot x\text{ if $\vec x$ odd}\atop\hat{\,\bar x+1}\text{ if even}}\right.

\left.\begin{eqnarray}    x+y+z&=&3\\2y&=&x+z\\2x+y&=&z\end{eqnarray}\right\}

\overbrace{a,…,a}^{\text{k a^,s}},    \underbrace{b,…,b}_{\text{l b^,s}}\hspace{10}    \large\underbrace{\overbrace{a…a}^{\text{k a^,s}},    \overbrace{b…b}^{\text{l b^,s}}}_{\text{k+l elements}}

A\ =\ \left(\begin{array}{c.cccc}&1&2&\cdots&n\\ \hdash1&a_{11}&a_{12}&\cdots&a_{1n}\\ 2&a_{21}&a_{22}&\cdots&a_{2n}\\\vdots&\vdots&\vdots&\ddots&\vdots\\ n&a_{n1}&a_{n2}&\cdots&a_{nn}\end{array}\right)

\begin{array}{rccclBCB}    &f&\longr[75]^{\alpha:{\normalsize f\rightar~g}}&g\\    \large\gamma&\longd[50]&&\longd[50]&\large\gamma\\  &u&\longr[75]_\beta&v\end{array}


Mathematician at the University of Warwick in the UK with research interests in equivariant bifurcation theory and applications, especially in modelling of insect locomotion. Teaching interests include online learning and innovative teaching methods. Also in a past life has been involved in summer school courses, and online material, for Gifted and Talented. He has been active on the Internet since 1995, initially though his UFO and Michael Schenker website, but now through a multitude of projects.

One Comment:

  1. Good idea,

    I barely use second life atm myself, but this is definitely a brilliant addition to the Warwick maths island

Leave a Reply

Your email address will not be published. Required fields are marked *