| Author | John Haverlack |
| Version | 1.2.3 |
| Date | 2026-02-05 |
| Affiliation | Alaska Center for Energy and Power |
| Institution | University of Alaska Fairbanks |
| ISBN: | UNSPECIFIED |
| DOI: | UNSPECIFIED |
| Maturity | BETA |
Copyright © 2026 Alaska Center for Energy and Power
Licensed under the Creative Commons Attribution-NoDerivatives 4.0 International License
This is a basic book builder template is based on a Pandoc(Pandoc - Index, n.d.) + Makefile build process in conjunction Obsidian to edit content and Zotero to manage citation, to generate multiple format of the document including:
metadata.yaml with title, copyright, author,
etc.input-files: in pandoc.yamlchapters Markdown “conent” files using
ObidianThis basic book builder(Jehaverlack/Basic-Book-Builder, n.d.) template has been curated by John Haverlack.(John Haverlack ACEP, n.d.)
Clone the repository
git clone https://github.com/jehaverlack/basic-book-builder.git
Navigate to the repo directory
cd basic-book-builder
~Debian Linux
This script only support Debian based Linux system (e.g Debian, Ubuntu, Zorin). And this script will install several ATP packages on your system.
Warning
This script has not been widely tested across many platforms
To initialize your systems build environment run:
Setup Build Environment
./scripts/setup-linux-deb.sh
For more information on setting up the build environment for your system see: TBD: NEEDS DOCUMENTED.
Once you have set up your build environment, you test by building the basic book builder.
Testing Build Environment
make all
Tip
You do not want to edit your new project document in the
basic-book-builder directory. You will want to create a
new project for your document based on this
template.
Create a new project
./scripts/new-project.sh <NEW_PROJECT_DIR>
cd <NEW_PROJECT_DIR>
Update your project configuration:
metadata.yaml, for title, author, etctemplates/pandoc.yaml<NEW_PROJECT_DIR> with Obsidian, and edit
chapters documents.make pdfWarning
<NEW_PROJECT_DIR> should be outside of the
basic-book-builder directory
make pdf
NOTE: Building the PDF also builds the LaTeX version of the book.
make html
make docx
NOTE: DocX is a work in progress. Frontmatter and formatting need work.
make odt
NOTE: ODT is a work in progress. Frontmatter and formatting need work.
To build all supported formats
make all
The basic book builder template integrates feature from many systems including Pandoc, MathJax, Obsidian, and Zotero. The following list covers these features from a functional point of view.
Metadata for the project is managed in metadata.yaml.
Edit this file to make global changes to variables for
your document. Definitions in metadata.yaml will propagate
to all format builds.
Front-Matter documents control the Title Page, Metadata and other pages before the Title of Contents. Front matter content is manged in these files:
templates/frontmatter.textemplates/frontmatter.htmltemplates/frontmatter-md.htmlUnfortunately when you edit one, you need to edit the respective changes to the other front-matter formats. ### Title Page
Edit the Front-matter files to modify the formatting of the Title Page. You’ll need to modify the HTML / LaTex code.
Edit the Front-matter files to modify the 2nd page Metadata format and fields to display.
Edit the Front-matter files to optionally un-comment the Cover Art Acknowledgement.
Edit the Front-matter files to modify un-comment the Book Dedication.
The table of contents is auto generated. But can be disabled in
template\pandoc.yaml by setting: -
toc: false
Chapter Markdown source files are located in the
chapters directory. To edit which chapter files are
included the document:
input-file: section of the
template\pandoc.yamlTBD
TBD
TBD
TBD
TBD
TBD
TBD
You can use basic Markdown Images

