Ben Crowder

Archive: Kindle

MTP: Hephzibah

Emmeline B. Wells’ novel Hephzibah is now available in EPUB, Kindle, and web editions. Originally serialized in 1889 and 1890 in The Woman’s Exponent, this is (to my knowledge) the first time Hephzibah has been published in book form.

We hope you enjoy it.

MTP: Essentials in Church History

Joseph Fielding Smith’s 1922 book Essentials in Church History is now available in EPUB, Kindle, and web editions. It’s a long book, which is part of the reason it’s taken so long. But it’s quite good and I think you’ll enjoy it.

A side announcement: starting now, all new MTP releases will use Kindle Format 8 (KF8) instead of the original Kindle Mobipocket format. (Older Kindles will still be able to read the books, but they won’t look as nice.) The reason for the switch is primarily economy of time — KF8 is very similar to EPUB and requires hardly any tweaks. The original Kindle format, on the other hand, is different enough that it takes a big chunk of time to make each Kindle edition. I’d rather spend that time releasing new books.

MTP update August 2012

I’m slowly, slowly working through the final proof of Essentials in Church History, finding and fixing scads of typos. It’s an admittedly long book, but the main reason it’s taking so long (I’m 65% done and it’s been several months) is a lack of free time. And other distracting projects. Ahem. Feel free to nag me. (No, really.) But it’s coming, and once this proof is done, the rest (converting to Kindle, finalizing, etc.) will be fairly quick.

Going forward, I’m hoping to release a new Mormon Texts Project book at least once a month. In an ideal world we’d be doing many more than that, but I think twelve a year is a decent goal. It would be better than our current rate, anyway.

After Essentials, we’ve got Hephzibah and William Clayton’s Journal coming, plus the books we’re still proofing (Voz de Amonestacion, The Government of God, and Forty Years Among the Indians). We also have to finish converting the rest of our backlog (five books) to EPUB/Kindle.

Question: Once we get through the books we’re working on, what old Mormon books would y’all like us to do next?

The Light Princess

Today’s ebook release: George MacDonald’s fairy tale The Light Princess, available as always in EPUB, Kindle, and web editions.

I was pleasantly surprised to see how well the book (or story, rather, since it’s actually very short) held up to a rereading. Mmm, I love George MacDonald’s work.

Ebook format poll

In my ebook publishing endeavors, I’ve been focusing pretty much only on EPUB and Kindle for the last year or so, but the other day I was looking at the download stats on my site and, to my surprise, the PDFs of my reader’s editions of the scriptures are more popular than the EPUB/Kindle editions. This got me wondering what actual user preferences are when it comes to ebook formats, specifically as far as my own ebooks go. So, gentle readers, here’s another poll:

1. Of the formats listed below, which can you use? (I.e., you have a reader that can handle it and you know how to load ebooks in that format onto that reader.)

2. Of those formats, which do you prefer? (This is in context of the ebooks on this site — Mormon Texts Project, reader’s editions, fairy tales, original language editions, etc.)

Multiple answers per question are fine, of course. And the list:

  • EPUB
  • Kindle
  • Web (HTML)
  • PDF
  • Plain text
  • Print on demand (hard copy)
  • Other (write-in)


MTP: Joseph Smith the Prophet-Teacher EPUB/Kindle

B. H. Roberts’ discourse Joseph Smith the Prophet-Teacher is now available in EPUB, Kindle, and web editions.

Which leaves just six MTP books in our EPUB/Kindle backlog. We’re getting there… (At some point, by the way, I’m planning to also do EPUB/Kindle editions of Jesus the Christ, The Articles of Faith, and The Story of the Mormonism, using the existing Project Gutenberg texts as a base.)

The Blue Fairy Book

Today’s release: The Blue Fairy Book, edited by Andrew Lang, available in EPUB, Kindle, and web editions.

While publishing Grimm in German and Perrault in French was great (and I’ll continue to publish original language editions like them), I’ve long wanted to start publishing fairy tale collections in English. I mean, reading to my kids in 1800s German is cool and all, and I’m certainly planning to do so (along with a delicious array of other old languages), but I have this unshakable feeling that every once in a while they’ll want their stories to be in English. Weird, I know.

So English it is, and Lang’s twelve colored fairy books (published 1889–1910) were the natural place to start. This is the first of the series. Enjoy.

MTP: My First Mission

George Q. Cannon’s book My First Mission, an account of his mission to Hawaii, is now available in EPUB, Kindle, and web editions.

I’ve also redesigned the covers for all the MTP books, for what it’s worth. (I’ve redesigned them several times now, but I think this time it’ll stick.)

In other MTP news, we’ve finished initial proofs of William Clayton’s Journal.

MTP status update

Not much has happened with the Mormon Texts Project in the last couple months, mostly because of my tendinitis. The tendinitis hasn’t gotten worse (thankfully), but it hasn’t gone away, either, so I’ll have to be careful going forward (writing scripts instead of doing things manually, etc.). I don’t think I’ll have to stop making ebooks, though.

Anyway, MTP is not dead. But we do have some minor changes happening.

We originally started out making plain text Project Gutenberg editions of these books. Then, in March 2011, we added EPUB, Kindle, and web editions to the lineup. (We’re still working on converting our backlog over, by the way. The EPUB of Life of Heber C. Kimball is done and I’m not too far from finishing up the Kindle edition.)

Starting today, however, we’re now focusing solely on EPUB, Kindle, and web. No more Project Gutenberg.

Why? Time, mainly. I don’t have unlimited free time, and the more formats we produce, the fewer books we make. I’d rather focus on EPUB/Kindle/web (which are all based on HTML/CSS) and get more books out there — besides, anyone is more than welcome to take the source files to our books, turn them into plain text (which is easy since we use Markdown as our base format), and submit them to Project Gutenberg. And I hope people do.

As far as specific books go, we’re getting close to completing the initial proofs for William Clayton’s Journal, Emmeline B. Wells’ Hephzibah, George Q. Cannon’s My First Mission, and Parley P. Pratt’s Voz de Amonestacion (the Spanish translation of A Voice of Warning). And I’m slowly finalizing Essentials in Church History, which is one big book (so it’s taking a while).

Tangentially to MTP, I’m also reformatting the Journal of Discourses EPUB/Kindle editions, because I’ve learned a lot about styling ebooks since I first released them. (The newly formatted versions of volumes 1–9 are already available, by the way.) And I’m finally going through the JD word by word, proofing against the original page images and fixing all the typos, which are legion (I got the text from Wikisource and apparently they didn’t check it very carefully). It will probably take a year or so to finish proofing, since there are around ten thousand pages to go through.

Oh, one last thing: I’ve added a section on the MTP page linking to other sources for free LDS books online. If you know of any that aren’t listed there, let me know.

The Kindle Touch

Now that I’ve had my Kindle Touch for a few weeks, it’s time for a quick review:

What I like about it

It’s lightweight and feels great in my hands. It’s certainly easier on my eyes. There’s also something uncanny (in a very cool way) about touching a screen that doesn’t look like a normal screen and having it react — it’s magical, which I didn’t expect. I like the slab serif font (Caecilia). Amazon’s Kindle ecosystem (Whispersync, read anywhere, etc.) is very nice, especially now that library lending is starting to happen.

What I don’t like (because, well, I’m a nitpicky designer type)

The touchscreen doesn’t work half the time. I just tried to change my font size and had to tap the size icon nine times before it registered. Nine! Maybe there’s some twisted logic behind where to tap, but tapping on the Kindle Touch is often an exercise in frustration. (P.S. I love my iPhone. Best touchscreen ever.)

Speaking of my iPhone, the Kindle is almost painfully slow in comparison to the iPhone/iPad. (And, a little less importantly, it feels somewhat low-res in comparison to the Retina Display on my iPhone. But then again, my iPad also feels low-res.)

Most books I’ve seen on the Kindle are fully justified, and justification rarely looks good. I also don’t like how page refreshes give you no indication whether you’ve moved forward or backward, other than the very small location/percentage at the bottom.


