Fresh Post

With forestry when editing inline math equations we need to carefully watch for the rich-text editor inserting extra backslashes, munging underscores, etc.

Inline math with double-backslash-parens: \(E = mc^2 - a_i - \sum_i y_i\) works just fine.

Weirdly, inline math within dollar signs $ E = mc^2 - a_i + \sum_i y_i $ also works but the fonts are subtly different.

Normal display math enclosed in double-dollar signs:

$$ E = \sum_i m_i c_i^2 $$

display math with equation aligned (note we don't need the double-dollar sign, since the align environment triggers MathJax.

\begin{align} x &= \sum_{i=1}^n x_i \\ &= \int_0^1 \exp(-\beta x_i) \end{align}

Let's try some python code with highlighting:

1
2
3
4
5
    def junk(a,b):
    	return a+b  # just the sum

    for a in [1,2,3,4]:
    	print a

Add an image with the right sizing, directly using html

Drawing

comments powered by Disqus