371 lines
13 KiB
HTML
371 lines
13 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="generator" content="pandoc" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
|
<title>Basic Book Builder</title>
|
|
<style>
|
|
/* Default styles provided by pandoc.
|
|
** See https://pandoc.org/MANUAL.html#variables-for-html for config info.
|
|
*/
|
|
code{white-space: pre-wrap;}
|
|
span.smallcaps{font-variant: small-caps;}
|
|
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
|
div.column{flex: auto; overflow-x: auto;}
|
|
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
|
/* The extra [class] is a hack that increases specificity enough to
|
|
override a similar rule in reveal.js */
|
|
ul.task-list[class]{list-style: none;}
|
|
ul.task-list li input[type="checkbox"] {
|
|
font-size: inherit;
|
|
width: 0.8em;
|
|
margin: 0 0.8em 0.2em -1.6em;
|
|
vertical-align: middle;
|
|
}
|
|
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
|
|
/* CSS for citations */
|
|
div.csl-bib-body { }
|
|
div.csl-entry {
|
|
clear: both;
|
|
}
|
|
.hanging-indent div.csl-entry {
|
|
margin-left:2em;
|
|
text-indent:-2em;
|
|
}
|
|
div.csl-left-margin {
|
|
min-width:2em;
|
|
float:left;
|
|
}
|
|
div.csl-right-inline {
|
|
margin-left:2em;
|
|
padding-left:1em;
|
|
}
|
|
div.csl-indent {
|
|
margin-left: 2em;
|
|
} </style>
|
|
<link rel="stylesheet" href="conf/style.css" />
|
|
</head>
|
|
<body>
|
|
<div class="frontmatter">
|
|
|
|
<!-- Title Page -->
|
|
<h1 class="titlepage" style="margin-top:3em; font-size:2.4em; text-align:center;">Basic Book Builder</h1>
|
|
<h2 style="text-align:center; font-weight:normal;">A Pandoc template for building books and articles</h2>
|
|
|
|
<div style="text-align:center; margin:2em 0;">
|
|
<img src="lib/img/UAF-ACEP.png" alt="Cover illustration" style="max-width:350px;">
|
|
</div>
|
|
|
|
<hr style="margin:3em 0;">
|
|
|
|
|
|
<!-- Metadata Page -->
|
|
<div style="text-align:left; margin-top:5em;">
|
|
|
|
<h2>Basic Book Builder</h2>
|
|
<i>A Pandoc template for building books and articles</i>
|
|
|
|
<table style="margin-top:2em; width:50%; border-collapse:collapse;">
|
|
<tbody>
|
|
<tr><td style="font-weight:bold;">Author</td><td>John Haverlack</td></tr>
|
|
<tr><td style="font-weight:bold;">Version</td><td>1.1.0</td></tr>
|
|
<tr><td style="font-weight:bold;">Date</td><td>2026-02-04</td></tr>
|
|
<tr><td style="font-weight:bold;">ISBN:</td><td>UNSPECIFIED</td></tr>
|
|
<tr><td style="font-weight:bold;">DOI:</td><td>UNSPECIFIED</td></tr>
|
|
<tr><td style="font-weight:bold;">Maturity</td><td>BETA</td></tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p>Copyright © 2026 Alaska Center for Energy and Power</p>
|
|
|
|
<h3>Licensing</h3>
|
|
|
|
<h4>Open Source Edition (PDF and HTML)</h4>
|
|
<p>Licensed under the Creative Commons Attribution-NoDerivatives 4.0 International License
|
|
<ul>
|
|
<li>License: <a href="https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</a></li>
|
|
</ul>
|
|
</p>
|
|
|
|
<!-- <h4>Commercial Edition (ebook and print)</h4>
|
|
<p>All Rights Reserved. No part of the EPUB or printed editions may be reproduced or redistributed without permission.</p> -->
|
|
|
|
</div>
|
|
|
|
<hr style="margin:4em 0;">
|
|
|
|
<!-- Image attribution + perception note (PDF analog) -->
|
|
<!-- <div style="width:100%; text-align:left; display:block; margin:1em 0;">
|
|
<h2>Cover Illustration</Code></h2>
|
|
</div>
|
|
<div style="max-width:40em; margin:auto;">
|
|
Cover illustration by <a href="$img-attribution-url$">$img-attribution$</a>.
|
|
</div> -->
|
|
|
|
</div>
|
|
|
|
<!-- <hr style="margin:4em 0;">
|
|
|
|
<div style="max-width:40em; margin:auto;">
|
|
<div style="width:100%; text-align:center; display:block; margin:1em 0; font-style: italic;">
|
|
This book is dedicated to ****.
|
|
</div>
|
|
</div>
|
|
|
|
<hr style="margin:4em 0;"> -->
|
|
|
|
<script>
|
|
window.MathJax = {
|
|
tex: { inlineMath: [['$', '$'], ['\\(', '\\)']] },
|
|
svg: { fontCache: 'global' }
|
|
};
|
|
</script>
|
|
<script src="lib/mathjax/tex-mml-chtml.js"></script>
|
|
<header id="title-block-header">
|
|
<h1 class="title">Basic Book Builder</h1>
|
|
</header>
|
|
<nav id="TOC" role="doc-toc">
|
|
<h2 id="toc-title">Contents</h2>
|
|
<ul>
|
|
<li><a href="#preface" id="toc-preface">Preface</a></li>
|
|
<li><a href="#introduction" id="toc-introduction">Introduction</a></li>
|
|
<li><a href="#getting-started" id="toc-getting-started">Getting
|
|
Started</a>
|
|
<ul>
|
|
<li><a href="#installing-pre-requisites"
|
|
id="toc-installing-pre-requisites">Installing Pre-Requisites</a>
|
|
<ul>
|
|
<li><a href="#required" id="toc-required">Required</a></li>
|
|
<li><a href="#optional" id="toc-optional">Optional</a></li>
|
|
</ul></li>
|
|
<li><a href="#editing-the-configuration"
|
|
id="toc-editing-the-configuration">Editing the Configuration</a></li>
|
|
</ul></li>
|
|
<li><a href="#editing-the-book" id="toc-editing-the-book">Editing the
|
|
Book</a>
|
|
<ul>
|
|
<li><a href="#configuration"
|
|
id="toc-configuration">Configuration</a></li>
|
|
<li><a href="#frontmatter-config"
|
|
id="toc-frontmatter-config">FrontMatter Config</a></li>
|
|
<li><a href="#editing-the-content" id="toc-editing-the-content">Editing
|
|
the Content</a>
|
|
<ul>
|
|
<li><a href="#citations" id="toc-citations">Citations</a></li>
|
|
</ul></li>
|
|
<li><a href="#usage-building-the-book"
|
|
id="toc-usage-building-the-book">Usage: Building the Book</a></li>
|
|
</ul></li>
|
|
<li><a href="#glossary" id="toc-glossary">Glossary</a></li>
|
|
<li><a href="#bibliography" id="toc-bibliography">Bibliography</a></li>
|
|
</ul>
|
|
</nav>
|
|
<h1 class="unnumbered" id="preface">Preface</h1>
|
|
<p>Preface t the Book…</p>
|
|
<h1 id="introduction">Introduction</h1>
|
|
<p>This is a basic book (or article) builder template based on a Pandoc
|
|
build process in conjunction with a number of other tools to generate
|
|
PDF, ODT, HTML, LaTex, Markdown, and Epub book output formats from
|
|
Markdown source content , which can optionally be edited as an Obsidian
|
|
vault.</p>
|
|
<p>This book builder template has been curated by John Haverlack.<span
|
|
class="citation" data-cites="JohnHaverlackACEP">(<a
|
|
href="#ref-JohnHaverlackACEP" role="doc-biblioref"><em>John
|
|
<span>Haverlack</span> <span>ACEP</span></em>, n.d.</a>)</span></p>
|
|
<h1 id="getting-started">Getting Started</h1>
|
|
<h2 id="installing-pre-requisites">Installing Pre-Requisites</h2>
|
|
<p>For Debian / ZorinOS and likely Ubuntu based systems.</p>
|
|
<div class="callout-caution">
|
|
<p><strong>TODO</strong></p>
|
|
<p> It would be nice to roll a setup script to take care of this.</p>
|
|
</div>
|
|
<h3 id="required">Required</h3>
|
|
<h4 id="pandoc">Pandoc</h4>
|
|
<ul>
|
|
<li>https://pandoc.org/</li>
|
|
<li><a
|
|
href="https://github.com/jgm/pandoc/releases/tag/3.8.2.1">Download</a></li>
|
|
</ul>
|
|
<blockquote>
|
|
<p><code>sudo apt install https://github.com/jgm/pandoc/releases/download/3.8.2.1/pandoc-3.8.2.1-1-amd64.deb</code></p>
|
|
</blockquote>
|
|
<h4 id="code-editor">Code Editor</h4>
|
|
<div class="callout-established">
|
|
<p><strong>Code Editor</strong></p>
|
|
<p> <a href="https://vscodium.com/">VSCodium</a> is recommend for
|
|
privacy (telemetry/tracking) reasons - https://vscodium.com/</p>
|
|
</div>
|
|
<p>But any text editor will work. #### make</p>
|
|
<pre><code>sudo apt install make</code></pre>
|
|
<h4 id="jq-and-yq">jq and yq</h4>
|
|
<pre><code>sudo apt install jq yq</code></pre>
|
|
<h4 id="texlive">texlive</h4>
|
|
<blockquote>
|
|
<p><code>sudo apt install texlive texlive-xetex texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra</code></p>
|
|
</blockquote>
|
|
<h4 id="mathjax">MathJax</h4>
|
|
<ul>
|
|
<li>https://www.mathjax.org/</li>
|
|
</ul>
|
|
<pre><code>wget https://registry.npmjs.org/mathjax/-/mathjax-3.2.2.tgz
|
|
tar xzf mathjax-3.2.2.tgz
|
|
mv package/es5/* lib/mathjax
|
|
rm -rf package mathjax-3.2.2.tgz</code></pre>
|
|
<div class="callout-caution">
|
|
<p><strong>TODO</strong></p>
|
|
<p> This need to be rolled into a setup script.</p>
|
|
</div>
|
|
<h3 id="optional">Optional</h3>
|
|
<p>The following are not strictly requires to use this book builder
|
|
template.</p>
|
|
<h4 id="obsidian">Obsidian</h4>
|
|
<div class="callout-established">
|
|
<p><strong>Highly Recommended</strong></p>
|
|
<p> Editing book chapter content in Obsidian is a very productive means
|
|
for editing Markdown source content.</p>
|
|
</div>
|
|
<ul>
|
|
<li>https://obsidian.md/</li>
|
|
<li><a
|
|
href="https://github.com/obsidianmd/obsidian-releases/releases/download/v1.9.14/obsidian_1.9.14_amd64.deb">Deb
|
|
Package</a></li>
|
|
</ul>
|
|
<pre><code>sudo apt install https://github.com/obsidianmd/obsidian-releases/releases/download/v1.9.14/obsidian_1.9.14_amd64.deb</code></pre>
|
|
<h4 id="zotero">Zotero</h4>
|
|
<div class="callout-established">
|
|
<p><strong>Highly Recommended</strong></p>
|
|
<p> If you need to managed citations and references, Zotero integration
|
|
is highly recommended.</p>
|
|
</div>
|
|
<ul>
|
|
<li>https://www.zotero.org/</li>
|
|
</ul>
|
|
<pre><code>sudo cp ./scripts/deps/zotero.list /etc/apt/sources.list.d/</code></pre>
|
|
<pre><code>sudo apt update</code></pre>
|
|
<pre><code>sudo apt install zotero</code></pre>
|
|
<h5 id="better-bibtex-for-zotero">Better BibTex for Zotero</h5>
|
|
<p>Install the Better BibTex Plugin for Zotero - Zotero > Tool >
|
|
Plugins</p>
|
|
<h5 id="export-citations.bib">Export citations.bib</h5>
|
|
<ul>
|
|
<li>Zotero > File > Export Library > Format: Better BibTeX</li>
|
|
<li><label><input type="checkbox" />Keep Updated</label></li>
|
|
<li><label><input type="checkbox" />Save to:
|
|
~/Documents/Lib/zotero.bib</label></li>
|
|
<li><label><input type="checkbox" />Symlink your
|
|
~/Documents/Lib/Citations.bib to
|
|
basic-book-builder/lib/zotero.bib</label></li>
|
|
</ul>
|
|
<h5 id="zotero-connector-browser-plugin">Zotero Connector Browser
|
|
Plugin</h5>
|
|
<ul>
|
|
<li>https://chromewebstore.google.com/detail/zotero-connector/ekhagklcjbdpajgpjgmbionohlpdbjgc</li>
|
|
</ul>
|
|
<p>Provides you the ability to auto add Web resources to your Zotero
|
|
citation database.</p>
|
|
<h4 id="lmodern">lmodern</h4>
|
|
<pre><code>sudo apt install lmodern</code></pre>
|
|
<h4 id="epubcheck">epubcheck</h4>
|
|
<pre><code>sudo apt install epubcheck</code></pre>
|
|
<h4 id="foliate">foliate</h4>
|
|
<p>An EPub Reader</p>
|
|
<ul>
|
|
<li>https://johnfactotum.github.io/foliate/</li>
|
|
</ul>
|
|
<pre><code>sudo apt install https://github.com/johnfactotum/foliate/releases/download/2.6.4/com.github.johnfactotum.foliate_2.6.4_all.deb</code></pre>
|
|
<h4 id="calibre">calibre</h4>
|
|
<p>An EPub Reader</p>
|
|
<ul>
|
|
<li>https://calibre-ebook.com</li>
|
|
</ul>
|
|
<pre><code>sudo apt install calibre</code></pre>
|
|
<h2 id="editing-the-configuration">Editing the Configuration</h2>
|
|
<h1 id="editing-the-book">Editing the Book</h1>
|
|
<h3 id="configuration">Configuration</h3>
|
|
<p>There are a number of other config files for each format:</p>
|
|
<pre><code>conf/
|
|
├── epub-metadata.xml
|
|
├── epub_template.html
|
|
├── epub.yaml
|
|
├── frontmatter_epub.md
|
|
├── frontmatter_epub.xhtml
|
|
├── frontmatter.html
|
|
├── frontmatter.tex
|
|
├── header.tex
|
|
├── html.yaml
|
|
├── latex.yaml
|
|
├── markdown.yaml
|
|
├── metadata.yaml
|
|
├── pandoc.yaml
|
|
├── pdf.yaml
|
|
├── style.css
|
|
└── style_epub.css
|
|
</code></pre>
|
|
<h4 id="main-config-files">Main Config Files</h4>
|
|
<ul>
|
|
<li>metadata.yaml - Set Title, etc</li>
|
|
<li>pandoc.yaml - Main Pandoc Config #### Per format Configs</li>
|
|
<li><code>pdf.yaml</code></li>
|
|
<li><code>html.yaml</code></li>
|
|
<li><code>latex.yaml</code></li>
|
|
<li><code>epub.yaml</code></li>
|
|
</ul>
|
|
<h3 id="frontmatter-config">FrontMatter Config</h3>
|
|
<p>There are 2 Version of the FrontMatter for PDF, and HTML bases
|
|
formats that set the Title, Author, Verizon, Copyright, etc…</p>
|
|
<ul>
|
|
<li><code>frontmatter.tex</code></li>
|
|
<li><code>frontmatter.html</code></li>
|
|
<li><code>frontmatter_epub.*</code> - Work in Progress</li>
|
|
</ul>
|
|
<blockquote>
|
|
<p>There is probably a better way to do this.</p>
|
|
</blockquote>
|
|
<h2 id="editing-the-content">Editing the Content</h2>
|
|
<p>To edit the book open the <code>basic-book-builder</code> directory
|
|
as an Obsidian Vault.</p>
|
|
<ul>
|
|
<li>Edit the Markdown content in the <code>chapters</code>
|
|
directory.</li>
|
|
</ul>
|
|
<h3 id="citations">Citations</h3>
|
|
<blockquote>
|
|
<p>Note: the Zotero database needs configured to export automatically to
|
|
<code>lib/citations.bib</code></p>
|
|
</blockquote>
|
|
<p>To insert a Zotero Citation - Ensure the Zotero App and DB are
|
|
running on you system. - Alt + I (to insert citation) - Search for and
|
|
select citation reference</p>
|
|
<h2 id="usage-building-the-book">Usage: Building the Book</h2>
|
|
<h4 id="pdf">PDF</h4>
|
|
<pre><code>make pdf</code></pre>
|
|
<h4 id="html">HTML</h4>
|
|
<pre><code>make html</code></pre>
|
|
<h4 id="latex">LaTex</h4>
|
|
<pre><code>make latex</code></pre>
|
|
<h4 id="markdown">Markdown</h4>
|
|
<pre><code>make markdown</code></pre>
|
|
<h4 id="epub">EPub</h4>
|
|
<blockquote>
|
|
<p>Note: This ePub configuration still needs tuning.</p>
|
|
</blockquote>
|
|
<pre><code>make epub</code></pre>
|
|
<p>Appendix A</p>
|
|
<p>First Appendix</p>
|
|
<h1 class="unnumbered" id="glossary">Glossary</h1>
|
|
<ul>
|
|
<li><strong>AI</strong> - Artificial Intelligence</li>
|
|
<li></li>
|
|
</ul>
|
|
<h1 class="unnumbered" id="bibliography">Bibliography</h1>
|
|
<div id="refs" class="references csl-bib-body hanging-indent"
|
|
role="list">
|
|
<div id="ref-JohnHaverlackACEP" class="csl-entry" role="listitem">
|
|
<em>John <span>Haverlack</span> <span>ACEP</span></em>. n.d.
|
|
Https://www.uaf.edu/acep/about/our-team/john-haverlack.php.
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|