Members don't see the ad below. Register now!

LaTeX

We have added support for LaTeX formatting (backslash \ has to be escaped, so in your LaTeX code you have to replace \ with \\). There is no live preview.

Users of NoScript and similar javascript blockers may need to whitelist mathjax.org

It works like this:

$$ latex syntax here $$

Some examples:

$$ P(A|B)= \\frac{P(B|A)*P(A)}{P(B)} $$

$$P(A|B)= \frac{P(B|A)*P(A)}{P(B)}$$

$$\\omega_0=\\frac{1}{M}\\sum{y_i} - \\frac{\\omega_1}{M}\\sum{x_i}$$

$$\omega_0=\frac{1}{M}\sum{y_i} - \frac{\omega_1}{M}\sum{x_i}$$

$$\\omega_1=\\frac{M\\sum{{x_i}{y_i}}-\\sum{x_i}\\sum{y_i}}{M\\sum{x_i^2}-(\\sum{x_i})^2}$$

$$\omega_1=\frac{M\sum{{x_i}{y_i}}-\sum{x_i}\sum{y_i}}{M\sum{x_i^2}-(\sum{x_i})^2}$$

Available symbols and codes are here: artofproblemsolving.com

Sandbox to test and see how your code works: MathJax in Action

asked 25 Dec '11, 19:26

Gundega's gravatar image

Gundega ♦♦
6.2k219

edited 26 Feb, 23:02

This is awesome.

(25 Dec '11, 20:25) gregmchapman ♦ gregmchapman's gravatar image

Very useful!

Users of NoScript and similar javascript blockers may need to whitelist mathjax.org.

(25 Dec '11, 22:49) jojo jojo's gravatar image

Note that this apparently does not work in comments: $$ P(A|B)= \frac{P(B|A)*P(A)}{P(B)} $$

I had been getting MathJax configuration messages recently, but don't seem to be today. @Gundega, was something fixed?

(25 Jan, 13:28) rseiter rseiter's gravatar image

@rseiter As you see, it does work in comments, it just doesn't work for the person who posted comment without refreshing the page (because commenting uses Ajax, and the MathJax works only onLoad, its not Live event).

And no, I havent done anything with MathJax, but the javascript itself is included from the author website, so maybe they released new version ?

(25 Jan, 14:17) Gundega ♦♦ Gundega's gravatar image

$$ P(Happy\ |\ Latex) = \frac{1}{\sqrt{\pi}} \int_{-\infty}^{\infty} e^{-x^2} dx $$

link

answered 25 Dec '11, 21:24

sfjjhs's gravatar image

sfjjhs
1.4k10

edited 25 Dec '11, 21:25

Hurray.

Testing: $$ P(A|B) = \dfrac{P(B|A)P(A)}{P(B)}$$

it works!

link

answered 25 Dec '11, 20:21

Anne%20Paulson's gravatar image

Anne Paulson
4.2k16

edited 25 Dec '11, 20:22

$$ X_{mas}=\sum{M}{er^2}{y_i}$$

link

answered 25 Dec '11, 21:03

EllenL's gravatar image

EllenL
2.2k28

edited 25 Dec '11, 21:24

Testing...

$$ P(A|B) = \frac{P(B|A)P(A)}{P(B)} $$

$$ \zeta = \left[\left\{\begin{array}{lccr} \alpha & \beta & \gamma & \kappa \\ a & b & c & d \\ 1 & 2 & 3 & 4 \end{array}\right\}\right] $$

link

answered 25 Dec '11, 22:37

Wasif%20Hossain's gravatar image

Wasif Hossain
5427

edited 25 Dec '11, 22:50

works great!

(25 Dec '11, 22:50) Wasif Hossain Wasif%20Hossain's gravatar image

$$ RMS=\sqrt{\dfrac{\sum_{i=0}^n (x2_i - x1_i)^2 } {n} } $$

link

answered 25 Jan, 12:51

egoots's gravatar image

egoots
2.8k10

this is a test
will be deleted

$$ \bar X $$

link

answered 26 Feb, 22:09

jimgb's gravatar image

jimgb ♦
5.5k222

Nooo, dont delete it, write something nice!

(26 Feb, 22:22) Gundega ♦♦ Gundega's gravatar image
1

Can I use it in comments, too?

$$ \theta = {\underbrace{\left(X^TX + \lambda\begin{bmatrix} 0 &&&& \\ & 1 &&& \\ && 1 &&\\ &&& \ddots & \\ &&&& 1 \end{bmatrix}\right)}_{\mathrm{invertable}}}^{-1}X^Ty $$

(28 Feb, 09:40) rhasarub rhasarub's gravatar image

It works in comments (despite what I said above ;-). As @Gundega noted, the person who posts the comment does not see the formatted version until they refresh.

(28 Feb, 11:57) rseiter rseiter's gravatar image

Oh, blind me didn't read the comments, it seems ;)

(28 Feb, 14:51) rhasarub rhasarub's gravatar image

And what about using it $ \sqrt{\mathrm{inline}} $? Doesn't work, what a pity.

(08 Mar, 15:24) rhasarub rhasarub's gravatar image

That is odd given that the MathJax sandbox link @Gundega posted supports that syntax. Should this be considered an Aiqus bug?

(08 Mar, 15:41) rseiter rseiter's gravatar image
1

@rseiter "it's not a bug, it's a feature" cough and not particularly Aiqus, but OSQA in general. Same reason you need to double escape \, OSQA engine does some fancy stuff with special characters.

(08 Mar, 16:00) Gundega ♦♦ Gundega's gravatar image
1

What about $% E = m{c^2} $% ?

@Gundega, apologies if you already know all about this, but this post looked like it might be helpful (esp. the idea about changing the default inline character to $%
http://meta.osqa.net/questions/55/can-osqa-provide-latex-support

(08 Mar, 17:23) rseiter rseiter's gravatar image
Members don't see the ad below. Register now!
Your answer
toggle preview

Follow this Question via Email

Once you sign in you will be able to subscribe for any updates here

Q&A Editor Basics

  • to upload an image into your question or answer hit
  • to create bulleted or numbered lists hit or
  • to add a title or header hit
  • to section your text hit
  • to make a link clickable, surround it with <a> and </a> (for example, <a>www.google.com</a>)
  • basic HTML tags are also supported (for those who know a bit of HTML)
  • To insert an EQUATION you can use LaTeX. (backslash \ has to be escaped, so in your LaTeX code you have to replace \ with \\). You can see more examples and info here

powered by OSQA