I’ve been asked by a couple of people about the toolchain I use when writing, because it’s not the standard “Microsoft Word and nothing else, or maybe Scrivener if you’re a Mac user” toolchain that every other writer, more or less, uses. As it’s NaNoWriMo month, now’s as good a time as any to do some writing-process posts, so I thought I’d do this, and maybe follow up later with one about the creative part of the process.
Note that this is the process I use *when self-publishing*. When I’m writing something for another publisher, I have to drop into using LibreOffice at some point in the process, in order to have version tracking that’s compatible with what my editor is using. When I self-publish, Holly’s my editor, and she uses LyX so there’s not that issue.
The main tool I use is LyX, a document processor. Because it uses a program called LaTeX as its backend, some of the people I’ve talked to about this have assumed that LyX must, like that, be something for hardcore computer users only. In fact, it’s the easiest computer program to use that I’ve ever come across.
I agree with Charles Stross’ criticisms of Word, and while LibreOffice, its principal competitor, is a much better piece of software than Word is, it still has the problems that result from Word’s design faults.
While I wrote my first two books in LibreOffice, Word and the various Wordalikes are simply not designed for anyone who wants to write anything other than a business letter — one of the biggest sources of stress in my last job was having to use Word for longer documents, and the constant stupid problems that result, where you make something into a bullet point on page twenty and suddenly find that this means Word has decided to add an extra page of blank space on page twelve.
This happens, ultimately, because Word is a “WYSIWYG” (what you see is what you get) editor — it thinks the person writing the document wants *while writing* to have pixel-level control of where every element is positioned on the printed page. This is usually true when writing a business letter, where you care more that the company logo is printed in the top right-hand corner of the page and that the CEO’s scanned signature is on the same page than you do about writing the three lines that go in the middle.
But when you’re trying to write something that’s fifty thousand words or so of text, without having to think about “if I change this from a bullet point to a chapter heading what will that do to all the rest of my formatting?”, Word is absolute hell. LibreOffice is slightly better, because it’s a *competently written* implementation of the same paradigm, but the clue’s still in the name — it’s *office* software, not writing software.
For actual writing, a lot of writers I know swear by Scrivener, but while I’ve tried it I don’t get the appeal (I’m not a very visual person though, so graphical metaphors are rather lost on me). But LyX Just Works for me. LyX makes no attempt to represent on screen what your finished document will look like. You just type, and if you want to mark something as a chapter heading, you select the “chapter” style — the choices you make are to do with the semantic structure of the document, not with the visual style. You can then, later, select one of many style sheets to apply to the finished document, and those style sheets will interpret the “chapter” marking as being, for example, “15 point, bold” or whatever the style is.
This doesn’t mean you have no visual clue as to the differences in text, but LyX works on what it calls “what you see is what you mean” rather than “what you see is what you get”. For example in the screenshot below, “chapter 1” is marked “chapter”, “Monday” is marked “section”, and the first line of text is marked “standard”:
It’s easy to tell what those sections are doing, but it’s not a direct representation of the output — here’s a screenshot of the PDF output, as used in the printed book, for comparison.
You can see that it looks very different from how it did when writing. And if I decide I want the PDF to be in ten-point Computer Modern rather than twelve-point Helvetica, I can — *without changing anything about the way the document looks on my screen when writing* — change the output font and get this instead with a couple of clicks:
LyX does have a bit of a learning curve when first starting to use it, but it’s the single best-documented piece of software I’ve ever used, and it manages to have a *huge* range of features (it’s the only word processor I’ve ever heard of which has built-in tutorials om typesetting music, Feynman diagrams, and linguistics papers) without having a confusing interface.
The *only* annoyance a casual user is likely to come across is that if you want to do ‘single quotes’ (like that) around a word, you can’t type an apostrophe for the opening single quote, but have to use a backtick instead (so you’d type `single quotes’), because LaTeX, the typesetting language it uses as a backend, always interprets a single quote mark as being an apostrophe.
(There was another problem involving quotes, which was rather more annoying, but I raised that in a blog post and not only did the blog post get it fixed, it also put me back in touch with an old friend I’d not seen in twenty years!)
Once the book has been written, it needs to be turned into physical books and ebooks. If I’m writing a non-fiction book, at this point I split things off into two files, one for the ebook and one for the physical book. The reason for this is that the physical book requires an index, while the ebook doesn’t, and if you mark up a book for indexing it can leave artefacts in the text.
For the physical book copy, I then mark up the index using LyX’s indexing feature and export the book as a PDF. I use LyX’s standard “book” class, but set the page layout to 22.86cm by 15.24cm, which is exactly what Lulu want and close enough to what KDP Print want as to make no difference. I also use sans serif twelve-point fonts, rather than its ten-point serif default, as those are easier for people with visual problems to read.
LyX uses LaTeX to typeset the book automagically, and this usually does a good job of just getting everything right (though it wasn’t great when doing my book An Incomprehensible Condition, which had a lot of images at awkward sizes. If I was redoing that book now, I’d spend some time messing with the layouts). I do set “\widowpenalty=10000” in the LaTeX Preamble setting in LyX now, just to ensure there are few widows and orphans, but this is an advanced thing you don’t really have to worry about.
I then get cover art from a variety of sources. Most of my books use public domain images, while others I’ve drawn myself or have been provided by my friend “Mapcase of Anaheim”. In a couple of cases I’ve bought art from dreamstime.com , a site where you can find a variety of stock images (the cover of The Basilisk Murders comes from there). I resize and edit the art, and add text, in The GIMP, a free image editor that does some of the same jobs as Photoshop well enough for my purposes, and then upload the PDF of the text and the jpeg of the cover art to KDP Print (for the paperback) and Lulu (for the hardbacks and for paperbacks before this year). I use their online cover creators for laying out the back cover and dust jacket text.
For the ebooks, I used to have to export to RTF and hope that KDP and the Smashwords “meat grinder” wouldn’t do too horrible a job of conversion into ebook formats. These days, thankfully, KDP and Draft2Digital (which I use in preference of Smashwords for new books, though for my most recent one I’ve been trying KDP Select and so haven’t gone for the wider distribution that D2D offers) allow you to upload your own file and not have to rely on their converters.
Epub and Mobi (the two main ebook formats) are both essentially wrappers round HTML files, so I first export the book to HTML. There is functionality within LyX for doing this, but I’ve found it doesn’t *quite* do what I want, so I tend to use elyxer (the program that LyX uses, and which comes bundled with it) directly from the command line. The command I use is:
elyxer --footnotes number,end --nofooter --html bookname.lyx bookname.html
I then load the HTML and the cover jpeg into Calibre, the ebook management software, and convert it into a properly standards-compliant epub and mobi, with minimal built-in formatting (every extra formatting thing you do other than presenting the plain text makes the ebook more likely to break in interesting ways — for example the ebook of Neal Stephenson and Nicole Galland’s The Rise and Fall of D.O.D.O. has some chapters formatted to look like handwriting. These look very pretty when read on my computer, but mean that on my ereader the software skips the entire chapter after the first screen).
I scan through the ebooks, looking for formatting errors — one thing to note no matter *what* your toolchain is that special characters like ellipses and ligatures can break in interesting ways when you’re converting between multiple formats. Patreon backers will have noted that occasionally I’ll upload multiple versions of the books to them — this is because I’ve missed something and so a copy of the book might have one of these errors in.
I then upload the mobi to Amazon, and the epub (in every case except the Basilisk book, for which I’ve made the ebook Kindle-only to see if KDP Select helps me) to Draft2Digital.
Anyway, that’s my toolchain. It sounds like a slightly complex way of doing things, until you’ve tried the normal way, but putting these tiny bits of effort in removes ten thousand other tiny distractions that you wouldn’t even notice until they were gone. I hope this helps someone.
This blog post has been brought to you by the generosity of my backers on Patreon. Why not join them?