09 August, 2012

To hell with OpenOffice

With only a handful of chapters left in my final revision pass (and mostly I'm just waiting on the final cover art), I've decided that even though I wrote the entirety of THE QUEEN OF MAGES in OpenOffice (later LibreOffice; I upgraded back in March, although the two programs are still nearly identical at this point—LibreOffice is a fork of OpenOffice), I'm throwing the damn thing away.

(For clarity, I'm just going to call it LO.)

It is nice writing in a traditional word processor program, with its pretty fonts and non-breaking word wrapping and automatic curly quotes and such, but (and it's a but so big that Sir Mix-a-Lot would drool) problems abounded:

  • Assembling 40 individual chapter documents, 5 pieces of end matter, and a table of contents into an ebook file turned out to be a kludgy, annoying mess. I was able (despite awful documentation) to figure out how to create a master document, in which I could embed the 45 separate documents... one... by... one...
  • You can't edit documents in situ in an LO master document. You have to open each individual linked document separately. Normally this wasn't that big a deal—I tend to work on chapters individually anyway—but occasionally it was annoying, especially when I just wanted to adjust things having to do with layout. After I'd already finished my first draft, I wanted to go back and change how the title of each chapter was written. This meant opening 40 files and editing the header of every. Single. One.
  • LO (even after upgrading from OO) was touchy. Doing certain things with the document list in the master document would make LO crash. Sometimes opening too many documents at once would make it crash.
  • I kept all the files for the entire novel (chapters, front/end matter, notes, etc.) under source control in Subversion. Each day (sometimes multiple times per day, if I was getting a lot done) I would commit the changes. The problem is that Subversion has no idea how to compare differences between versions of OpenDocument files, so Subversion here was nothing more than a highly incremental backup system. If I accidentally changed something (via fat fingers), it might not be obvious, and there was no easy way to tell if something had changed relative to what was in the repository. You can't do svn diff on binary formats.
  • LO has some weird UI issues. Sometimes when scrolling around, a line or two of text will compress by a few pixels. It's just a subtle rendering error, but it's ugly and makes it look weird, but it happens constantly and looks weird.
  • OpenDocument files are a lot bigger than text files. Not that I'm low on disk space or memory, but I've been computing since the days of MS-DOS 2.1, and unnecessary bloat always makes my eye twitch.
  • I only use spellcheck right before I publish something. However, since you can't edit things in a master document, I would have had to open every single chapter file and run LO's spellcheck (which has a not-great UI) on each of them to see if anything was wrong. Instead I ended up using the command-line tool aspell on the exported HTML file (after I stripped out all the HTML tags) and, whenever I found a typo, opened up the particular chapter file to make the fix.
  • LO's HTML exporter is horrible. Not as bad as Microsoft's, but not even close to HTML 4 compliant. Yes, HTML 4, which was finalized in 1997. FONT tags everywhere, badly-formatted CSS, utterly extraneous SPAN tags... ugh.
  • The corollary to the HTML exporter's horrificness is that it's sometimes difficult to tell what kind of formatting/layout you need to do inside LO in order to get a given result in the HTML. This is normally not a huge deal, beause LO tries to preserve the look so that if you view the HTML document in a web browser, it will look more or less the same. But when you then have to convert it to MobiPocket, a format that is not particularly forgiving of formatting weirdness, it can be a problem.
  • I use vim for virtually all text (and for absolutely all code) that I write, and I'm so used to its convenient editing commands that whenever I want to edit things in LO's old-fashioned insert-mode-only interface, I feel like I've had half my fingers cut off.
  • I can SSH to my desktop from my phone, wherever I am, and write using vim. Using LO remotely is far, far more difficult, and (depending on the hardware) sometimes impossible.
As a result of all this, I'm going write the sequel in vim. Yep, good ol' vim, which I've been using for programming for 13 years. (It can do non-breaking word wrapping, too!)

I spent a couple of hours putting together a bash script that uses perl and sed to format the chapter files into MobiPocket-friendly HTML, and then assembles them and the front/end matter files (which are pre-written HTML fragments) into a single master document. It also automatically constructs an HTML table of contents (with links) from whatever files are in the chapters directory.

The only real advantage LO gave me was a little prettiness. But it's not much of an advantage. So I'm kicking it to the curb.

No comments:

Post a Comment