The Kindle is cool, even in spite of the things I don’t like about it. It’s a slick gadget. I’m glad I have one.

Honestly, though, if I’m going to read ebooks, it’s almost always going to be on my iPhone. For me, ebooks are largely about convenience, and my iPhone is with me all the time (except when I’m in the shower). I hardly ever carry my Kindle or iPad around with me, which makes it hard for either to become a daily part of my life.

About the only thing I see changing this is if the library lending program grows enough that most of the books I want to read are in it. Right now the selection is puny. (And I hesitate to put much money into buying Kindle books, what with the DRM and all. And at this point it’s still not clear whether Kindle or EPUB will become the MP3 of the ebook universe.)

Anyway, this is just me. If your experience with the Kindle Touch or the other new Kindles is different (or the same), do tell.

A Voyage to Arcturus

Today’s release: David Lindsay’s novel A Voyage to Arcturus. It’s a rather odd book which I first heard of via C. S. Lewis. I’ll let him tell you about it (these are from his collected letters):

To Arthur Greeves on 26 Dec 1934:

I wish you had told me a little more about Voyage to Arcturus. Even if you can’t describe it, you could at least give me some idea what it is about: at least whether it is about a voyage to Arcturus or not. I haven’t come across the book yet, but will certainly read it if I do.

To Arthur Greeves on 7 Dec 1935:

I have tried in vain to buy Voyage to Arcturus but it is out of print.

To Roger Lancelyn Green on 28 Dec 1938:

You are obviously much better informed than I about this type of literature and the only one I can add to your list is Voyage to Arcturus by David Lyndsay (Methuen) wh. is out of print but a good bookseller will prob. get you a copy for about 5 to 6 shillings. It is entirely on the imaginative and not at all on the scientific wing.

To Eliza Marian Butler on 18 Aug 1940:

If you don’t know David Lindsay’s Voyage to Arcturus (Methuen. Out of print, but not hard to get) you might find it very interesting. It is mere ‘popular’ fiction, but this kind of writing (like religion on the one hand and pornography on the other) cuts across the ordinary stratifications.

To E. R. Eddison on 19 Dec 1942 (apparently Lewis and Eddison wrote this way to each other, and yes, the macrons are supposed to look like that):

Mary, as for yo¯ hono¯s metaphysick mistresses, beatificall bona robas, hyper-uranian whoores, and transcendentall trulls, not oonlie my complexioun little delighteth in them but my ripe and more constant ivdgement reiecteth, esteeming them in truth no more but what Geo: Macdonald bringeth us in as Lilith in his nobly inuented but ill-languaged romans of the same name, or David Lyndesay of late, under the name Sullenbode, in his notable Voiage and Travell to Arctur¯.

To Charles A. Brady on 29 Oct 1944:

Space-and-time fiction: but oddly enough not Rice-Burroughs. But this is probably a mere chance and the guess was a sound one. The real father of my planet books is David Lindsay’s Voyage to Arcturus, which you also will revel in if you don’t know it. I had grown up on Well’s stories of that kind: it was Lindsay who first gave me the idea that the ‘scientifiction’ appeal could be combined with the ‘supernatural’ appeal — suggested the ‘Cross’ (in biological sense). His own spiritual outlook is detestable, almost diabolist I think, and his style crude: but he showed me what a bang you cd. get from mixing these two elements.

To Ruth Pitter on 4 Jan 1947:

No, I have yet another humiliation to undergo. Can you bear the truth? — Voyage to Arcturus is not the parody of Perelandra but its father. It was published, a dead failure, about 25 years ago. Now that the author is dead it is suddenly leaping into fame: but I’m one of the old guard who had a treasured second hand copy before anyone had heard of it. From Lyndsay I first learned what other planets in fiction are really good for: for spiritual adventures. Only they can satisfy the craving which sends our imaginations off the earth. Or putting it another way, in him I first saw the terrific results produced by the union of two kinds of fiction hitherto kept apart: the Novalis, G. Macdonald, James Stephens sort and the H. G. Wells, Jules Verne sort. My debt to him is very great: tho’ I’m a little alarmed to find it so obvious that the affinity came through to you even from a talk about Lyndsay!

