The project genebook supports MathML (Mathematical Markup Language) standard and you can add formulas to your e-books. This functionality works only for epub format.
For example it is the formula you want to insert:
It is the MathML code for the formula:
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mi>x</mi>
<mo>=</mo>
<mfrac>
<mrow>
<mrow>
<mo>-</mo>
<mi>b</mi>
<mo>±</mo>
</mrow>
<msqrt>
<mrow>
<msup>
<mi>b</mi>
<mn>2</mn>
</msup>
<mo>-</mo>
<mrow>
<mn>4</mn>
<mi>a</mi>
<mi>c</mi>
</mrow>
</mrow>
</msqrt>
</mrow>
<mrow>
<mn>2</mn>
<mi>a</mi>
</mrow>
</mfrac>
</mrow>
</math>
To add the formula to your e-book, you can simply insert the MathML code to the text, using [[mathML]]...[[/mathML]]
tags:
If your e-reader also supports epub 3, the result looks like this:
The tag [[mathML]]
helps to insert formulas as a separate line of text. If you want to render the math element as a part of paragraph, you can use a parameter block of the tag: [[mathML block=inline]]