LOADING FIELD GUIDES ▮
NICHE OF ONE v1.2 FREE, NO SIGNUP
← The Feed

How to Publish a Book Straight From a Text File

A book is just words in order. Everything else, the fonts, the page numbers, the little drop cap on chapter one, is decoration you can bolt on at the end. The mistake most writers make is reaching for the decoration first. They open Word, or worse, some bloated cloud suite, and start fighting margins before they've written a sentence worth keeping.

I write everything in plain text. The book you're trying to publish can be one file. From that one file I can spit out an EPUB for the Kindle crowd, a PDF for the people who want to print it, and a clean interior for a paperback, all from the same words, no retyping, no "save as," no praying the formatting survives. One file in, finished book out. That's the whole trick and I'm going to hand it to you.

Why plain text outlives everything

Open a Word document from 2004 and watch it complain. Open a Pages file on a machine that doesn't have Pages and watch it die. Proprietary formats are a lease. The company owns the lock and you're renting the key, and the day they change the lock, new version, dropped support, a subscription you stopped paying, your words are trapped inside a coffin you can't open.

A .txt file from 1989 still opens today. It'll open in fifty years. It opens on anything with a screen, with no software you have to buy, because plain text is the closest thing computing has to bedrock. There's no format to rot. The words are just the words.

So write in it. Not because it's hip, but because it's the one container nobody can take from you. This is the same reason I own my stack instead of renting it, the thing that holds your work shouldn't answer to a company that can change the deal on a Tuesday.

Markdown is plain text that knows it's a book

Pure .txt has one weakness: it can't tell a heading from a paragraph. You need a little structure, chapter titles, bold, a blockquote, a link, without dragging in a whole word processor to get it.

That's Markdown. It's plain text with a handful of marks that mean something:

  • # Chapter One is a heading.
  • **this** is bold, *this* is italic.
  • A blank line starts a new paragraph.
  • > a line like this is a pull quote.
  • - item makes a list.

That's most of it. You can learn the whole thing in ten minutes and you'll never touch a formatting toolbar again. The file stays plain text, opens anywhere, survives anything, but now it carries enough structure that a machine can turn it into a real book. You write the words; the marks tell the next tool where the chapters break.

Write the whole manuscript as one .md file, or one file per chapter if the book is long. Headings mark your chapters. That's your entire layout step done while you draft.

The one tool that does the conversion: Pandoc

Here's the engine. Pandoc is a free command-line program that eats one format and spits out another. Markdown goes in. EPUB, PDF, Word, HTML, whatever you need, comes out. It's the universal translator for documents and it's the only piece of "publishing software" a solo writer actually needs.

You install it once. Then turning your manuscript into an ebook is one line in a terminal:

pandoc book.md -o book.epub --toc

That reads book.md, builds a table of contents from your chapter headings, and writes book.epub, a finished, valid ebook you can upload anywhere. Want a Word file because a service demands one? Change epub to docx. Want a webpage? html. Same source file, different door out.

For a cover and metadata, your name, the title, the description that shows in the store, you add a few lines at the top of the file or feed Pandoc a small metadata file. It's a couple minutes of setup you do once and reuse on every book after.

Getting a real PDF for print

The PDF is where people get scared off, because a good print PDF needs a typesetting engine underneath. Pandoc uses one called LaTeX, and yes, that's a heavier install. But once it's there, the command is just as short:

pandoc book.md -o book.pdf --pdf-engine=xelatex

Out comes a typeset PDF with real page breaks, proper margins, page numbers, the works. If you want control over trim size and margins for a paperback, say a 5x8 interior, you pass those as options or drop them in the file's metadata block. Set it once, reuse it forever.

If LaTeX feels like too much machinery for your first book, there's a lazy path that still works: convert to EPUB, open it in a free reader like Calibre, and export a PDF from there. Cruder, but it ships. The point is to finish, not to win a typography award on attempt one. You can keep your whole publishing setup cheap and small and still produce a book that looks bought.

From file to print to sale

You've got two files now, an EPUB and a PDF, from one manuscript. Here's where they go.

Sell the digital versions yourself. Upload the EPUB or the PDF to your own storefront, set a price, keep the money. No retail middleman skimming a third, no platform that can yank your catalog because an algorithm had a bad day. A short, useful book at nine to fifteen dollars, sold direct, is a real product the day you finish it.

Want a physical paperback? Take that print PDF to a print-on-demand service. They hold no inventory, someone orders, the machine prints one copy, it ships, you get the cut. You upload the same interior PDF you already made and a cover, and you've got a book a stranger can hold in their hands without you fronting a dime for a print run.

Either way, the work is done the moment the file exists. The store and the printer are just spigots. You turn them on when you're ready.

The whole pipeline, one breath

Strip away the fear and it's five moves:

  1. Write the book as a plain Markdown file. Headings are chapters.
  2. Run Pandoc to make an EPUB.
  3. Run Pandoc again to make a print PDF.
  4. Sell the digital files from a storefront you own.
  5. Send the PDF to print-on-demand if you want it on paper.

No Word. No "manuscript formatting service." No proprietary coffin holding your words hostage. One file you'll still be able to open when the company that made your favorite app is long dead.

I built my whole operation on this idea, that the thing holding your work should be something you can copy to a thumb drive and carry out the door. The press, the home base, the catalog, all of it sits on files I control. A book is just words in order. Get the words right, keep them in a format nobody can lock, and the publishing part is a single command.

Write the file. Run the command. Sell the book.