For the rest, Voyage to A is on the borderline of the diabolical: i.e. the philosophy expressed is so Manichaean as to be almost Satanic. Secondly, the style is often laughably crude. Thirdly, the proper names (Polecrab, Blodsombre, Wombflash, Tydomin, Sullenbode) are superb and perhaps Screwtape owes something to them. Fourthly, you must read it. You will have a disquieting but not-to-be-missed experience.

To William Kinter on 28 Mar 1953:

My real model was David Lyndsay’s Voyage to Arcturus wh. first suggested to me that the form of ‘science fiction’ cd. be filled by spiritual experiences.

To Joy Gresham on 22 Dec 1953:

As far as I can remember you were non-committal about Childhood’s End: I suppose you were afraid that you might raise my expectations too high and lead to disappointment. If that was your aim, it has succeeded, for I came to it expecting nothing in particular and have been thoroughly bowled over. It is quite out of range of the common space-and-time writers; away up near Lindsay’s Voyage to Arcturus and Wells’s First Men in the Moon. It is better than any of Stapleton’s. It hasn’t got Ray Bradbury’s delicacy, but then it has ten times his emotional power, and far more mythopoeia.

To Ruth Pitter on 9 Jul 1956:

Thank you for the Voyage returned. I felt pretty sure you couldn’t think it vulgar once you read it: diabolical, mad, childishly ill-written in places — almost anything you like rather than vulgar.

To Alan Hindle on 31 Jan 1960:

Voyage to Arcturus was reprinted by Messrs Faber and Faber within the last 20 years. The original edition (I forget who published it) is still sometimes obtainable. Rogers of Newcastle on Tyne is quite as good a bookseller for hunting out old books as any London or Oxford firm, and usually charges less. The author, David Lindsay, is dead. If you get the book, I shd. think twice before introducing it to the young. It is very strong meat indeed and the philosophy behind it is that of Schopenhauer or the Manichaeans. A youngster unless in perfect psychological health (and what youngster is?) cd. damage himself with it a good deal.

To Robin Anstey on 2 Nov 1960:

You probably know David Lindsay’s Voyage to Arcturus (Faber)? If not, don’t overlook it. This is the fullest example of what I mean — tho’ the message he is putting over is a v. horrible one — Schopenhauer if not Manes himself.

To Joan Lancaster on 27 Mar 1963:

So you are, like me, in love with syllables? Good. Sheldar is a boss word. So are Tolkien’s Tinuviel and Silmaril. And David Lindsay’s Tormance in Voyage to Arcturus. And Northumberland is glorious; but best of all, if only it meant something more interesting, is silver salver.

To Father Peter Milward SJ on 27 Jun 1963:

My stories were not influenced by any of the authors you mention. The first impulse came, I believe, from H. G. Wells. More important was David Lindsay’s Voyage to Arcturus.

To Joan Lancaster on 11 Jul 1963:

I think the poetry is developing alright. You’ll be enchanted with imaginary names for a bit and probably go too far, but that will do you no harm. Like having had measles. I don’t think Joyce is as good at them as David Lindsay (Voyage to Arcturus) or E. R. Eddison in The Worm Ouroboros.

A Voyage to Arcturus is available to read online or download in EPUB or Kindle formats.


Three years after G. K. Chesterton published Heretics, he wrote Orthodoxy. It’s a great book, including one of my favorite Chesterton pieces, The Ethics of Elfland.

As for why he wrote a second book (it’s sort of a sequel to Heretics), he explains why in the preface:

This book is meant to be a companion to Heretics, and to put the positive side in addition to the negative. Many critics complained of the book called Heretics because it merely criticised current philosophies without offering any alternative philosophy. This book is an attempt to answer the challenge. It is unavoidably affirmative and therefore unavoidably autobiographical. . . . It is the purpose of the writer to attempt an explanation, not of whether the Christian Faith can be believed, but of how he personally has come to believe it. The book is therefore arranged upon the positive principle of a riddle and its answer. It deals first with all the writer’s own solitary and sincere speculations and then with all the startling style in which they were all suddenly satisfied by the Christian Theology.

As usual, it’s available to read online or download in EPUB or Kindle formats.

Jane Eyre EPUB/Kindle

Today’s release: Jane Eyre, by Charlotte Brontë, available in EPUB and Kindle formats and on the web. It’s been a favorite of mine since the first time I read it years ago, and I’ve wanted to make a nice ebook edition of it for a while now. Enjoy.

(If you’re wondering why I make my own editions of books that already have plenty of ebook editions available, it’s mainly because bookmaking is fun. And I don’t really like the other freely available ebook editions of Jane Eyre.)

HTML5 and CSS3 on Kindle

Amazon just announced that Kindle Format 8 (the upcoming file format for the Kindle) will support HTML5 and CSS3. Huzzah! Formatting ebooks for Kindle won’t be an exercise in discouragement anymore. (The current Kindle format supports only a painfully limited set of HTML tags and CSS rules.)

The FAQ at the bottom of the page has a nice bit of good news, too:

Q: Will I have to provide two versions of my titles going forward?

A: No. The upcoming updates to our Kindle Publishing Tools will take care of this for you. KindleGen 2 will convert your content so that it works on all Kindle devices and apps. You will be able to preview how your title will look on the range of Kindle devices and apps using Kindle Previewer 2.

Wonderful. And since Kindle will be supporting basically the same HTML/CSS as EPUB3 (at least for the kinds of books I’m doing), it’ll be that much easier to produce Kindle editions. (I always start with the EPUB edition, get it looking good, and then have to make a copy and spend a chunk of time tweaking the HTML/CSS to get it to look half decent on the Kindle.)

Oh, and since the new format will support CSS floats, we’ll be able to get nice line numbers in poetry. Mmm. I’m excited. (Did I mention I preordered a Kindle Touch? It should be here at the end of November.)

MTP: Elias

Alrighty, after a much-too-long wait, we’ve got a new Mormon Texts Project release for y’all: Orson F. Whitney’s epic poem Elias: An Epic of the Ages. It’s on Project Gutenberg and available in EPUB, Kindle, and web editions as well.

And dang, formatting poetry ebooks takes a lot more work than prose. Especially when Whitney changes indentation styles almost every canto. Sigh. (Not to mention the psycho line numbering — see the book page for a rundown on the madness therein.) Regular expressions helped, but it was still a beast.

Anyway, now that that’s out of the way (phew), we’ll be getting back to a more frequent release schedule. I’m finalizing Essentials in Church History (which is über-long but fairly straightforward, formatting-wise) and working on the backlog for EPUB/Kindle conversions (about halfway done with Life of Heber C. Kimball, which is the longest of the books in the backlog), and we’re planning to have Hephzibah and My First Mission finished with proofing by the end of the month (with releases shortly thereafter).

In other words, our hibernatory winter state has ended and the Mormon Texts Project is alive and kicking.

Well, somewhat. Most of our proofing volunteers have gotten sidetracked with school or other personal matters, however, so it’s mostly down to just me and my wife doing the actual proofing, and we need some more people to help out. If you think you might be interested, email me. And thanks in advance. :)


I’ve wanted to get back into reading G. K. Chesterton, but I wasn’t very happy with any of the EPUB editions of Heretics out there, so I’ve made my own. Since, um, that’s what I do. At least with public domain books.

Anyway, head on over to the book page to read it online or download it in EPUB or Kindle formats.

I should also add that this is my first release in a new category, Inklings. Many of the Inklings’ books are still under copyright (C.S. Lewis only has Spirits in Bondage in the public domain, for example), but there are still authors and books that influenced them or that they mentioned in essays or letters, and that’s what I’ll be publishing in that category — G. K. Chesterton’s works, George MacDonald’s works, A Voyage to Arcturus, The Worm Ouroboros, etc. Basically, anything related to the Inklings that’s in the public domain.

Joseph Smith as Scientist EPUB

Things have been a little slow in MTP land lately, but we’re getting back in business. Today we have new EPUB and Kindle editions of Joseph Smith as Scientist for you, along with a web edition for people who don’t have an EPUB or Kindle reader.

I’m going through our backlog and hope to have the rest converted to EPUB/Kindle/web within the next few months. (And we’ll be releasing some new books during that time as well.)

The Iliad

Today’s release: Ἰλιάς, an EPUB/Kindle edition of Homer’s Iliad in ancient Greek (as part of my Originals series). The EPUB edition looks better than the Kindle edition, at least in iBooks and Digital Editions, but the Kindle edition is pretty usable as well. Enjoy.

Formatting poetry for EPUB and Kindle

A lot of the ebooks I’m working on have poetry, and after struggling with the formatting for a while, I think I’ve finally found some methods that are quite acceptable for EPUB (iBooks and Adobe Digital Editions) and somewhat acceptable for Kindle.

Without line numbers

This is the easiest. We’ll be working with the first two stanzas of “Adam-ondi-Ahman”, aiming for the following formatting:

This earth was once a garden place,

With all her glories common,

And men did live a holy race,

And worship Jesus face to face,

In Adam-ondi-Ahman.

We read that Enoch walk’d with God,

Above the power of mammon,

While Zion spread herself abroad,

And Saints and angels sung aloud,

In Adam-ondi-Ahman.


First off, there’s no standard way to mark up poetry. This works for me, but if you’ve got a better way, let us know in the comments.

<div class="poetry">
    <p>This earth was once a garden place,</p>
        <p class="indent">With all her glories common,</p>
    <p>And men did live a holy race,</p>
    <p>And worship Jesus face to face,</p>
        <p class="indent">In Adam-ondi-Ahman.</p>

    <p class="stanza">We read that Enoch walk'd with God,</p>
        <p class="indent">Above the power of mammon,</p>
    <p>While Zion spread herself abroad,</p>
    <p>And Saints and angels sung aloud,</p>
        <p class="indent">In Adam-ondi-Ahman.</p>

So, encapsulate the poem in a .poetry div, put each line in a <p> tag, and use the .indent class for indenting lines. For new stanzas, add a .stanza class to the first line.

.poetry                 { margin: 1em 0; }
.poetry p               { margin: 0 0 0 4em; text-indent: -2em; }
.poetry p.stanza        { margin-top: 1em; }
.poetry p.indent        { margin-left: 5em; }
.poetry p.indent2       { margin-left: 5.5em; }
.poetry p.indent3       { margin-left: 6em; }

And that’ll give you hanging indents and proper indentation and all that good stuff, indenting the whole poem 2em from the left; if you need further indentation, you can use the .indent2 and .indent3 classes (and of course modify them however you need).

To set the poetry flush left, by the way, change margin: 0 0 0 4em to margin: 0 0 0 2em and set the .indent classes to start at 3em instead of 5em.

Kindle (no hanging indent)

If your lines are short enough that you don’t need to worry about using hanging indents, this markup is clean and short:

<p class="stanza">This earth was once a garden place,</p>
    <p class="indent">With all her glories common,</p>
<p>And men did live a holy race,</p>
<p>And worship Jesus face to face,</p>
    <p class="indent">In Adam-ondi-Ahman.</p>

<p class="stanza">We read that Enoch walk'd with God,</p>
    <p class="indent">Above the power of mammon,</p>
<p>While Zion spread herself abroad,</p>
<p>And Saints and angels sung aloud,</p>
    <p class="indent">In Adam-ondi-Ahman.</p>
p           { text-align: left; }
p.stanza    { margin-top: 1em; }
p.indent    { text-indent: 3em; }

Fairly simple.

Kindle (hanging indent)

With longer lines, you’ll usually want to give them hanging indents, as is traditional in formatting poetry. We can do this on the Kindle using nested <p> tags.

There’s a catch, though: if you use this technique for hanging indents, you can’t do further indentation using CSS (like line 2 in our example poem) — as soon as you try to add the hanging indent, the whole thing goes flush left again. Instead, you have to resort to the dreaded &nbsp; entity. If any of you figure out how to get indents and hanging indents on the Kindle, let me know.

<p class="outer"><p class="inner">This earth was once a garden place,</p></p>
    <p class="outer"><p class="inner">&nbsp;&nbsp;&nbsp;&nbsp; With all her glories common,</p></p>
<p class="outer"><p class="inner">And men did live a holy race,</p></p>
<p class="outer"><p class="inner">And worship Jesus face to face,</p></p>
    <p class="outer"><p class="inner">&nbsp;&nbsp;&nbsp;&nbsp; In Adam-ondi-Ahman.</p></p>

<p class="outer"><p class="stanza">We read that Enoch walk'd with God,</p></p>
    <p class="outer"><p class="inner">&nbsp;&nbsp;&nbsp;&nbsp; Above the power of mammon,</p></p>
<p class="outer"><p class="inner">While Zion spread herself abroad,</p></p>
<p class="outer"><p class="inner">And Saints and angels sung aloud,</p></p>
    <p class="outer"><p class="inner">&nbsp;&nbsp;&nbsp;&nbsp; In Adam-ondi-Ahman.</p></p>

Note that for a new stanza, we replace the .inner class with .stanza (since the Kindle parser can’t handle two CSS classes on the same element).

p           { text-align: left; }
p.outer     { text-indent: 2em; }
p.inner     { text-indent: -2em; }
p.stanza    { text-indent: -2em; margin-top: 1em; }

With line numbers

Now it gets a little more complicated. For all of these, I’m using manually entered line numbers. Once EPUB readers support more CSS selectors (like :nth-child), though, it’ll be possible to do this automatically.

There are two basic styles of line numbers in poetry. Here’s left-aligned, using the first twelve lines of the Old English poem “Dream of the Rood” as an example of what we’re trying to achieve:

Hwæt! Ic swefna cyst secgan wylle,

hwæt me gemætte to midre nihte,

syðþan reordberend reste wunedon!

þuhte me þæt ic gesawe syllicre treow


on lyft lædan, leohte bewunden,

beama beorhtost. Eall þæt beacen wæs

begoten mid golde. Gimmas stodon

fægere æt foldan sceatum, swylce þær fife wæron

uppe on þam eaxlegespanne. Beheoldon þær engel dryhtnes ealle,


fægere þurh forðgesceaft. Ne wæs ðær huru fracodes gealga,

ac hine þær beheoldon halige gastas,

men ofer moldan, ond eall þeos mære gesceaft.

And right-aligned:

Hwæt! Ic swefna cyst secgan wylle,

hwæt me gemætte to midre nihte,

syðþan reordberend reste wunedon!

þuhte me þæt ic gesawe syllicre treow


on lyft lædan, leohte bewunden,

beama beorhtost. Eall þæt beacen wæs

begoten mid golde. Gimmas stodon

fægere æt foldan sceatum, swylce þær fife wæron

uppe on þam eaxlegespanne. Beheoldon þær engel dryhtnes ealle,


fægere þurh forðgesceaft. Ne wæs ðær huru fracodes gealga,

ac hine þær beheoldon halige gastas,

men ofer moldan, ond eall þeos mære gesceaft.

EPUB markup (left- and right-aligned line numbers)

The markup is the same for both left-aligned and right-aligned line numbers:

<div class="poetry">
    <p>Hwæt! Ic swefna cyst <span class="caesura"></span> secgan wylle,</p>
    <p>hwæt me gemætte <span class="caesura"></span> to midre nihte,</p>
    <p>syðþan reordberend <span class="caesura"></span> reste wunedon!</p>
    <p>þuhte me þæt ic gesawe <span class="caesura"></span> syllicre treow</p>

    <span class="num">5</span>

    <p>on lyft lædan, <span class="caesura"></span> leohte bewunden,</p>
    <p>beama beorhtost. <span class="caesura"></span> Eall þæt beacen wæs</p>
    <p>begoten mid golde. <span class="caesura"></span> Gimmas stodon</p>
    <p>fægere æt foldan sceatum, <span class="caesura"></span> swylce þær fife wæron</p>
    <p>uppe on þam eaxlegespanne. <span class="caesura"></span> Beheoldon þær engel dryhtnes ealle,</p>

    <span class="num">10</span>

    <p>fægere þurh forðgesceaft. <span class="caesura"></span> Ne wæs ðær huru fracodes gealga,</p>
    <p>ac hine þær beheoldon <span class="caesura"></span> halige gastas,</p>
    <p>men ofer moldan, <span class="caesura"></span> ond eall þeos mære gesceaft.</p>
    <p>Syllic wæs se sigebeam, <span class="caesura"></span> ond ic synnum fah,</p>
    <p>forwunded mid wommum. <span class="caesura"></span> Geseah ic wuldres treow,</p>

EPUB CSS (left-aligned line numbers)

.poetry             { margin: 1em 0; }
.poetry p           { margin: 0 0 0 6em; text-indent: -3em; }
.poetry p.indent    { margin-left: 7em; }
.poetry .num        { float: left; margin-left: 5px; font-size: .8em;
                        color: #999; font-style: italic; }
.poetry .caesura     { display: inline-block; width: 2em; }

EPUB CSS (right-aligned line numbers)

.poetry             { margin: 1em 0; }
.poetry p           { margin: 0 2em 0 2em; text-indent: -2em; }
.poetry p.indent    { margin-left: 1em; }
.poetry .num        { float: right; margin-left: 2em; margin-right: 5px;
                        font-size: .8em; color: #999; font-style: italic; }
.poetry .caesura     { display: inline-block; width: 2em; }

Kindle (right-aligned)

With Kindle, alas, there’s no good way to set line numbers with poetry. The best I’ve come up with has the line numbers right aligned on their own line, which means every five lines (or however often you put line numbers in) there’s a stanza-like blank line. You’ll also notice that the .caesura spans have been replaced with manual strings of &nbsp;, because the spans don’t work on Kindle.

<p class="outer"><p class="inner">Hwæt! Ic swefna cyst &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; secgan wylle,</p></p>
<p class="outer"><p class="inner">hwæt me gemætte &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to midre nihte,</p></p>
<p class="outer"><p class="inner">syðþan reordberend &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reste wunedon!</p></p>
<p class="outer"><p class="inner">þuhte me þæt ic gesawe &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; syllicre treow</p></p>

<p class="num">5</p>

<p class="outer"><p class="inner">on lyft lædan, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; leohte bewunden,</p></p>
<p class="outer"><p class="inner">beama beorhtost. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Eall þæt beacen wæs</p></p>
<p class="outer"><p class="inner">begoten mid golde. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Gimmas stodon</p></p>
<p class="outer"><p class="inner">fægere æt foldan sceatum, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; swylce þær fife wæron</p></p>
<p class="outer"><p class="inner">uppe on þam eaxlegespanne. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Beheoldon þær engel dryhtnes ealle,</p></p>

<p class="num">10</p>

<p class="outer"><p class="inner">fægere þurh forðgesceaft. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ne wæs ðær huru fracodes gealga,</p></p>
<p class="outer"><p class="inner">ac hine þær beheoldon &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; halige gastas,</p></p>
<p class="outer"><p class="inner">men ofer moldan, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ond eall þeos mære gesceaft.</p></p>
p           { text-align: left; }
p.outer     { text-indent: 2em; }
p.inner     { text-indent: -2em; }
p.num       { font-style: italic; text-indent: 90%; }


Nice as it would be to have a cross-platform EPUB/Kindle solution for formatting poetry, that day hasn’t yet come. But in spite of the occasional hassles (I’m looking at you, Kindle), you can get decent-looking results without resorting to too much hackery.