Ask Your Question
2

How can I include typeset mathematics in my posts?

asked 2014-06-22 18:56:58 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2014-09-11 08:35:12 -0600

Many questions I see have beautifully typeset mathematics. For example, instead of seeing something like

integrate from -oo to oo e^(-x^2) w/resp to x

some users input a beautifully typeset version of this. How can I include such typeset mathematics in my own posts?

$$\lim_{\stackrel{h\rightarrow0}{h\in\mathbb R}}$$

edit retag flag offensive close delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-06-22 18:58:01 -0600

Typeset input is entered into AskBot using LaTeX snippets which is then rendering using a JavaScript program called MathJax. For example, to input the integral mentioned in the question and indicate it's value is $\sqrt{\pi}$, you could input the following:

$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$

This is then rendered as follows:

$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$

Note that the double dollar signs ($$) are used to delimit the LaTeX input; everything between the double dollar signs are the LaTeX command that lead to the typeset expression. Use of double dollar signs indicate that the expression should be set on it's own line in display mode. You can use single dollar signs to include a simple math expression inline. For example, $\sqrt{\pi}$ by itself is input as

$\sqrt{\pi}$

LaTeX itself is a huge system that can be used to create large documents - but you need only use small snippets for this site. This is actually a gentle way to get started with this valuable tool, anyway! There is plenty of information on LaTeX available online. A great tutorial for using the MathJax version of LaTeX is available here.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2014-06-22 18:56:58 -0600

Seen: 62 times

Last updated: Sep 11 '14