The purpose of this “book” is to demonstrate a minimalistic setup for making books in the DocOnce format. The setup contains several useful features:
These features have the great advantage that a book can evolve from small documents, thereby making the barrier for book writing much smaller. Also, several appealing ebook formats can be produced, both for the book and the individual chapter documents. The chances that your students read a chapter on the bus becomes larger if the chapter is available as attractive, screen-fit Bootstrap pages on the smart phone than if you just offer the classic LaTeX PDF which actually requires a big screen or a printer.
Implementation of point 1 and 2 is not trivial and requires some rules that might not feel natural at first sight in the setup. Writing a book soon becomes a technically and mentally complex task, just like developing a software system. For the latter people have invented a lot of sophisticated technologies and best practices to deal with the complexity. The present setup for books is a similar collection of my own technologies and best practices, developed from writing thousands of pages. In particular, the setup has been successfully used for the large-scale 900-page Springer book “A Primer on Scientific Programming with Python” [Ref1] (individual chapters of this book, e.g. [Ref2], can be examined online in various ebook formats) as well as for books in the works.
To use this setup, just clone the repository and you have the directory structure, the scripts, and example files to get started with a book project at once! The source files for this book (especially in doc/src/chapters/rules) constitute nice demonstrations for learning about basic and advanced DocOnce writing techniques.
Hans Petter Langtangen, April 2015