# Writing a poetry collection in Markdown

> Standard Markdown swallows the line breaks a poem is made of. How to keep them, set stanzas, put one poem on a page, and choose between PDF and EPUB for verse.

Canonical: https://buk.press/blog/poetry-book-markdown

2 September 2026 · 6 min read

Markdown works for poetry only if the renderer keeps a single line break as a line break, because verse is made of lines and standard Markdown joins them. Get that one behaviour, then the rest is convention: a blank line between stanzas, a heading for each title, a page break after each poem, and a PDF rather than an EPUB where the shape of the poem on the page is part of the poem.

Poets are told Markdown is for programmers. It is not (it is for anyone whose text should outlive the software it was written in), but the advice comes from somewhere real. The first thing standard Markdown does to a poem is destroy it.

## The line-break problem, and why it is the whole problem

In CommonMark a single newline is a space. Two lines of verse become one line of prose. The three lines of a haiku become a sentence. This is not a bug; it was designed for paragraphs of web text, where a hard-wrapped source file should render as flowing prose. For a poem it is exactly wrong.

[The workarounds](https://buk.press/blog/markdown-line-breaks) all cost something. Two trailing spaces at the end of every line are invisible, get stripped by editors, and make every poem a trap. A backslash at the end of each line is visible and ugly and turns the manuscript into something you would not want to read in the editor. Raw `<br>` tags make it HTML.

The workable answer is a renderer that treats one Enter as one line break. bukpress does this: a single newline in the source is a real line break in the PDF and the EPUB, which means a poem is typed the way it is read, and nothing is added to the file to make it survive. If you are using a different tool, find out how it handles a single newline before you write a second poem.

```
<code>## Harbour, February

The boats are in.
Nothing moves but the light on the water
and a gull, reconsidering.

Somewhere a door.
Somewhere the sound of a door.</code>
```

## Stanzas, titles and the outline

With line breaks solved, the conventions are simple and worth keeping to, because the ebook's navigation and the contents page are built from them.

- **A blank line between stanzas.** That is a paragraph break, and the stanza gap comes from the paragraph spacing in the typography settings, so every stanza gap in the book is the same size, without you measuring one.
- **Every poem's title is a `##` heading.** One level, used for every poem, so the outline is a flat list of titles: the contents page in one place and the Kindle's jump-to menu in the other.
- **Sections of the collection, if it has them, are `##` too,** each on its own page, with the poems that follow demoted to `###`. Pick one scheme and hold to it; a collection with sections and one without should not be mixed.
- **An untitled poem gets a heading anyway**: its first line, or a number. A poem with no heading has no entry in the contents and no place in the ebook's navigation, and a reader cannot find it.

## One poem to a page

Most collections put each poem on its own page, and a short poem sits in the upper part of the page with white space beneath. That white space is not waste. It is the frame. A renderer that flows the next poem straight in under the last one has produced a document, not a collection.

In Markdown the instruction is a [page break after each poem](https://buk.press/blog/markdown-page-breaks). With bukpress that is three dashes on their own line (a hard page break rather than a horizontal rule), so the manuscript reads as poem, `---`, poem, `---`, and each heading starts at the top of a fresh page. Four dashes prints a small ornamental divider instead, which is what you want between the parts of a long poem that share a page.

A poem longer than a page is the one case that needs judgement. Let it run over, but check where the break falls: a stanza split across pages reads as two stanzas. If the break lands mid-stanza, a break of your own before that stanza is the honest fix.

## Long lines and indentation

A line of verse that is longer than the measure wraps, and a wrapped line is a lie about the poem's shape. Two things control it. The measure itself (the text width the margins leave) and the type size. A collection with long lines wants a slightly smaller face or narrower margins than a novel would, and a landscape orientation is not available in a book, so the tradeoff has to be made on the page you have. Print a page with your longest line on it before you decide anything else.

Indented lines (the stepped lines of a Williams poem, a dropped half-line) are the hardest thing to do in any plain-text format, because leading spaces are what Markdown uses to mean *code*. Four spaces at the start of a line and the renderer sets it in monospace. The options are narrow: a few non-breaking spaces at the start of the line, which survive but are invisible in the file, or accepting that the collection is left-aligned and revising the poems that depend on the step. Concrete poetry, where the layout *is* the poem, is not a Markdown project; that is a layout application or a hand-set page.

## PDF or EPUB for verse?

|  | PDF | EPUB |
|---|---|---|
| Line breaks | Exactly where you put them | Where you put them, unless the line is wider than the screen |
| Long lines | Fit the page you designed | Wrap on a phone, with no way to stop it |
| One poem per page | Yes | A page is whatever the device says it is |
| Typeface | Yours, embedded | Yours, unless the reader overrides it |
| Where it sells | Direct, print-on-demand, your own site | Kindle, Apple Books, Kobo |

For verse the PDF is the edition of record. A poem is partly a shape, and only a fixed page keeps the shape. The [EPUB](https://buk.press/markdown-to-epub) is the edition that reaches a Kindle, and it is worth making, with the understanding that a long line will wrap on a small screen and there is nothing any tool can do about that: the reader chose the screen. Short-lined collections survive reflow well. Long-lined ones should be sold as PDF first and EPUB with a note. The [general case](https://buk.press/blog/epub-vs-pdf) is that you want both; for poetry the PDF is the one to proof.

## Contents, page numbers, and the rest of the book

A poetry collection is more front matter than most books: a dedication, sometimes an epigraph, a contents page that lists every poem, acknowledgements naming the magazines that first published some of them. Each is a `##` heading followed by a page break, in the order a printed collection puts them, so they sit in the outline with everything else.

[Write the contents page by hand](https://buk.press/blog/markdown-table-of-contents) as a list of titles, and leave the page numbers out of it unless the book is final; a contents with numbers is a snapshot that the next edit makes wrong. Page numbers on the pages themselves are a footer setting (in bukpress a single switch), and a collection wants them, because "page 41" is how a poem is cited at a reading.

For the type, a serif with a real italic at 11pt, line height a little looser than prose, and margins wider than you think. The [six decisions](https://buk.press/blog/book-typography-basics) that hold for any book hold for this one, with the extra rule that the poem, not the page, sets the measure. Set it once, save it, and every collection after this one starts from the same page.

**About this article.** Written by the team that builds bukpress, which turns Markdown into print-ready PDF and EPUB books. Spotted something wrong or out of date? Write to [support@buk.press](mailto:support@buk.press).

## Read next

Explainers 21 August 2026 · 3 min read

## [Why Markdown eats your line breaks, and what to do about it](https://buk.press/blog/markdown-line-breaks)

Because original Markdown treats a single newline as a space and only breaks a paragraph on a blank line, a deliberate choice for wrapped plain-text email in 2004. The workarounds are two trailing spaces, a backslash, an HTML break tag, or a renderer that treats one Enter as a real break.

[Read it](https://buk.press/blog/markdown-line-breaks)

How-to 21 August 2026 · 4 min read

## [How to control page breaks in Markdown](https://buk.press/blog/markdown-page-breaks)

Markdown has no page break because it describes structure, not pages, so every method is really an instruction to whatever renders it. The three that work are a raw HTML div with a CSS page-break rule, a LaTeX \newpage command through Pandoc, or a renderer that assigns a meaning to a plain-text marker.

[Read it](https://buk.press/blog/markdown-page-breaks)

Explainers 28 August 2026 · 4 min read

## [EPUB or PDF: how to choose, and why you probably want both](https://buk.press/blog/epub-vs-pdf)

Use PDF when the page is fixed and matters: print, handouts, workbooks, anything with a layout the reader must see as you set it. Use EPUB when the text should adapt to the reader's screen and type size, which is every e-reader and almost every ebook store.

[Read it](https://buk.press/blog/epub-vs-pdf)

## Write it in Markdown. Ship a book.

bukpress turns the file you are already writing into a typeset PDF and EPUB: your type, your covers, no watermark, ever.

[Get Lifetime, $27 once](https://app.buk.press/signup)
