MathBook XML
Write Once, Read Anywhere

Editor

MathBook XML files are “plain” unformatted text files. So any text editor that will produce “unformatted” text may be used. So you can start quickly. Yes, the elements are unusual and at first seem to be a lot of busy work. Cut and paste liberally. Soon you will discover the joys of a better editor, if you do not have one already. Syntax highlighting helps, tag completion is a real timesaver, and an awareness of DTDs or schemas is where using XML really shines. Soon you will be making almost no syntax errors.

Emacs and vi might be natural choices, but I have little experience with them. I used KATE for a long time, including the start of this project. Presently, I would recommend Sublime Text. I am using the beta release of Version 3. It runs on all platforms and is free (nag-ware). It is good enough that you'll consider paying the $70 or so they are asking. (Hint: Alt-period closes your current tag in the Linux version.) Dave Rosoff has prepared an extensive collection of suggestions and hints in the Author's Guide. (2016-06-15)

MBXTools is a Sublime Text Package written and maintained by Dave Rosoff. It enhances the Sublime Text editor so you can be even more efficient as you create MathBook XML source. You can obtain it through Package Control, or read more careful instructions in the Author's Guide. (2016-06-15)

XML Copy Editor is open source (GPL) and runs on Linux, or as a WinPenPack application for Windows. It should take advantage of the MathBook XML DTD (schema/dtd/mathbook.dtd). I have used it a few times but cannot claim extensive experience. (2016-02-20)

This HOWTO might help if you like using vim. It's old, so let me know if it is still useful or obsolete.

Processor

xsltproc is the command-line tool I test with. It supports XSL 1.0, so I am avoiding using XSL 2.0 features. It seems to be system-level software on the Mac, and a standard package in Debian/Ubuntu Linux (see the FAQ for more installation advice). To test, at a command line try $ which xsltproc No news is bad news in this case.

Binaries exist for Windows. Dave Rosoff has done the heavy lifting to figure out how to make them usable. See the Windows Installation Notes in the Author's Guide. And if you have Windows 10, do not miss the pointer to the section on the Windows Subsystem for Linux which could be the easiest way to go. (2016-06-15)

The main site for xsltproc, and supporting libraries, is here.

Spell Checking

I use aspell at the command-line for checking my MathBook XML documents. The secret is to create a configuration file (on Linux it is $HOME/.aspell.conf) and put in the line add-filter sgml. You can have personal dictionaries and all, but I find it useful with just that one customization.

Books

Yes, dead-tree physical books. eXtensible Markup Language (XML), per se, is not really all that complicated. Nested elements, demarcated by angle brackets. Processing XML with eXtensible Stylesheet Language (XSL) is a whole different matter and has a steep learning curve. None of this is necessary in order to author with MathBook XML. These are listed in case you are curious, or want to contribute to development.

  • XML: Visual QuickStart Guide (2nd Edition), Kevin Howard Goldberg.
    This is a quick and easy introduction. It will help you understand almost everything there is to know about XML and a basic introduction to XSL processing.

  • Beginning XSLT 2.0: From Novice to Professional, Jeni Tennison.
    This is a comprehensive, gradual, guide to programming with XSL. It contains XSL 2.0 constructions, but otherwise is a very good resource for XSLT 1.0.

  • XSLT 1.0 Pocket Reference, Evan Lenz.
    This short gem is packed with just what you need after you master the basics. When you have read the previous two books, and then start scratching your head and wondering why XSL seems so mysterious in action, read the relevant short dense paragraph in this book, think hard, and it will all become crystal clear. Supporting website.