### Mathcasting MathML with XHTML

MathCast’s top feature, as already stated, is Mathcasting. The main idea is to let MathCast (an application specially suited for math editing) manage all of the mathematics of an XHTML page, while you can work on the rest of the markup with applications suited for regular XHTML editing.
When you open an XHTML file (or any other XML file, to be exact), MathCast will load only the <math> tags of that file into the Edit Screen. You can then work on all of the equations with MathCast, as you would normally. And later when you save that file, MathCast will replace the original math tags with the new equations that you created, leaving the rest of the markup in the file untouched.
Here are the exact details of how to make it work:

- You have to Open (not Insert, Append or Download) an XHTML or XML file into MathCast.
- When saving, select Save (not Save As).
- All of the math tags from the file will be replaced by the math equations that appear in the Edit Screen, in the same order.
- If you deleted a few equations from the list in the Edit Screen, the last few math tags will be deleted from the file.
- If you added a few equations to the list in the Edit Screen, there will be a few extra math tags following the last math tag in the file.

MathCast defaults to encoding XML files with the ASCII character set. In the Settings Screen, if you selected “Named” or “Hex” XML layout, MathCast will attempt to save your file as an ASCII file. If however that file has non ASCII chacters or it has been declared as “UTF-16” in the xml declaration, MathCast will save it as a UTF-16 unicode file.
In the Edit Screen, the bottom button on the Buttons Pane is the “Preview Mathcasting” button. By clicking it you can see a preview of how the equations fit into the rest of the XHTML page.