I've been intrigued for some time by the possibility of converting source documents into a variety of output formats. This began in 2006 when I used tex4ht to convert the $\LaTeX$ source for my linear algebra textbook (FCLA) into HTML. Around 2009 I began to experiment with using this conversion to create worksheets viewable in the Sage notebook. The idea was to have Sage code in the source, and have the code be "live" in the notebook - editable and executable. It was a real challenge to begin with $\LaTeX$ and convert to the Sage notebook format (mildly perturbed HTML, rendered with jsMath) so that the text, $\LaTeX$ and Sage all survived intact. With support from the UTMOST grant I was able to get this working for FCLA and Judson's abstract algebra text.
Fast-forward to May 2013. Now we have MathJax as the very worthy succesor to jsMath. Jason Grout and his students have created the Sage Cell server, allowing an easy embedding of live Sage code in a web page. Harald Schilly and David Farmer have created knowls, making cross-references and detail-hiding much more efficient than hyperlinks. The previous year I had gained a lot of hard-won experience converting the source for FCLA to a one-off version of XML. This made many more things possible, with the powerful text transformations available through XSL processing. The result is the current web version of FCLA, in addition to a print-on-demand hardcover version.
With support from a Shuttleworth Flash Grant, I have started to build a general XML application for creating textbooks and other scholarly documents (research papers, monographs, etc). The main goals are to deliver on the promise of separating presentation from content, and to be as simple as possible for authors to quickly get effective results. Most mathematicians will tell you that $\LaTeX$ is all about separating content from presentation, but if you spend enough time trying to parse it programatically you discover it is full of inconsistencies and hidden/implied structure. And that is before authors start using the abundance of add-on packages. Quick: what does "\chapter" do? Answer below.
Unlike DocBook, there is extensive support for mathematics, both displayed and numbered equations and the additional structure of definitions, theorems, claims, remarks and all the cross-referencing we expect. Authors enter shortcut $\LaTeX$ macros for commonly used mathematical constructs one-time only, and they get used for MathJax and for $\LaTeX$ output. HTML output can embed the Sage Cell server and GeoGebra applets, with Code Mirror, JSXGraph, and video all planned or partially implemented.
The link below is an example of the latest iteration, with plenty of rough edges in the content and presentation. David Farmer gets credit for driving the creation of useful and general HTML markup, which will be useful beyond just this project. A UPS student, Michael DuBois, designed the CSS, both visually and functionally, which accompanies the HTML.
So this is an invitation to become involved, as a user or by making suggestions, or just by keeping an eye on developments. I do not yet have everything consolidated on a single website, but plan to soon and will announce it on the Google Group, and perhaps here. In the meantime...
If you are interested, please join the discussions at the Google Group:
Code is on GitHub (everything is on the dev branch):
University of Puget Sound
(Answer: yes, \chapter usually gets you a chapter heading. Unless it comes sometime after \backmatter, in which case it gives you an appendix heading.)