-3

I am creating a mathematical trivial for the mathematics department in my university using Unity3d. The game has to display questions with mathematical expressions. Since all the teachers in the department use LaTeX, they want a menu in the game with which you can enter a .TEX file in order to create a question. Is there a way to take this .TEX data, and display the question on a GUI element?

I have been searching for LaTeX integration with Unity with no success. Im fairly new to Unity and i have never worked with LaTeX. I am programming the game in C#.

Cheers.

Negashion
  • 127
  • 1
  • 9
  • Could you provide a link to what the LaTeX format is? Either way you'd have to convert the format to a String, format it appropriately, then pass it onto the Unity GUI **Note:** to add a library to Unity3D it must be in .dll format. – Hobbyist Nov 03 '14 at 19:49
  • Not clear what guidance you are looking for. Note: searching for tools/libraries is off-topic, guidance on writing your own is too broad for SO. Also consider MathML instead of LatTex. There some links http://stackoverflow.com/questions/8899204/how-to-render-a-formula-in-wpf-or-winforms if you have not seen that question already... – Alexei Levenkov Nov 03 '14 at 20:26
  • I hope the edit clarifies my needs, sorry for the inconvenience. – Negashion Nov 04 '14 at 14:12

1 Answers1

0

Your best bet is to render the TeX to a png or jpeg via the command line, and then loading the image as a texture with Texture2D.LoadImage().

Alternately, you can get the image from a web service such as http://www.codecogs.com/latex/eqneditor.php which can supply a rendered image from a TeX string encoded in a URL.

Agumander
  • 676
  • 4
  • 11