fp-lean icon indicating copy to clipboard operation
fp-lean copied to clipboard

Best way to get a PDF version of Functional Programming in Lean?

Open euprunin opened this issue 7 months ago • 7 comments

What is the best way to get a PDF version of Functional Programming in Lean?

Currently I'm doing the following:

% git clone https://github.com/leanprover/fp-lean
% cd fp-lean
% lake exe fp-lean --with-html-single
% pandoc _out/html-single/index.html -o fpil.pdf --pdf-engine=lualatex

It generates a PDF with 382 pages which appears to be complete.

euprunin avatar Jun 03 '25 12:06 euprunin

When running pandoc, the only warnings that appear relate to 46 distinct characters that are missing from the specified font used: [WARNING] Missing character: There is no […] in font […].

euprunin avatar Jun 03 '25 12:06 euprunin

Updated PDF generation instructions:

% git clone https://github.com/leanprover/fp-lean
% cd fp-lean/examples/
% lake build
% lake build subverso-extract-mod
% cd ../book/
% lake exe fp-lean --with-html-single
% pandoc _out/html-single/index.html -o fpil.pdf --pdf-engine=lualatex
% open fpil.pdf

euprunin avatar Jun 05 '25 11:06 euprunin

@david-christiansen Is it possible to include a PDF in this repo?

adamnemecek avatar Aug 17 '25 20:08 adamnemecek

edit: out of date as pointed out below

~~The simplest way way to do so is probably to head to https://leanprover.github.io/functional_programming_in_lean/print.html with web browser and save the output as PDF.~~

shunghsiyu avatar Aug 26 '25 00:08 shunghsiyu

That one is unfortunately out of date.

adamnemecek avatar Aug 26 '25 00:08 adamnemecek

Is there a reason for having no PDF available or easy way to export as PDF?

izanbf1803 avatar Sep 01 '25 18:09 izanbf1803

I would also be interressed of a pdf version to read it in commute.

etiennebonnafoux avatar Nov 12 '25 12:11 etiennebonnafoux