Basic Book Builder

A Pandoc template for building books, documents and articles

Cover illustration

Basic Book Builder

A Pandoc template for building books, documents and articles
AuthorJohn Haverlack
Version1.1.0
Date2026-02-04
AffiliationAlaska Center for Energy and Power
InstitutionUniversity of Alaska Fairbanks
ISBN:UNSPECIFIED
DOI:UNSPECIFIED
MaturityBETA

Copyright © 2026 Alaska Center for Energy and Power

Licensing

Open Source Edition (PDF and HTML)

Licensed under the Creative Commons Attribution-NoDerivatives 4.0 International License


Basic Book Builder

Introduction

This is a basic book (or article / document) builder template based on a Pandoc(Pandoc - Index, n.d.) build process in conjunction with a number of other tools to generate PDF, HTML, LaTex, Markdown, ODT, DOCX, and Epub book output formats from a single set Markdown source content , which can optionally be edited as an Obsidian vault.

This basic book builder(Jehaverlack/Basic-Book-Builder, n.d.) template has been curated by John Haverlack.(John Haverlack ACEP, n.d.)

Getting Started

Cloning the Basic Book Builder

Cloning the repository

git clone https://github.com/jehaverlack/basic-book-builder.git

Navigate to the repo directory

cd basic-book-builder

Setting Up Build Environment

Debian Based Linux

This script only support Debian based linux system (Debian, Ubunutu, Zorin, etc) This script has not been widely tested across platforms

Setup Build Environment

./scripts/setup-linux-deb.sh

For more information on setting up the build environment for your system see Appendix A.

Glossary

Term Description
AST (Abstract Syntax Tree) Pandoc’s internal structured representation of a document. Lua filters operate on the AST before rendering to a target format.
Bibliography A .bib file (e.g., Zotero export) used by Pandoc with citeproc to generate formatted citations and reference lists.
Callout A styled block (e.g., [!warning]) transformed by Lua filters into format-specific output such as LaTeX environments or HTML <div> elements.
Defaults File (YAML) A Pandoc configuration file defining output format, filters, metadata, and rendering options (e.g., pdf.yaml, html.yaml).
DOCX Microsoft Word document format generated by Pandoc; styling is controlled via a reference.docx file.
Filter (Lua) A script that modifies Pandoc’s AST before rendering. Used in this workflow for callouts and other structural transformations.
Frontmatter Format-specific content inserted before the main body (e.g., frontmatter.tex, frontmatter.html, frontmatter-docx.md).
HTML Web output format generated by Pandoc, typically styled via CSS and supporting interactive features.
LaTeX Typesetting system used for high-quality PDF generation via XeLaTeX in this workflow.
Lua Filter A lightweight scripting extension used by Pandoc to customize document transformations programmatically.
Makefile Automation script orchestrating the build pipeline for PDF, HTML, DOCX, ODT, and Markdown outputs.
Markdown Plain-text markup language serving as the source format for all outputs in the workflow.
Metadata Key–value pairs (e.g., metadata.yaml) defining title, author, license, version, and other document variables.
ODT OpenDocument Text format used by LibreOffice; similar to DOCX but open-standard.
Pandoc Universal document converter used to transform Markdown into PDF, HTML, DOCX, ODT, EPUB, and more.
PDF Portable Document Format output produced via Pandoc + XeLaTeX.
Reference Document A DOCX or ODT file defining styles (fonts, headings, spacing) used when generating Word/LibreOffice outputs.
Resource Path Directories Pandoc searches for images, diagrams, and other assets during rendering.
Template A format-specific layout file (e.g., LaTeX template) used to control document structure beyond styling.
TOC (Table of Contents) Automatically generated navigation structure controlled by toc and toc-depth options.
XeLaTeX LaTeX engine used to generate PDFs with modern font support (via fontspec).
Zotero Reference manager used to generate .bib files for citation processing with Pandoc.

Bibliography

Jehaverlack/Basic-Book-Builder: A Pandoc Workflow for Building PDF, HTML, EPUB, and LaTeX Book Format. n.d. Https://github.com/jehaverlack/basic-book-builder.
John Haverlack ACEP. n.d. Https://www.uaf.edu/acep/about/our-team/john-haverlack.php.
Pandoc - Index. n.d. Https://pandoc.org/.