• Create Account

## LaTeX - based equations in gamedev.net forums

8 replies to this topic

### #1grhodes_at_work  Members

1377
Like
1Likes
Like

Posted 23 February 2010 - 11:55 AM

Folks, There is a sticky thread in another forum that shows how you can embed fancy LaTeX-based equations in your forum posts. That functionality seems really beneficial to the math & physics forum so I'm linking to the other thread here. Here is a link to that thread: LaTeX - math equations support? There is another service available that can also do this. Here is an example using the other service: $\int_{-\infty }^{\infty }e^{-x^{2}}\;dx=\sqrt{\pi }$ And the HTML code to put in your post for that example is:
<img src="http://www.forkosh.dreamhost.com/mimetex.cgi?\int_{-\infty }^{\infty }e^{-x^{2}}\;dx=\sqrt{\pi }"/>


(Personally I find the image generated by the service mentioned in the other thread to be a bit prettier.]
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net

### #2sjhalayka  Members

989
Like
0Likes
Like

Posted 23 February 2010 - 07:12 PM

Awesome. Thank you for finding this host.

### #3grhodes_at_work  Members

1377
Like
0Likes
Like

Posted 24 February 2010 - 05:14 AM

Thanks go to Kambiz and Sneftel, who originated this information for me/us!
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net

### #4roverstu  Staff Emeritus

244
Like
3Likes
Like

Posted 18 January 2012 - 01:53 PM

You may use the eqn tag and wrap it around single or multi-line LaTeX formulas now:

Edited by Michael Tanczos, 13 June 2013 - 08:32 PM.

### #5swiftcoder  Senior Moderators

17824
Like
0Likes
Like

Posted 18 January 2012 - 02:59 PM

Lucky, since the new forum breaks support for non-standard image file names, which means that we can't use *any* 3rd-party embedding service (including all the old latex posts).

Tristam MacDonald - Software Engineer @ Amazon - [swiftcoding] [GitHub]

### #6Edy  Members

346
Like
1Likes
Like

Posted 27 January 2015 - 11:55 AM

I came here looking for a way for embedding formulas in the posts. Gamedev now supports Mathjax, so Latex formulas can be easily embedded by enclosing them in double dollar signs ($$). So writing this in the post: $$\sqrt{(F{_{x}})^{2}+(F{_{y}})^{2}}$$ Results in this:$$\sqrt{(F{_{x}})^{2}+(F{_{y}})^{2}}$$Which is plain html (no img). ### #7PeterStock Members 761 Like 0Likes Like Posted 12 November 2015 - 09:16 AM So Mathjax seems good, since it doesn't require relying on any no-very-permanent external web sites (I just see broken image links above). But I want to write inline maths, rather than having it split into a new paragraph. Mathjax docs say I should use single  to wrap it, but that doesn't see to work here. I want to define f(x) = x mid-sentence.  I want to define f(x) = x mid-sentence. Defining$$f(x) = x$$this way take too much space when you do it loads.  Defining$$f(x) = x this way take too much space when you do it loads.

Is there some config someone can change to make it work?

### #8PeterStock  Members

761
Like
2Likes
Like

Posted 12 November 2015 - 10:00 AM

I figured it out. Mathjax default config is not to recognise single \$ because people use it too often for currency. Go figure.

Anyway, here's how to do it:

Defining $$f(x) = x$$ mid-sentence.

Defining $$f(x) = x$$ mid-sentence.

You can also use the similar $f(x) = x$ to split into a new paragraph.

You can also use the similar $f(x) = x$ to split into a new paragraph.

### #9PeterStock  Members

761
Like
1Likes
Like

Posted 13 November 2015 - 05:10 AM

I found this guide to the Mathjax Tex syntax very helpful - I thought I'd put it here, as other people might find it useful too.

http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference