Quick formatting for writers. Start with a plain text, markdown-formatted file: a poem or a short story, and use pandoc to quickly create a PDF or Word doc, using Standard Manuscript Format.
Some setup is required, but you'll save time spent on formatting documents, so you can focus on writing, editing, or reading instead.
format different types of writing...
- poem
- story
- novel
- poetry collection (WIP)
- stories collection (TODO)
... into standard manuscript format, in a variety of file-types:
- Word
- epub
- mobi / kindle
You'll want to be familiar with a few key concepts, to begin.
-
Markdown, an easy-to-read and easy-to-write syntax for writing in plain text format that's non-proprietary, cross-platform, and archival, to help with re-use. collaboration, version control, and more...
-
Standard Manuscript Format is a formatting style for manuscripts of short stories, novels, poems and other literary works submitted by authors to publishers.
-
Pandoc is tool to efficiently convert what you've written, from one file format to another. (e.g.
.docx
,.rtf
,.tex
,.html
,.pdf
)
You'll need to install some prerequisites before this kit will be useful.
- Courier Prime a better, free Courier font. (the 2015 version is available as .otf)
- Pandoc for document conversion
- lualatex for typesetting. (docs)
- Download or
git clone
the files in this repository - Save (or symlink) them into your pandoc data directory. (create it if it doesn't exist already)
- Windows:
%APPDATA%\pandoc
- Mac/Unix:
$HOME/.local/share/pandoc
.
- Windows:
You can find the default user data directory on your system by looking at the output of
pandoc --version
.
Data files placed in this directory (for example,
reference.odt
,reference.docx
,epub.css
,templates/
) will override pandoc's normal defaults. (Note that the user data directory is not created by pandoc, so you will need to create it yourself if you want to make use of it.)
This kit helps you transform your plain-text (Markdown) writing—such as poems, stories, or novels—into Standard Manuscript Format for a variety of output file types. Below are examples for PDF and Word. You can adapt these commands for other formats (ePub, MOBI, etc.) by changing the relevant pandoc parameters.
pandoc story.md --pdf-engine=xelatex --template=story.latex --from=markdown_github+yaml_metadata_block --output=story.pdf
pandoc --pdf-engine=lualatex --template=poem.latex --metadata-file=author.yml --lua-filter=linecount.lua --from=gfm+hard_line_breaks "poem.md" --output=output.pdf
...or, a shorter command thanks to the defaults/poem.yml
file
pandoc --defaults=poem.yml "poem.md" -o output.pdf
Breakdown of Flags:
story.md
orpoem.md
: The input Markdown file--pdf-engine=lualatex
: Specifies the LaTeX engine--template=story.latex
: Points to your LaTeX template, which implements the Standard Manuscript Format.--from=markdown_github+yaml_metadata_block
: Tells Pandoc to expect GitHub-flavored Markdown with YAML metadata blocks.--output=story.pdf
: Specifies the output file name and format (PDF).
The directory contains a script to generate a PDF chapbook from multiple markdown files using Pandoc.
Directory Structure:
writing/
├─ chapbooks/
│ ├─ build.py
│ ├─ chapbook1.md
│ ├─ chapbook2.md
│ └─ README.md
├─ poems/
│ ├─ poem2.md
│ ├─ poem1.md
- Ensure you have
Pandoc
andPython
installed on your system. - Create a markdown file for the chapbook, in the
chapbooks\
directory - In the markdown file, include a list of poems, from the
poems\
directory:
title: "Example Chapbook 2"
author: "Firstname Lastname"
date: 2025-03-08
contents:
- "../../poems/poem1.md" # accept a relative path
- "S:\Directory\poems\poem2.md" # or accept an absolute path
-
Run the
build.py
script with the name of the main markdown file as an argument. For example:python build.py chapbook1.md
-
The script will generate a PDF based on the contents specified in the main markdown file.
pandoc story.md --reference-doc=story-reference.docx --from=markdown_github+yaml_metadata_block --output=manuscript.docx
Pandoc supports a variety of other formats, including .epub, .mobi, and .html. Just adjust the --to or --output flags.
Use YAML Metadata Include a YAML header in your Markdown (e.g., title, author) so Pandoc can automatically fill those fields in the final document.
Place Templates in Pandoc's Data Directory If you put your LaTeX templates and Word references in Pandoc's data directory, you won't need to specify full paths each time.
Tweak As Needed Modify .latex templates or .docx references to fine-tune margins, headers, spacing, or any other manuscript elements.
With PanScribe, you can focus on crafting your writing rather than fiddling with formatting. Happy writing!
- Pandoc Templates Documentation
- Official Pandoc Templates
- LaTeX Resources:
- Pandoc Resources:
- Background:
- A Word about Word
- Plain Text, Papers, Pandoc
- Pandoc Novel: Markdown text to a novel in ePub and PDF.
- Sustainable Authorship in Plain Text using Pandoc and Markdown
- Academic Pandoc: Framework for Academic Writing with Pandoc + Markdown
- Git-Pandoc Academic Workflow
- Writing Academic Papers in Markdown
- Academic Pandoc Template: Write beautifully typeset academic texts with distraction-free Markdown and Pandoc.
- Pandoc Scholar: Create beautiful and semantically meaningful articles with pandoc.
- Academic Article TEmplate: Templates for pandoc converting an academic article written in markdown to pdf
- Using Pandoc to publish a book
- Related Projects:
- Palabra is a collection of command-line scripts for writers who want to escape from Microsoft Word format.
- Bestrew is a simple database for writers to track their submissions for pulication.
- MyVale is my collection of style-guide rules to use with Vale, a grammar and style checker. One of those rulesets is called HedgeClipper. It helps to identify and remove overly hesitant, weaker writing.
- Textplay is a simple command-line script that converts screenplays written in Fountain formatted plain-text to HTML, XML, and FDX (Final Draft).
- ProseGrinder Templates - an opinionated set of Pandoc templates and scripts for converting markdown short stories to DOCX manuscripts that adhere to William Shunn's Proper Manuscript Format guidelines using Pandoc.