You can embed LaTeX equations directly in your Markdown pages.
To left justify LaTex surround the code inside single
$:
Left Justified Equation
$x = \frac{1}{2}$
$x = \frac{1}{2}$
Inline
Or inline, $x = \frac{1}{2}$, in a sentence.
Or inline, $x = \frac{1}{2}$, in a sentence.
To center justify LaTex surround the code inside double
$$:
Centered Equation
$$x = \frac{1}{2}$$
$$x = \frac{1}{2}$$
A few call-out box styles have been custom added to easily highlight certain types of content.
Markdown Example
[!established] Green Call-out Title
A green box
Will render:
Green Call-out Title
A green box
Markdown Example
[!proposed] Blue Call-out Title
A blue box
Will render:
Blue Call-out Title
A blue box
Markdown Example
[!speculative] Purple Call-out Title
A purple box
Will render:
Purple Call-out Title
A purple box
Markdown Example
[!caution] Caution Note
Beware of this section. AKA a orange box.
Will render:
Caution Note
Beware of this section. AKA a orange box.
Markdown Example
[!warning] Warning Note
Same as the Caution Box
Will render:
Warning Note
Same as the Caution Box
Markdown Example
[!danger] Alert
A slightly stronger warning. AKA a red box.
Will render:
Alert
A slightly stronger warning. AKA a red box.
Markdown Example
[!code] Code Block
'''
if [ true ]; do
echo "The Cow Jumps over the Moon"
fi
'''
Will render:
Code Block
if [ true ]; do
echo "The Cow Jumps over the Moon"
fi
Markdown Example
[!cli] Command line
A command line example
'''
$ ls
build chapters conf filters lib LICENSE.md Makefile
metadata.yaml >README.md scripts templates
'''
Will render:
Command line
A command line example
$ ls
build chapters conf filters lib LICENSE.md Makefile
metadata.yaml README.md scripts templates
It is possible to change fonts by editing
templates/pandoc.yaml, and
templates\styles.css, but you will have to make sure you
have the proper font’s installed on your system first.
Custom filters can be created. This is complicated and typically needs done in 3 places for:
The basic-book-builder directory tree.
basic-book-builder
├── build
│ ├── docx
│ ├── html
│ │ ├── conf
│ │ └── lib
│ │ ├── diag
│ │ ├── img
│ │ └── mathjax
│ ├── latex
│ ├── odt
│ └── pdf
├── chapters
├── conf
├── filters
├── lib
│ ├── citations
│ ├── diag
│ ├── img
│ └── mathjax
├── scripts
│ └── tmp
└── templates
The basic-book-builder configuration files, scripts, and build files.
../basic-book-builder
├── chapters
├── conf
├── filters
│ ├── callouts-html.lua
│ └── callouts.lua
├── lib
│ ├── diag
│ ├── img
│ └── zotero.bib
├── Makefile
├── metadata.yaml
├── scripts
│ ├── new-project.sh
│ ├── replace-metadata.sh
│ ├── setup-linux-deb.sh
│ └── tmp
└── templates
├── docx.yaml
├── epub_template.html
├── epub.yaml
├── frontmatter-docx.md
├── frontmatter.html
├── frontmatter-md.html
├── frontmatter.tex
├── header.tex
├── html.yaml
├── latex.yaml
├── markdown.yaml
├── odt.yaml
├── pandoc.yaml
├── pdf.yaml
├── style.css
└── style_epub.css
About conf
NEVER: edit file directly in conf. They will be
overwritten by the build process. ### Metadata
Update the metadata.yaml file to globally configure your
document title and other metadata. Edit this file to control your
document title, author, etc.
Update the input-files: section of
templates/pandoc.yaml to control what chapter source files
are in which order in your document.
# pandoc.yaml
input-files:
# - chapters/Preface.md
- chapters/00_Introduction.md
- chapters/01_Getting_Started.md
- chapters/02_Usage.md
- chapters/03_Features.md
- chapters/Appendix.md
- chapters/AppendixA.md
# - chapters/AppendixB.md
- chapters/Glossary.md
- chapters/Index.md
- chapters/Bibliography.md
For a PDF Build:
make pdf
will build dependencies on these file:
NOTE: the Makefile will copy
templates/*.yaml to conf/*.yaml.
Never edit conf/*directly.
| 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. |
| 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. |