Skip to content

Commit 9e6ed66

Browse files
committed
Add pdf links to front page again
1 parent 2048fef commit 9e6ed66

5 files changed

Lines changed: 13 additions & 4 deletions

File tree

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ CHAPTERS := $(basename $(shell ls [0-9][0-9]_*.md) .md)
22

33
SVGS := $(wildcard img/*.svg)
44

5+
all: html book.pdf book_mobile.pdf
6+
57
html: $(foreach CHAP,$(CHAPTERS),html/$(CHAP).html) html/js/acorn_codemirror.js \
68
code/skillsharing.zip code/solutions/20_3_a_public_space_on_the_web.zip html/js/chapter_info.js
79

@@ -39,6 +41,13 @@ book.pdf: $(foreach CHAP,$(CHAPTERS),pdf/$(CHAP).tex) pdf/hints.tex pdf/book.tex
3941
cd pdf && sh build.sh book > /dev/null
4042
mv pdf/book.pdf .
4143

44+
pdf/book_mobile.tex: pdf/book.tex
45+
cat pdf/book.tex | sed -e 's/makeidx}/makeidx}\n\\usepackage[a5paper, left=5mm, right=5mm]{geometry}/' | sed -e 's/setmonofont.Scale=0.8./setmonofont[Scale=0.75]/' > pdf/book_mobile.tex
46+
47+
book_mobile.pdf: $(foreach CHAP,$(CHAPTERS),pdf/$(CHAP).tex) pdf/hints.tex pdf/book_mobile.tex $(patsubst img/%.svg,img/generated/%.pdf,$(SVGS))
48+
cd pdf && sh build.sh book_mobile > /dev/null
49+
mv pdf/book_mobile.pdf .
50+
4251
pdf/hints.tex: $(foreach CHAP,$(CHAPTERS),$(CHAP).md) src/extract_hints.js
4352
node src/extract_hints.js | node src/render_latex.js - > $@
4453

html/Eloquent_JavaScript.pdf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../book.pdf

html/Eloquent_JavaScript_small.pdf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../book_mobile.pdf

html/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ <h2>Other pages</h2>
110110
<ul class="links">
111111
<li><a href="code">Code sandbox and exercise solutions</a></li>
112112
<li><a href="errata.html">Errata for the paper book</a></li>
113-
<!--
114113
<li><a href="http://eloquentjavascript.net/Eloquent_JavaScript.pdf">This book as a single PDF file</a> (&amp; <a href="http://eloquentjavascript.net/Eloquent_JavaScript_small.pdf">small version for mobile</a>)</li>
114+
<!--
115115
<li><a href="http://eloquentjavascript.net/Eloquent_JavaScript.epub">This book as an EPUB file</a></li>
116116
<li><a href="http://eloquentjavascript.net/Eloquent_JavaScript.mobi">This book as a MOBI (Kindle) file</a></li>
117117
<li><a href="http://eloquentjavascript.net/1st_edition">The first edition of the book</a></li>

pdf/book.tex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
\usepackage{fontspec}
1010
\usepackage{xeCJK}
1111
\usepackage{listings}
12-
\usepackage{makeidx}
1312
\usepackage{graphics}
13+
\usepackage{makeidx}
1414

1515
% epigraph is used to style chapter quotes
1616
\usepackage{epigraph}
@@ -56,8 +56,6 @@
5656

5757
\title{Eloquent JavaScript}
5858

59-
\subtitle{A Modern Introduction to Programming}
60-
6159
\maketitle
6260

6361
\frontmatter

0 commit comments

Comments
 (0)