mirror of https://github.com/zcash/zips.git
Protocol spec: remove "optimized" Makefile targets (which actually produced a larger PDF, with TeXLive 2019).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
cad4baf2e1
commit
7985249119
|
@ -10,16 +10,6 @@ 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).
|
||||
# <https://github.com/trueroad/extractpdfmark>
|
||||
EXTRACTPDFMARK=extractpdfmark
|
||||
|
||||
# Options are documented at <http://web.mit.edu/ghostscript/www/Ps2pdf.htm>
|
||||
OPTIMIZER=gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dBATCH \
|
||||
-r450 -dDownsampleColorImages=false -dDownsampleGrayImages=false -dDownsampleMonoImages=false -dFastWebView=true \
|
||||
-dSubsetFonts=true -dCompressPages=true
|
||||
|
||||
sprout.pdf: protocol.tex zcash.bib incremental_merkle.png key_components.png
|
||||
$(MAKE) sprout
|
||||
|
||||
|
@ -144,30 +134,5 @@ clean:
|
|||
blossom.aux blossom.out blossom.log blossom.bcf blossom.run.xml blossom.fls blossom.fdb_latexmk \
|
||||
blossom.idx blossom.ilg blossom.ind blossom.ind.original
|
||||
|
||||
.PHONY: optsprout
|
||||
optsprout:
|
||||
$(MAKE) auxsprout
|
||||
$(EXTRACTPDFMARK) aux/sprout.pdf >aux/sprout-pdfmark.ps
|
||||
$(OPTIMIZER) -sOutputFile=sprout.pdf aux/sprout.pdf aux/sprout-pdfmark.ps 2>/dev/null |awk '{printf "."}'
|
||||
ls -l aux/sprout.pdf sprout.pdf
|
||||
|
||||
.PHONY: optsapling
|
||||
optsapling:
|
||||
$(MAKE) auxsapling
|
||||
$(EXTRACTPDFMARK) aux/sapling.pdf >aux/sapling-pdfmark.ps
|
||||
$(OPTIMIZER) -sOutputFile=sapling.pdf aux/sapling.pdf aux/sapling-pdfmark.ps 2>/dev/null |awk '{printf "."}'
|
||||
ls -l aux/sapling.pdf sapling.pdf
|
||||
cp -f sapling.pdf protocol.pdf
|
||||
|
||||
.PHONY: optblossom
|
||||
optblossom:
|
||||
$(MAKE) auxblossom
|
||||
$(EXTRACTPDFMARK) aux/blossom.pdf >aux/blossom-pdfmark.ps
|
||||
$(OPTIMIZER) -sOutputFile=blossom.pdf aux/blossom.pdf aux/blossom-pdfmark.ps 2>/dev/null |awk '{printf "."}'
|
||||
ls -l aux/blossom.pdf blossom.pdf
|
||||
|
||||
.PHONY: optimized
|
||||
optimized: optsapling optsprout optblossom
|
||||
|
||||
.PHONY: all
|
||||
all: sapling sprout blossom
|
||||
|
|
|
@ -34,23 +34,6 @@ detected: ``make pvcsapling``, ``make pvcblossom``, or ``make pvcsprout``.
|
|||
Manual intervention is still needed when there are LaTeX errors.
|
||||
|
||||
|
||||
Optimizing PDF size
|
||||
-------------------
|
||||
|
||||
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.)
|
||||
|
||||
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``;
|
||||
* ``make optsprout`` to make an optimized version of ``sprout.pdf``;
|
||||
* ``make optimized`` to make all optimized PDFs.
|
||||
|
||||
|
||||
Alternative TeX engines
|
||||
-----------------------
|
||||
|
||||
|
|
|
@ -49,16 +49,20 @@
|
|||
% <https://stackoverflow.com/a/49406814/393146>
|
||||
\newcommand{\increment}[1]{\the\numexpr #1+1\relax}
|
||||
|
||||
% The pdfa option has the side effect of preserving hyperlinks when the PDF is
|
||||
% processed by Ghostscript (an alternative way of doing that would be to use
|
||||
% -dPrinted=false on the Ghostscript command line). The resulting document will
|
||||
% not actually be PDF/A.
|
||||
%
|
||||
% The destlabel option creates "destination names" in the PDF, which allows
|
||||
% linking to sections in URL fragments when viewing the PDF in a web browser:
|
||||
% <https://tex.stackexchange.com/a/65049/78411>
|
||||
% In order to preserve destination names through Ghostscript processing, we need
|
||||
% to use extractpdfmark as described at <https://github.com/trueroad/extractpdfmark>.
|
||||
%
|
||||
% The Makefile previously supported processing the PDF through Ghostscript in
|
||||
% order to optimize its size. Since TeXLive 2019, this is no longer an effective
|
||||
% optimization. However, in case processing through Ghostscript is needed for other
|
||||
% reasons, we retain the pdfa option, which has the side effect of preserving
|
||||
% hyperlinks through such processing. (An alternative way of doing that would be
|
||||
% to use -dPrinted=false on the Ghostscript command line.) The resulting document
|
||||
% will not actually be PDF/A.
|
||||
%
|
||||
% To preserve destination names through Ghostscript processing, extractpdfmark
|
||||
% would need to be used as described at <https://github.com/trueroad/extractpdfmark>.
|
||||
%
|
||||
\usepackage[unicode,bookmarksnumbered,bookmarksopen,allbordercolors=MidnightBlue,
|
||||
citebordercolor=Plum,urlbordercolor=BrickRed,pdfa,destlabel]{hyperref}
|
||||
|
@ -10154,6 +10158,13 @@ Peter Newell's illustration of the Jubjub bird, from \cite{Carroll1902}.
|
|||
\intropart
|
||||
\lsection{Change History}{changehistory}
|
||||
|
||||
\historyentry{2019.0.5}{}
|
||||
|
||||
\begin{itemize}
|
||||
\item Removed ``optimized'' \texttt{Makefile} targets (which actually produced
|
||||
a larger PDF, with TeXLive 2019).
|
||||
\end{itemize}
|
||||
|
||||
\historyentry{2019.0.4}{2019-07-23}
|
||||
|
||||
\begin{itemize}
|
||||
|
|
Loading…
Reference in New Issue