I installed both a Docbook and a LaTeX tool chain on my laptop recently. I’ve used LaTeX for my thesis – nearly fifteen years ago. I remember forgetting more and more about it in the years that followed until I finally decided that it was just easier to write stuff on a wiki, work on the CSS stylesheet, and print to PDF if required. I got curious again and decided to make an experiment:
Here’s how it went: I quickly wrote up some stuff using my wiki. Getting it ready for the web took a few minutes, maybe half an hour of fiddling with CSS; I’m assuming I can just keep this CSS for the next time I need to convert one of my wiki pages to PDF. On the other hand, there are many things it doesn’t do: hyphenation, orphan protection when paginating, quick and easy floating boxes and images (it always needs a lot of CSS fiddling).
Using Open Office, things went just as quickly. I’m not sure I’ll be able to reproduce the exact output when I look at making my next PDF file, but it was more or less intuitive. Installing and using the Behrens-Schrift font by Dieter Steffman was trivial. The file doesn’t use quite the same font and it’s landscape instead of portrait, but my conclusions are – I hope – independent of these small differences.
Docbook was a pain to setup, but at least there were some books available online. It turns out that the one book that explains all the tags is a dry technical reference that is practically unusable when you’re starting out. When I looked at the output, I realized how tricky it was to fiddle with it. The large table at the beginning needs some more space between the cells, the four smaller tables need to be more compact. I found XSLT fragments that allowed me to set the padding for all tables, but didn’t figure out how to do this for one table only. If you look at the source file (which I edited with nXML Mode and Emacs), you’ll note that looking at the table markup is a pain. I wasn’t sure how to have two columns or floating tables for the four compact tables, so I nested tables. The markup got a lot worse. The output looks good, so that’s a plus.
LaTeX was easy to setup because my GNU/Linux distro already comes with excellent packages. LaTeX documentation for beginners, however, is hard to find. Where do I learn about the basics? I see that the texlive-doc-en package has a “gentle” document somewhere. Maybe someday! I fell back to my “LaTeX Einführung Band 1” by Helmut Kopka – the second printing, 1996 – it has a price in Deutsche Mark instead of Euros, that’s how old it is. I was surprised to see how ugly the table turned out, and I have no idea on how to improve that. The source doesn’t look too hot either. Very cryptic. (I edited it using AUCTeX and Emacs.)
I will be using Open Office! ⚠
It hurts my markup sensibilities, but if I want to get stuff done, I can’t waste it on Docbook and LaTeX.
Update: I returned to rst2pdf again and tried it. It took me quite a while to get the font importing right. But I think it finally worked! The command used:
rst2pdf chargen.rst -s style.json --font-path ~/.fonts (the font-path is where I installed the fonts I got from elsewhere).
Suddenly I’m no longer sure. ReST seems quite a viable solution. And I've started playing around with the style sheet... Not bad The only question I could not answer was how to center the first column of my tables.
Update: I’ve returned to LaTeX in 2013.