How I write… The horror!

It has occurred to me that I haven’t ever documented how my witterings arrive in your feed. Well, are you sitting comfortably? Then I’ll begin.

I produce my words in text files, usually using the VI text editor. When I’m writing on my WoWbox, I putty into my RS/6000, and write there. When I’m on my Umbongo laptop, I use VI there.  My text files are fairly freeform, with a few little additions. I have one text file per chapter. A typical chapter  might start thus:


Part 1: Who the hell does Deathwing think he is.

   Grignr's emerald orbs wallowed lustfully on the recently deceased
corpse of the wretched dragon. "Write in the stygmatic pits from whence
you were spawned, slut", gasped the enraged Ecordian.

First the title, then a line, then the chapter title, then an empty line, then The Story. Indent three spaces for the next paragraph, leave an empty line for a little vertical space. Sometimes you want a bigger break, which you do by having three tabs, then three stars, separated by one tab each. No more, no less, as the piece of Perl I use to turn this into HTML depends on it. Further fun includes *stressed* words between asterisks, lines starting with tabs to be interpreted as a blockquote, and lines starting with # to be interpreted as song lyrics. (Yes, I have musical episodes, bite me).

I store these text files in a CVS repository. I may want to upgrade myself to using SVN at some point, but I’m not in a hurry. This is so I can work on copies on both laptop and RS/6000, without being too royally screwed if I forget to upload something.

Strangely, not everyone enjoys raw text files. So what I do to put them under the eyes of the general public is attack them with a perl script, which turns them into HTML. Every word processor I’ve ever used will bugger up the simplest file format in existence, but some of them are capable (if sometimes unwilling) to eat HTML.  I keep the resulting HTML fairly simple, no tricks, no in-line CSS, no (spit) Javascript, so that any system can render it in its own sweet way.

Within VI, I’ve added a few likely macros. First, of course, I set auto indent off, and the wrapmargin to ten, so that I don’t get really long lines, my up/down keys do what I need them to and I dont need to press return when the margin bell goes… Gods the wonders of modern technology. I also have macros to re-flow the paragraph I’m in, get rid of double spaces that fmt likes to put in now and then, and save, then regenerate the HTML so I can see what my words look like on teh webs. This makes for a surprisingly comfortable writing environment. No bells, no whistles, just me and my words. Compare that to anything Official, where one mis-click can bugger up your whole document.

I wish that more sites had a feature where you simply have a dropzone for HTML files, but didn’t (and they perpetrated atrocities upon my documents and harvested readers’ emails, so vomit on them). Neither, sadly, does WordPress. So what I do is open the chapters with Firefox, hit ctrl-U to get at the source, and cut-and-paste that into the “html” tab of the editing window. Set up links, and there you go. Another chapter.

Now to turn the story into PDF, I use two programs: First “tales2html”, which is a modification of my script that will turn a whole bundle of text files into one very long HTML doc. Then, I use xhtml2pdf to convert it. The tales2html script will insert a few tags into the document: Page size (which CSS doesn’t support for good reasons), and I want every chapter to start on a new page, so there’s a tag for that. These tags are not standard HTML, but browsers ignore them. I also set the page margin to zero to avoid a little problem with the Kindle PDF reader sometimes eating up the last line on a page. And then, I have a PDF that’s comfortable to read on a Kindle.

For my next trick, I’ll try to get my stories converted from HTML to .mobi using “kindlegen” by Amazon. The home edition is free, and the only difference between the home edition and the “enterprise” one is that the latter lets you give a file to someone, and they cannot read it because it’s encrypted! That’ll teach the filthy pirates. Needless to say, I need that mis-feature like I need extra holes in my head.

So there you have it. A thrilling insight into the minimalist’s approach to e-publishing.

Both comments and trackbacks are currently closed.
%d bloggers like this: