Skip to content

Commit

Permalink
Changes needed to support TeXLive 2019.
Browse files Browse the repository at this point in the history
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
  • Loading branch information
daira committed Jul 11, 2019
1 parent 234e0fa commit 4eed11f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 19 deletions.
15 changes: 11 additions & 4 deletions protocol/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Experimental; options are nothing (for traditional LaTeX), -lualatex, or -xelatex.
# The nolatexmk-* targets ignore this setting.
# Experimental; options are pdflatex, lualatex, or xelatex.
# On Debian, LuaLaTeX needs the texlive-luatex package, and XeLaTeX needs the texlive-xetex package.
# Make sure to read <https://github.com/zcash/zips/issues/249>.
ENGINE=

LATEXMK=latexmk $(ENGINE) --halt-on-error -bibtex -pdf -logfilewarnings-
LATEX=pdflatex --halt-on-error
LATEXMKOPT_pdflatex=
LATEXMKOPT_xelatex=-pdflatex=xelatex -dvi- -ps-
LATEXMKOPT_lualatex=-pdflatex=lualatex -dvi- -ps-

LATEXMK=latexmk $(LATEXMKOPT_$(ENGINE)) --halt-on-error -bibtex -pdf -logfilewarnings-
LATEX=$(ENGINE) --halt-on-error

# extractpdfmark is needed to produce optimized PDFs that preserve "named destinations"
# (needed for external links into the file to work correctly).
Expand Down Expand Up @@ -107,6 +110,7 @@ nolatexmk-sapling:
$(LATEX) -jobname=sapling protocol.tex || { touch incremental_merkle.png; exit 1; }
sh mymakeindex.sh -o sapling.ind sapling.idx
$(LATEX) -jobname=sapling protocol.tex || { touch incremental_merkle.png; exit 1; }
cp -f sapling.pdf protocol.pdf

.PHONY: nolatexmk-blossom
nolatexmk-blossom:
Expand Down Expand Up @@ -164,3 +168,6 @@ optblossom:

.PHONY: optimized
optimized: optsapling optsprout optblossom

.PHONY: all
all: sapling sprout blossom
21 changes: 11 additions & 10 deletions protocol/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ Build dependencies on Debian-based systems include, at least:
apt-get install texlive texlive-science texlive-fonts-extra \
texlive-generic-recommended texlive-bibtex-extra biber latexmk perl
To use the targets described under "Optimizing PDF size", you will also
need the `ghostscript`, `extractpdfmark`, and `awk` packages.

Building
--------
Expand All @@ -25,10 +22,11 @@ Use:
* ``make sprout`` to make a version of the specification that does not
include Overwinter or Sapling.

By default these use ``latexmk``, which does not work on all systems.
Use ``make nolatexmk-sapling`` or ``make nolatexmk-sprout`` if you run into
problems with ``latexmk``, but that is not the preferred way of building
because it may not run ``pdflatex`` enough times.
``make all`` is equivalent to ``make sapling blossom sprout``.

By default these use ``latexmk``. If you have trouble getting ``latexmk`` to
work, you can instead use ``make nolatexmk-sapling``, etc. 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
Expand All @@ -39,10 +37,13 @@ Manual intervention is still needed when there are LaTeX errors.
Optimizing PDF size
-------------------

Optionally, you can use Ghostscript to optimize the size of the resulting
PDF files.
Optionally, you can use Ghostscript to attempt to optimize the size of the
resulting PDF files. Note that this is not recommended with recent versions
of TeXLive that produce smaller PDFs in any case, since then it may increase
the size. (Debian Buster includes TeXLive 2019.)

Use:
For this option you will need to ensure the `ghostscript`, `extractpdfmark`,
and `awk` packages are installed. Then use:

* ``make optsapling`` to make an optimized version of ``protocol.pdf``;
* ``make optblossom`` to make an optimized version of ``blossom.pdf``;
Expand Down
26 changes: 21 additions & 5 deletions protocol/protocol.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@
if fontdata.characters and fontdata.characters[120] then
parameters.x_height = fontdata.characters[120].height
else
parameters.x_height = (parameters.ascender or 0)*0.4
parameters.x_height = (parameters.ascender or 0)*0.5
end
end, "Fix x-height")
}
\fi

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{bytefield}
Expand Down Expand Up @@ -72,13 +71,21 @@
\usepackage{tocloft}
\usepackage{pict2e}

\usepackage[style=alphabetic,maxbibnames=99,dateabbrev=false,urldate=edtf,seconds=true,
backref=true,backrefstyle=none,backend=biber]{biblatex}
\addbibresource{zcash.bib}
\usepackage{silence}
\WarningFilter{latex}{Reference}
\WarningFilter{latex}{Citation}
\WarningFilter{latex}{Hyper reference}
\WarningFilter{microtype}{Unknown slot number of character}

\usepackage{microtype}

% Target biblatex >= v3.5. <https://tex.stackexchange.com/a/231215/78411>
\WarningFilter{biblatex}{'edtf'}
\WarningFilter{biblatex}{'\mkdaterangeedtf'}

\usepackage[style=alphabetic,maxbibnames=99,dateabbrev=false,urldate=edtf,seconds=true,
backref=true,backrefstyle=none,backend=biber]{biblatex}
\addbibresource{zcash.bib}

% Fonts
\usepackage{lmodern}
Expand Down Expand Up @@ -372,6 +379,8 @@
\newif\iftx@libertine
\newif\iftx@minion
\newif\iftx@coch
\newif\iftx@ch
\newif\iftx@stxtwo
\makeatother

\DeclareSymbolFont{lettersA}{U}{ntxmia}{m}{it}
Expand Down Expand Up @@ -10120,6 +10129,13 @@ \section{Acknowledgements} \label{acknowledgements}
\section{Change History} \label{changehistory}


\subparagraph{2019.0.4}

\begin{itemize}
\item Changes needed to support TeXLive 2019.
\end{itemize}

\introlist
\subparagraph{2019.0.3}
2019-07-08

Expand Down

0 comments on commit 4eed11f

Please sign in to comment.