Ratburger.org supports MathJax, which permits including beautifully typeset mathematics in posts and comments (but not, at present, in group posts or comments). For example, here is Einstein’s gravitational field equation:

where the text within square brackets are WordPress “shortcodes” which indicate the text they enclose is mathematical notation written in the LaTeX document preparation language. For information on how to write mathematics in LaTeX, see chapter 3 of The Not So Short Introduction to \(\LaTeX 2_\epsilon\) [PDF].

The “\displaystyle” in the equation definition above causes it to be typeset to appear on a line by itself in large type. If omitted, the equation is set in in-line style, suitable for inclusion in a line of text. For example, here is the quadratic equation \(x = {-b \pm \sqrt{b^2-4ac} \over 2a}\) which was specified by the code:

Note that you can use the [latex]code[/latex] facility for simple things like superscripts and subscripts, as in \(_{~~55}^{137}\rm Cs\) for the isotope of Cæsium with atomic number 55 and weight 137, produced with:

[latex]_{~~55}^{137}\rm Cs[/latex]

(The tildes are to right-justify the atomic number, as chemists do.)

7+

Users who have liked this post:

Author: John Walker

Founder of Ratburger.org, Autodesk, Inc., and Marinchip Systems. Author of The Hacker's Diet. Creator of www.fourmilab.ch.
View all posts by John Walker

7 thoughts on “Knowledge Base: Including Mathematics in Posts”

It’s nice to see the field equations so nicely set but they should include the cosmological constant. Einstein was right about that after all.

What is the cosmological constant? I am asking for a “friend”.

Gravitation is like The Force, or duct tape: it has a light side (photons and baryonic matter) and a dark side (dark matter), and it binds the universe together.

The cosmological constant (dark energy) [latex]\Lambda[/latex] in the equation in the original post is like WD-40: it causes everything to slippy-slide away from one another.

(Note to physicists: I’m aware there are many other potential explanations for the observed acceleration in expansion of the universe other than Einstein’s cosmological constant, and there are insufficient data to conclude [latex]\Lambda[/latex] does not change over time. This is a reply to a light-hearted comment, not a paper on ArXiV.)

4+

Users who have liked this comment:

@John Walker, asking for a friend, are you anticipating a high need for the ability to properly typeset mathematical notations in Ratburger.org posts? Curious … and a little nervous.

3+

Users who have liked this comment:

Only in the footnotes.

The Devil is in the footnotes.

2+

Users who have liked this comment:

@MJBubba, will I be safe from the Devil if I only read books without footnotes?

It’s nice to see the field equations so nicely set but they should include the cosmological constant. Einstein was right about that after all.

Users who have liked this comment:

@drlorentz:

Fixed it!

What is the cosmological constant? I am asking for a “friend”.

@10Cents:

Gravitation is like The Force, or duct tape: it has a light side (photons and baryonic matter) and a dark side (dark matter), and it binds the universe together.

The cosmological constant (dark energy) [latex]\Lambda[/latex] in the equation in the original post is like WD-40: it causes everything to slippy-slide away from one another.

(Note to physicists: I’m aware there are many other potential explanations for the observed acceleration in expansion of the universe other than Einstein’s cosmological constant, and there are insufficient data to conclude [latex]\Lambda[/latex] does not change over time. This is a reply to a light-hearted comment, not a paper on ArXiV.)

Users who have liked this comment:

@John Walker, asking for a friend, are you anticipating a high need for the ability to properly typeset mathematical notations in Ratburger.org posts? Curious … and a little nervous.

Users who have liked this comment:

Only in the footnotes.

The Devil is in the footnotes.

Users who have liked this comment:

@MJBubba, will I be safe from the Devil if I only read books without footnotes?