In past years, I tried twice to write a book. The first time, 5 years ago, an editor contacted me in a hurry, wanting a book explaing how to learn Python by examples, a 300-pages book with many Windows screenshots. I was not available enough, which means not really interested, to be involved in this project. Especially because the book had to be written in less than 4 months! The second time, I got a contract with an editor to write a book about good programming practices, with a focus on Python and free softwares. But I never signed the contract and I never wrote more than the table of contents…
So I decided to write a book without any editor, without stress. I am writing it when I have one or two hours of free time, eg. in the train when I come back from Paris. I chose a subject which is important for me, Programming with Unicode. I also chose this subject because I know that it will help other developers. It is hard to find good and recent information about Unicode for developers. I try to sum up useful information and good practices in the same document.
I started the project in august 2010 with a private Mercurial project on Bitbucket. But I realized that I would be more motivated if I can share it, even if it is incomplete, and so I moved it to a public repository (still in Bitbucket). Recently, I moved to github.com because I now feel more comfortable with git than Mercurial, especially to modify local commits (git rebase -i) before pushing them.
It is written in reStructured text (reST), a plain text format. I prefer plain text than binary format (eg. OpenDocument) because it can be used in a revision control system, like Mercurial or git. I also prefer reST to LaTeX, because its syntax is readable and simpler. The reST format is more powerful than many other wiki-like syntax: it supports references in the document, footnotes and other nice features. Recently, I moved to Sphinx to have a better HTML output and the ePub output format (added to Sphinx 1.0, released in July 2010). Thanks to Sphinx, I split the unique long file (unicode.rst) into one file per chapter. It is easier for me to work on a smaller files, but I had to convert the internal references from
`link`_ format to
`:ref:link <label>`. Except this minor nit, I am very satisfied of Sphinx. It looks like the compilation is also faster because it only recompiles modified files, not all files.
I am writing mainly on two computers: my desktop computer and a laptop. Mercurial and git helped me to work offline (in the train) and resolve conflicts (because I always forgot to resynchronize the repository on both computers).
Today, the PDF is around 29 pages (including the front page and two pages of the table of contents) and the book is distributed under a non-free license: CC BY-NC-SA (NC as noncommercial). You can download the book on github. I will maybe use a free license later, it depends if I choose to sell it or not.