Having access to a LaTeX library for writing maths expressions in text boxes etc. would be useful
You mean at runtime? Can you suggest such a library?
I don’t know of any suitable library, but yea, at runtime (seeing as I don’t see any way to do it outside of runtime).
Perhaps you can do some research into this then? It might be possible to use a native extension to wrap the LaTeX library and add a Lua API on top.
seeing as I don’t see any way to do it outside of runtime
If the expressions are static, you could output to a png with https://www.latex2png.com/ or convert the pdf to png (for example, with ImageMagick: graphics - Compile a LaTeX document into a PNG image that's as short as possible - TeX - LaTeX Stack Exchange).
If the expressions need to be changed during runtime, it’s do-able for example GodotTeX. So I suppose you could mimic it with the brand-new C# Native Extension support Defold + C# support.