An archived instance of a Chaos and Fractals forum

How do I format my post to with sections, code, typeset math, and images?

mark

This site is here to facilitate mathematical and computational discussion. As such, it is often nice to format your questions and responses as nicely as possible - including typeset mathematics, images, and code as appropriate.

Markdown

Textual entry into discourse is based on Markdown - a lightweight markup language that makes formatting relatively easy. I should mention that Markdown is also used in the Jupyter notebook. To start this particular section, for example, I simply entered:

## Markdown

Code

Sometimes, we’d like to enter computer code - like I just did above to indicate how to start a section. To do so, just indent your line four spaces.

There many other things you can do with Markdown. If you’re interested in more, you can check out this MarkDown Cheasheet.

Typeset math

The forum uses a Javascript library called MathJax to render snippets of LaTeX markup as mathematical formulae. For example, to type the following:

If f(x) = e^{-x^2}, then

\int_{-\infty}^{\infty} f(x) \, dx = \sqrt{\pi}.

I would type in

If $f(x) = e^{-x^2}$, then
$$
\int_{-\infty}^{\infty} f(x) \, dx = \sqrt{\pi}.
$$

Note that the inline mathematics is enclosed in single dollar sings $like this$ while larger display style math is enclosed in double dollar signs with line breaks

$$
like this
$$

While it seems a bit strange, it’s not so hard after a little practice.

Images

When you’re editing a post, you’ll notice a toolbar with an image uploader, as I’ve circled here:

Of course, I used exactly that to upload that very image!

Desmos

The “share” button on Desmos includes an “embed” button that generates a funny bit of HTML called an iframe. You can plug that right into the forum to get something like so: