Sign in to follow this  

LaTeX - based equations in gamedev.net forums

This topic is 764 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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: 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.]

Share this post


Link to post
Share on other sites

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

[eqn]\left| \begin{array}{cc} x_{11} & x_{12} \\ x_{21} & x_{22} \end{array} \right|[/eqn]

[eqn]
\begin{bmatrix} xz & xw \\ yz & yw \end{bmatrix} = \left
[ \begin{array}{c} x \\ y \end{array} \right] \times \left
[ \begin{array}{cc} z & w \end{array} \right]
[/eqn]

Edited by Michael Tanczos

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 764 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this