Install Pandoc version 3 to generate an epub file. For PDF a LaTeX engine is required, see Pandoc documentation.
The following Pandoc filters are used:
In addition you need Graphviz, ImageMagick, Ghostscript, and Poppler.
The paperback build also expects the following LaTeX packages to be available:
pstricks, pst-barcode, pst-tools, marginnote, wrapfig, mwe, and footmisc.
On macOS, the following worked:
brew install imagemagick ghostscript poppler
brew install --cask basictex
pip3 install --user pandoc-secnos pikepdf
eval "$(/usr/libexec/path_helper)"
sudo tlmgr install pstricks pst-barcode pst-tools marginnote wrapfig mwe footmisc
sudo texhashIf tlmgr install fails with a checksum mismatch from a bad mirror, reset it to the CTAN redirector and retry:
sudo tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet
sudo tlmgr update --selfTo build the paperback version:
./make_book.sh --paperbackThis produces:
nado-paperback.pdf: A5 interior (148 x 210 mm)nado-paperback-bleed.pdf:3 mmbleed on all sides (154 x 216 mm) with an explicit A5TrimBox
The paperback build verifies both output sizes with pdfinfo.
To build an ePub version (Latex math is rendered via Codecogs - check section 11 of the whitepaper to ensure you didn't get rate limited):
./make_book.sh --epubTo build a PDF that roughly fits a Kindle:
./make_book.sh --pdfkindleTo build a PDF that roughly fits an iPad:
./make_book.sh --pdfbigNote that make_book.sh builds the book interior. The cover PDF is still a separate manual export flow from the source files in meta/.
To generate the jpeg cover images, export to PDF but set to PDF 1.6 and change Output Intended For to Screen / Web. Then do:
cd meta
convert -density 180 -define pdf:use-trimbox=true nado-cover-rgb.pdf -crop 52.25x100% +repage \( -clone 0 -crop 92x100% +repage -reverse \) -delete 0 -reverse slice.jpg
mv slice-2.jpg ../docs/front.jpg
mv slice-0.jpg ../docs/back.jpg
mv slice-1.jpg spine.jpgUse Apple Books, Kindle Previewer, etc to view the epub.
See STYLE.md for the markdown style used, e.g. how to add links and footnotes.
To preview documentation:
bundle exec jekyll server --incremental --source docs