The formula itself I got from Wikipedia, so blame any quirks on them.
I did develop an okayish flow for posting LaTeX here. It’s more cumbersome than it should be, but not too bad.
- Write the LaTeX. I used the editor here.
- Append the string
\phantom{.png
. Note that this is invalid LaTeX, but that’s ok and is required for Discourse to pick it up. - Take the string and paste it into the upper box here. Click ENCODE to get a new string.
- Prepend the URL
https://latex.codecogs.com/png.latex?
. This is a site that will take the input LaTeX and render it to an image. - Paste the string on a new line in your post. Discourse will see it as an image and display it inline.
See this post for several examples of the technique. Once you get going, and have a browser tabset going with the right tools, it only takes an extra 10 seconds or so to convert the LaTeX into a pasteable URL.
It clearly comes as no surprise to you that at work, I am in fact the local “regex guy.”