mirror of https://github.com/zcash/zips.git
Signed-off-by: Daira Hopwood <daira@jacaranda.org> |
||
---|---|---|
.. | ||
Makefile | ||
README.rst | ||
incremental_merkle.odg | ||
incremental_merkle.pdf | ||
incremental_merkle.png | ||
incremental_merkle.svg | ||
key_components.odg | ||
key_components.pdf | ||
key_components.png | ||
key_components.svg | ||
key_components_sapling.png | ||
key_components_sapling.svg | ||
protocol.pdf | ||
protocol.tex | ||
protocol.ver | ||
sapling.pdf | ||
zcash.bib |
README.rst
============================== Zcash Protocol Specification ============================== Build dependencies on Debian-based systems include, at least: .. code:: apt-get install texlive texlive-science texlive-fonts-extra \ texlive-generic-recommended texlive-bibtex-extra biber latexmk Building -------- Use: * ``make pdf`` to make the current protocol specification (``protocol.pdf``); * ``make sapling`` to make the draft specification for the Overwinter and Sapling upgrades (``sapling.pdf``). By default these use ``latexmk``, which does not work on all systems. Use ``make nolatexmk-pdf`` or ``make nolatexmk-sapling`` if you run into problems with ``latexmk``, but that is not the preferred way of building because it may not run ``pdflatex`` enough times. There is also support for using the incremental (``-pvc``) mode of ``latexmk`` to automatically rebuild when changes in the source files are detected: ``make pvcpdf`` or ``make pvcsapling``. Manual intervention is still needed when there are LaTeX errors. Optimizing PDF size ------------------- Optionally, you can use `Péter Szabó <https://github.com/pts>`_'s ``pdfsizeopt`` program to optimize the size of the resulting PDF files. Use: * ``make optpdf`` to make an optimized version of ``protocol.pdf``; * ``make optsapling`` to make an optimized version of ``sapling.pdf``; * ``make optimized`` to make both. This will probably only work on Linux. The first time one of these targets is run, it will automatically clone and build the necessary dependencies (pinned by ``git`` hash) from GitHub. This gives a size saving of about 50% for ``protocol.pdf``, and 40% for ``sapling.pdf``. Converting to HTML ------------------ To convert to HTML you will first need to install ``pdf2htmlEX``. On Debian: .. code:: apt-get install pdf2htmlex Then use ``make html`` (or ``make optimized html``) to convert both PDFs. The results are placed in the ``html`` directory at ``html/protocol.html`` and ``html/sapling.html``. See `<https://github.com/zcash/zips/issues/127>`_ for limitations of this conversion.