Poetry

You can write poetry in Leanpub books. Here are a couple of tips:

Poetry Stanzas in Regular Markdown

To make stanzas, you have to put two blank spaces at the end of each line (i.e. press the space bar twice). Then you can get poems to look like this:

In Xanadu did Kubla Khan A stately pleasure dome decree: Where Alph, the sacred river, ran Through caverns measureless to man Down to a sunless sea.

Spacing Control for Poetry

For more powerful spacing control, for example to put letters wherever you like in the line, we have made a special block of text for poetry. This is necessary in order to produce poetry in a reasonably uniform way in many different e-formats with one click.

To make a block of poetry, you need to indicate where you are starting and stopping the block of poetry. Your readers will not see the instructions to start and stop the block of poetry; they will only see the poetry. Here is an example of what you need to do:

1 {style=poem}
2 ~~~~~~
3 In Xanadu did Kubla Khan
4    A stately pleasure-dome decree:
5       Where Alph, the sacred river, ran
6          Through caverns measureless to man
7             Down to a sunless sea.
8 ~~~~~~

If you type the above example into your text file, and then generate a Preview, in the ebook you will see this:

In Xanadu did Kubla Khan
   A stately pleasure-dome decree:
      Where Alph, the sacred river, ran
         Through caverns measureless to man
            Down to a sunless sea.

Please note the poem needs to have a line of six tildes ~ above and below it. This indicates that it’s a special block of text. And don’t forget to type {style=poem} where the poem starts, to indicate that the following block of text is a poem. Don’t worry, the tildes and {style=poem} won’t be visible in the book!

If you write using our special poem block of text, you don’t have to worry about putting the two spaces at the end of your lines.

Line Lengths

If a line of poetry is too long to fit in the margins, you will have to manually edit the line. You can also try changing the size of the book page, in the “Book Theme” tab under “Writing” in the book tools menu.

One last thing: you can actually copy and paste poetry from Microsoft Word in between the tilde lines, and the spacing of your words will be retained.