How to write your book using Linux

No readers like this yet.
Publishing the open source way

I spent the past year writing The Librarian’s Guide to Academic Research in the Cloud, a book which focuses on using and thinking about cloud services in an academic research context. I’m fortunate enough to belong to a union that negotiated research leave for new faculty, and that leave made the book possible.

The content of the book might be interesting to Linux users (here is an excerpt), but I wanted to talk about the process for writing the book, which was very Linux-intensive.

Before starting the book, I had heard a lot of horror stories about people forced to use crazy Word stylesheets and templates from publishers. I was very glad that my publisher didn’t use anything like that, which might have forced me to spend more time in Windows. I decided to work with RTF files and used LibreOffice to write the whole thing.

Working with LibreOffice as much as I did was an interesting process. At work, I use Word for word processing and at home I use gedit until I absolutely need to format something. So I hadn’t spent very much time with LibreOffice. It was fine, but there were some rough edges that made it feel a few iterations behind Word. For instance, I wasn’t able to get a running word count going, even though there’s supposed to be an extension to do that. Fonts seemed to change between opening and closing a file. And one file kept getting wiped because I had an HTML link at the start of the file. Nothing cataclysmic happened, but using LibreOffice was not as smooth as using Word. Word is crazy and convoluted, but for the most part, it’s stable and stays out of your way. LibreOffice occasionally acted up and while nothing completely wrecked my project, I don’t find myself suddenly writing in it now that I no longer need to.

Despite some of its limitations, one LibreOffice feature I love is the ability to generate a PDF of a document in one click. I had to deal with permissions, so I just created a permission template that let me easily turn permissions forms into PDFs, which I then emailed out. This was much easier in LibreOffice than it would have been in Word, where I would have needed to convert the files to PDFs using Save As, or that weird Adobe button that takes forever to export the PDF. The Gmail canned message option (available in Labs) was also very helpful when it came time to send out the permissions. The whole permissions process required very little typing, which is always nice.

I’ve recently heard good things about XMLmind, which is used, among other things, to generate DocBook. It’s something I want to further explore for long-form writing. And I’m also curious to see if pandoc, recently mentioned by Bryan Behrenshausen, might be a good option for me.

In terms of images, I did as much as I could with GIMP and the default GNOME Screenshot tool, and that was super simple. I know some people hate GIMP, but once you get used to it (and it took me quite a while to get used to it), it’s powerful and effective. I don’t know if I’ll ever find it easy to use, but it can be conquered.

I was terrified of losing work, so I used SpiderOak as my main backup tool, but then also manually uploaded files into Dropbox every time they were updated. One of the things I like about SpiderOak is that it can be configured to run on demand, only backing up files when I ask it to. That keeps my machine running pretty quickly, where I find the Dropbox client often slows things down. Uploading files into the web interface was painless, though.

I tried to focus the book on cross-platform tools as much as I could, but the reality is that there’s an awful lot of stuff that doesn’t run on Linux. For those situations, I had a virtual machine running XP (via VirtualBox) and it proved to be a life-saver in terms of testing Windows-only tools. It also turned out to be very helpful for installing software I knew I didn’t want on my Linux install. Rather than installing and uninstalling and then cleaning up files, I used the XP image as my sandbox. Toward the end of my book, I had an RTF file (my index) LibreOffice couldn’t open and WordPad on the XP partition saved my bacon, allowing me to open the document and copy-and-paste the text into something LibreOffice could edit. Even with the book completed, the XP partition has come in handy a few times. It’s a nice little safety net for those very rare times there’s something that can only be done in Windows (or when I want to quickly check something on a second machine).

My organizational system wasn’t super cohesive, but it worked for me. I used a combination of SimpleNote and Google Docs/Drive. SimpleNote was used for general notes to myself about what needed to be changed, added, or removed from each chapter (the challenge of writing a print book about web tools is that everything is constantly shifting on you). Google Docs was used for tracking the book’s glossary, plus a spreadsheet of what was going on in each chapter, in terms of the pronoun used (I alternated between he and she), the word count, and any notes that weren’t in SimpleNote. I’m now pretty into Evernote (more on that in a future post), so any future projects will probably be tracked entirely in there, but this system worked very well for me. Having said that, I would love to see Evernote have some kind of native table feature in its web interface because I like seeing information in grids. Especially since I recently discovered Evernote’s table-formatting button.

Once the book was typeset, proofing was handled via the annotation tools within Adobe Reader. I wound up having to install the Linux version of Reader (I had no idea such a thing even existed), and while it didn’t render as well as it does on Windows, I was able to successfully input my changes without any drama. I did double-check the file on a Windows machine to make sure everything made it in, though.

Writing a more complex, long-form work using desktop Linux was remarkably simple. The tools all worked, plus I didn’t have to deal with crashes or lags. One of the central points of my book is that web-based tools free us up in terms of the operating system we can work with. OpenSUSE 12.1 and GNOME 3 made for a fantastic work environment. Linux is great for checking email and Facebook, but it’s also great for serious knowledge work, too. Anyone on the fence about a long-form project in Linux should give it a shot. I’d be shocked if they left disappointed.

The Librarian’s Guide to Academic Research in the Cloud is available from Chandos Publishing. It is also available as an eBook on Chandos Publishing Online.

Originally posted on My Linux Rig. Reposted using Creative Commons.

User profile image.
Steven Ovadia writes, which features The Linux Setup, interviews with desktop Linux users. He is an academic librarian who writes about how users interact with information in an online context for assorted Library Science journals. He is the author of Learn Linux in a Month of Lunches. You can see all of his publications at


Calligra office suite from KDE also has a very interesting app that is made especially for book witers - Calligra Author →

Glad to see this appear here! Great work.

It's even easier with the LyX/LaTeX combination - see

What version of LO were you using? A running word count in the status bar has been standard (without an extension) for a while now ...

I'm not sure, but it's whatever was in OpenSUSE 12.1. I didn't use the LO stable repository which might have pushed out a more recent version.

Ah yeah, that'd be 3.5, which is pretty old. I think the status bar word count came in 3.6 or 4.0.

Keeping LO reasonably up to date is well worth it - now they're free of the dead hand of Oracle, they're adding useful stuff at a fantastic rate. (And they keep whatever the previous version is maintained for those who want stability.)

I found a Session Word Count Macro for LibreOffice Writer here:

I just have to remember to record the word count before I close it.

In reply to by David Gerard (not verified)

I also use Linux for writing/publishing and I don't recall having all these struggles with either OOo or LO. I published an open source math book on pharmaceutical calculations back in early 2012. As it took me close to 2 years to write this 644 page book I started in OOo and finished in LO. I am very comfortable using GIMP and Inkscape for all my artwork and the Dmaths extension made it really easy to insert all my equations. I also wrote a common medications workbook at the beginning of this year and really found it easy to knock out in LO. I just published a new book intended for certification and used booktype on a Debian server to do that. I was able to create my epub straight from it and I pretty much just cut and paste it into LO (while using my own stylesheet) to create the print edition. I find it easy enough that I don't know why more publishers aren't using Linux.

Nor have I, which makes me wonder what this bloke was doing wrong. This article actually prompted a friend, who doesn't know better, to ask "Why, If LO is so broken, bother at all?"

If interested, there is my similar article about e-publishing with Linux:

I just finished authoring a 510 page book using LaTeX on Kubuntu and was quite pleased with the process. The automated layout, contents, index and bibliography layout was well worth the tradeoff of not using a word processing program.

I just briefly chime-in to say that I am a fan of LaTeX and that I used it to write my book (about DSP, if you are curious). LaTeX can be a bit steepy at the beginning, but if you are willing to invest some time in it, I think you will find more convenient than other WYSIWYG tools, especially if you write lots of math.

For my graphical needs I use inkscape which I consider a great tool (most of my figures are schemes, plots, ... that are very suited for vectorial format). If you are willing to learn some keyboard shortcut, you can go very fast... (Being an emacs user can help since you already will have part of your brain specialized in learning things like Ctl-Alt-Shift-S [save in a different format {you can use the menus too}] :-)

Great article. Personally, I use Docbook. My workflow begins in Emacs with nxml-mode for XML, and finishes up with xsltproc or xmlto, which can output the docbook sources to just about anything. I manage all of my source material with git.

I'm a statistician -- I use latex and Sweave for nearly everything . For those who aren't aware, Sweave is a formatter for a document that is a mix of latex and code in R or Splus (statistical computing environment) -- so you do your analysis, generate tables and figures for the document within the document itself. Its part of an outreach effort in reproducible research. It's really great!

LaTeX - "a system for making beautiful books"! (Donald Knuth)

Let me chime in with another vote for <a href=>LyX</a>/Latex, especially when using the <a href=>Koma</a> or <a href=>Memoir</a> book scripts. The PDF output these combinations create are beautiful.

The introduction of WYSIWYM(ean) instead of WYSIWYG(et) was a truly eye opening experience for me when I first ran across LyX about 10 years ago. It really does let you concentrate on the process of writing instead of constantly trying to tweak the format of a document. Instead, formatting is treated as a completely separate task (as it should be!).

Since I discovered Lyx, the application has only continued to improve. In fact, even though LaTeX originated back when paper was the only output available, LyX's export to xhtml has improved to the point that using it as a starting point for epub creation is now feasible. This makes it possible to use one source document for final output to paper, Web, and e-book. IMNSHO, LyX is well worth a look for any aspiring author.

This is definitely a topic that's close to me so Im happy that you wrote about it. I'm also happy that you did the subject some justice. Not only do you know a great deal about it,

Writing a book is very interesting thing. I would like to mention that with the help of this write up one will be able to write a book.
On demand printing

Install Texmaker or Texstudio which are probably available as standard packages in your repositories. These deal with LaTeX which has a book form which any publisher will accept. You can configure ad ons in the preamble that will automatically generate aspects such as: table of conetents, glossary, index, etc.

If you want a professional product, get away from word processors and into document layout programmes. There's a learning curve, but no more than there would be with GIMP.

Another option is AsciiDoc, which can be output to either DocBook or HTML or anything else if your willing to create a backend for it. I'm pretty sure a few O'Reilly books have been created using it.

Check out and for more info.

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.