Skip to content

Sjors/nado-book

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

702 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NADO book

Build

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 texhash

If 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 --self

To build the paperback version:

./make_book.sh --paperback

This produces:

  • nado-paperback.pdf: A5 interior (148 x 210 mm)
  • nado-paperback-bleed.pdf: 3 mm bleed on all sides (154 x 216 mm) with an explicit A5 TrimBox

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 --epub

To build a PDF that roughly fits a Kindle:

./make_book.sh --pdfkindle

To build a PDF that roughly fits an iPad:

./make_book.sh --pdfbig

Note 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.jpg

Preview

Use Apple Books, Kindle Previewer, etc to view the epub.

Contribute

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

About

Bitcoin: A Work in Progress (book source code)

Resources

License

Stars

Watchers

Forks

Contributors