Wednesday, October 2, 2013

Writing a Book with Linux

cover of The Librarian's Guide to Academic Research in the Cloud

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.

screenshot of text in LibreOffice

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 e-book on Chandos Publishing Online.

You can follow My Linux Rig on Google+ here, follow me on Twitter here, and subscribe to the feed here.


Saturday, November 6, 2010

Linux Word Processing Still Requiring Too Much Thought for Me

A few years ago, I went to a Linux conference, featuring all kinds of corporate Linux advocates, mostly speaking to education issues.

In one of the breakouts, someone from a major Linux company, and a person very much invested in Linux, made an interesting statement. He said Linux would never be a major desktop OS because too many people are too invested in Microsoft Office. He said Office was what kept people in Windows.

His theory was that there were plenty of other non-desktop opportunities for Linux, not that it wasn’t a viable OS.

I heard this five or six years ago. Before the rise of Ubuntu. Before Google Docs. Even before widespread cloud computing.

But word processing is still an issue. Not even word processing, so much as moving documents between operating systems.

(And at this time, I’d like to note that years ago, when I worked in medical publishing, a good one hour out of every day was spent translating Mac files into usable PC files, so I’m not necessarily citing any of this as a fault of Linux, but more as a inter-OS challenge).

On Xubuntu, I use AbiWord, the default word processor. Within the Linux world, I imagine most people use OpenOffice or the upcoming LibreOffice fork.

Even in my GNOME days, I gravitated toward AbiWord (when I needed a formally formatted document and couldn’t get away with a text file) because OpenOffice just didn’t make sense to me. It felt slow and bloated, trying unsuccessfully to mimic Microsoft Office, but seemingly only able to port over the worst aspects.

AbiWord is simple. It can’t do much, but it can make a typed page look OK.

The challenge I run into is maintaining formatting across operating systems — specifically citations. Even something as simple as a hanging indent doesn’t seem to consistently remain when shipped (via RTF) from one OS to another.

I’ve spent some time with Google Docs, and while it’s very convenient, allowing me to work on articles across operating systems and physical computers, there’s definitely a lag when you work in it, and it’s just enough of a lag to be a dealbreaker for me. Plus, printing is a two-step process (download the PDF and print the PDF), although word on the street is that might be changing soon.

I could write locally, upload to Google Docs, format, and then download the converted file, but that too seems a step or two labor intensive.

For right now, I usually try and send out final drafts of articles from work, where I have access to Microsoft Word and can clean them up before shipping them off.

When I can’t get to my work PC, I just kind of ignore the formatting and trust editors to fix things for me. I like to imagine everything needs to be reformatted between my document and their pagination systems. But I also worry they think I don’t know how to do simple citation formatting.

To sort of remove this barrier once and for all, I’m getting ready to explore LaTeX, a document markup language. It’s very popular with math/science/technical people who need to use formulas in their documents, but I believe it also has a small following among control freaks, like myself, who want to control every aspect of their document themselves (not unlike AppleWorks used to allow me to do, back on my family’s IIe clone).

There’s a LaTeX plugin for gedit, so I’ll get to stick to my favorite editor. To move from LaTeX to RTF, I’ll probably use something like pandoc, which converts a variety of markup languages into other markup languages. I like the idea of LaTeX, because there are also ways to convert LaTeX outlines into presentations. Beamer is one such project.

(The lack of decent presentation software for Linux is another thorn in my side. I’m usually too rushed to use S5, so I wind up using PowerPoint at work.)

Moving files between Linux and Windows is much, much easier, but it still isn’t perfect. I’m hoping LaTeX will be the method to make sure more complex word processed documents look relatively close to the same on Linux machines and on Windows boxes.

Otherwise, I may develop a standard formatting disclaimer to send off with my Xubuntu-created word processed documents.