How could I go about building a LaTeX Renderer?

Objective:
I’ve been trying to build a system that can render LaTeX math expressions directly in Roblox, without uploading image decals. I already have a Glitch proxy that fetches rendered LaTeX images from CodeCogs, but since Roblox’s ImageLabel does not support external image URLs, I need another way.

What I need
A solution that can take a LaTeX string (e.g. x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}, \int_{1}^{4}\left(x^{2}-\sqrt{\frac{1}{x^{2}}}^{3}\right)dx, etc…) and visually render it in-game! Preferably using textlabels, frames, etc…

Like I said:

  • I already have a working proxy that renders LaTeX to image via CodeCogs
  • But due to Roblox limitations, I can’t use these images directly in ImageLabels
  • I’m open to using existing math libraries or helping build a lightweight one if needed

Here is how I used the proxy if it helps:

local HttpService = game:GetService("HttpService")
local latexCode = "x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}"
local proxyBase = "https://latex-renderer.glitch.me/latex?latex="
local url = proxyBase .. HttpService:UrlEncode(latexCode)

print("Image URL:", url)
-- printed: Image URL: https://latex-renderer.glitch.me/latex?latex=x%20%3D%20%5Cfrac%7B%2Db%20%5Cpm%20%5Csqrt%7Bb%5E2%20%2D%204ac%7D%7D%7B2a%7D

game.StarterGui.QuestionUI.ImageLabel.Image = url

So far I’ve been manually converting each math expression into a decal by rendering the LaTeX, taking a screenshot, editing the background, applying color adjustments, and then uploading it to Roblox. This worked fine for a few expressions, but for this project, I need to render hundreds of different math expressions. Manually repeating this process for each one will be incredibly time consuming and tedious. And it’s simply not scalable. So PLEASE, if anyone has any ideas on how I would go about doing this, HELP.

You need to have alghoritm in proxy that will build image fragments which you later will be able to draw using editable image…Or you can go hard way and make it using frames…Goodluck.:saluting_face: