Home Menu ↓

Blog

Dream of the Rood

Today’s release of Dream of the Rood (in EPUB and Kindle formats) also marks the beginning of my Old English Texts series. I’ll be releasing nice EPUB/Kindle editions of Old English texts, using the Labyrinth Library editions as a base. (They’ve been kind enough to grant me permission to do this.)


Reply via email

Formatting poetry for EPUB and Kindle

2018 note: this post has some formatting issues from when I migrated to a new blog engine. Until I get time to get it fixed, you’ll have to view source to see the markup correctly. (The post is also somewhat obsolete now, I think.)

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.

EPUB

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.

Markup

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.

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.

CSS
.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:

Markup

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.

CSS
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 “ 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   entity. If any of you figure out how to get indents and hanging indents on the Kindle, let me know.

Markup

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.

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).

CSS
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

5

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,

10

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

5

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,

10

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:

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

5

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,

10

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.

Syllic wæs se sigebeam, ond ic synnum fah,

forwunded mid wommum. Geseah ic wuldres treow,

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  , because the spans don’t work on Kindle.

Markup

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

5

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,

10

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.

CSS
p           { text-align: left; }
p.outer     { text-indent: 2em; }
p.inner     { text-indent: -2em; }
p.num       { font-style: italic; text-indent: 90%; }

Conclusion

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.


Reply via email

Crime & Punishment Kindle edition

Now that the Kindle supports Cyrillic, I’ve put together a Kindle edition of the Russian Crime & Punishment, to match the EPUB I released a year ago. I’ve also made the EPUB formatting a little nicer. Enjoy.


Reply via email

AML post on Mormon Texts Project

Jonathan Langford over at Dawning of a Brighter Day (the Association for Mormon Letters blog) asked me to write a guest post about the Mormon Texts Project, and it just went up.


Reply via email

Mediation and Atonement

New release: Mediation and Atonement, by John Taylor. Available in EPUB and Kindle formats and on Project Gutenberg.


Reply via email

Why I give stuff away

Pretty much everything on here — ebooks, charts, software, you name it — is free, licensed under the Creative Commons. Why?

Mainly, I have a full-time job and make more than enough to take good care of my family. This isn’t my livelihood.

And that’s a good thing — I’m not a business person at all, and adding money to the mix usually just makes things feel icky to me. I’d much, much, much rather give my work away as a gift, no strings attached, hoping to make the world a better place. Having people use and enjoy my stuff is a greater reward than the money ever could have been.

I think I’m this way for two reasons: first, I used Linux for eight years and was heavily immersed in the open source culture. Second, I promised the Lord that I’d help build the kingdom using my time and talents, and giving stuff away is one of the ways I feel I’m keeping that promise.

When I give my work away for free, it’s accessible to everyone, including those who couldn’t afford it if I did sell it. And if even just one person benefits from my work somehow, that’s good enough for me.

Let me make it clear that I don’t think it’s wrong for other people to sell their work. Everything I’ve said here applies to me and me alone as far as I’m concerned. Others can (and should) sell their work. I can’t.


Reply via email

Update on Mormon Artist

Remember how I was going to shut down Mormon Artist? I’m still stepping down, but I recently decided to pass the name/domain on after all. Katherine Morris (my literature editor) will be taking the reins after we publish Issue 16. She’ll be doing things somewhat differently — I’ll let her explain that when the time comes — but the brand will live on.


Reply via email

The power of next actions

I have a habit of not finishing illustrations I’ve started. Right now, for example, my art tracker spreadsheet tells me that eleven of the forty-one illustrations I’ve started in 2011 so far are unfinished.

Ordinarily, if I still haven’t finished an illo and it’s been a week or two since I last worked on it, it’s basically dead in the water. I forget about it. It languishes. And then it makes my list of abandoned projects for the year.

Sometimes that’s a good thing. If the idea behind the piece can’t support its own weight, it’s better to let it go. But more often than not, the idea was just fine.

So, what I’ve started doing (and should have started doing a long time ago) is making a list of my unfinished pieces and then deciding what my next action needs to be for each one. For one piece, it’s to draw the characters more clearly and clean up the linework. For another, it’s to try a new perspective to make the object in the distance loom larger. For another, it’s to rework the idea so it’s more interesting, because right now it’s kind of static. And so on.

It’s working.

Take my “Return from Exile” piece the other day. It began as a loosening exercise in Photoshop that looked kind of like the inside of a cave. I then forgot about it and kind of stopped caring. It was definitely in danger of being abandoned forever. But when I made my list and figured out that my next action was to smooth out the rough strokes, bam, I got back into the illustration and I was able to finish it.

Sometimes I forget that the project management techniques I’ve learned from coding and design and my other projects can just as easily be applied to art. Art isn’t voodoo.


Reply via email

Mere information

I’ve been reading Arthur Henry King’s book The Abundance of the Heart, and something C. Terry Warner wrote in the introduction (pages 3–4) has stuck with me:

We can reflect again on our contemporary conception of the truth as mere information. This conception is not only false; it is dangerous. It leads us to suppose that we can pass bits of the truth conveniently to one another, as if they were coins. We are encouraged to regard the mind as a kind of purse in which we can collect and even hoard these coins. We believe we can buy, sell, and barter for them; we treat them as if they have exchange value. As far as we are concerned, evil people can get hold of them, as well as good people. Sinister men can control the world by acquiring these truths and withholding them from others. All of this is false. The idea that truth is information is, ultimately, a menacing economic metaphor.

Just how menacing this idea is can be seen in our approach to education. Because we have taken the economic metaphor seriously, we have come to think that learning is completely independent of morality. We have made it competitive rather than cooperative. We have turned our universities into vocational schools. Certain kinds of training have become not just occupationally but socially advantageous. We have made the most successful information-mongers among us into snobs. Learning, so called, has become a divisive social instrument that reinforces class distinctions. It is not possible to calculate the devastating effects of these disasters.

Teaching is not a form of commerce. It is more like the radiance or influence of a resonant soul as it is felt by other souls. The teacher of the truth does not convey to the student valuable bits of anything, but by his presence and commitment he points away from himself to something higher than himself, to which the student can have independent access. “And also trust no one to be your teacher…, except he be a man of God, walking in his ways and keeping his commandments” (Mosiah 23:14).


Reply via email

Return from Exile

Painted in Photoshop.

Reply via email