Skip to content

Commit

Permalink
Fix various details in metadata and front pages
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Feb 29, 2024
1 parent 1f0af9f commit e0a51d6
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 174 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ book.epub: epub/titlepage.xhtml epub/toc.xhtml epub/hints.xhtml $(foreach CHAP,$
epub/toc.xhtml: epub/toc.xhtml.src $(foreach CHAP,$(CHAPTERS),epub/$(CHAP).xhtml) epub/hints.xhtml
node src/generate_epub_toc.mjs $^ > $@

epub/%.xhtml: %.md src/render_html.js
node src/render_html.js --epub $< > $@
epub/%.xhtml: %.md src/render_html.mjs
node src/render_html.mjs --epub $< > $@

epub/hints.xhtml: $(foreach CHAP,$(CHAPTERS),$(CHAP).md) src/extract_hints.mjs src/render_html.js
epub/hints.xhtml: $(foreach CHAP,$(CHAPTERS),$(CHAP).md) src/extract_hints.mjs src/render_html.mjs
node src/extract_hints.mjs | node src/render_html.mjs --epub - > $@

epubcheck: book.epub
Expand Down
2 changes: 1 addition & 1 deletion code/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 2008-2020 by Marijn Haverbeke <[email protected]>
Copyright (C) 2008-2024 by Marijn Haverbeke <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion code/skillsharing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"maintainers": [
{
"name": "Marijn Haverbeke",
"email": "[email protected]",
"email": "[email protected]",
"web": "https://marijnhaverbeke.nl/"
}
],
Expand Down
31 changes: 8 additions & 23 deletions epub/frontmatter.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,19 @@
an <a href="https://eloquentjavascript.net/code/LICENSE">MIT license</a>.</p>

<p style="font-size: 80%">Illustrations by various artists: Cover
and chapter illustrations by Madalina Tantareanu. Pixel art in
Chapters 7 and 16 by Antonio Perdomo Pastor. Regular expression
diagrams in Chapter 9 generated
by Péchane Sumi-e. Chapter illustrations by Madalina Tantareanu.
Pixel art in Chapters 7 and 16 by Antonio Perdomo Pastor. Regular
expression diagrams in Chapter 9 generated
with <a href="https://regexper.com/">regexper.com</a> by Jeff
Avallone. Village photograph in Chapter 11 by Fabrice Creuzot.
Game concept for Chapter 16
by <a href="http://lessmilk.com">Thomas Palef</a>.</p>

<p style="font-size: 80%">The third edition was made possible
by <a href="https://eloquentjavascript.net/backers3.html">325 financial backers</a>, most
notably <a href="https://nextjournal.com/"><img src="img/nextjournal.png"
alt="Nextjournal" class="logo"/></a>
and <a href="https://www.holbertonschool.com/"><img src="img/holberton.png"
alt="Holberton School" class="logo"/></a>. The second edition was
supported by <a href="https://eloquentjavascript.net/backers.html">454 backers</a>, with
significant contributions
from <a href="https://www.mozilla.org/en-US/"><img src="img/mozilla_mini.png"
alt="Mozilla" class="logo"/></a>,
<a href="https://www.hackreactor.com/"><img src="img/hack_reactor_mini.png"
alt="Hack Reactor" class="logo"/></a>,
and <a href="https://www.ghostery.com/"><img src="img/ghostery_mini.png"
alt="Ghostery" class="logo"/></a>.</p>

<p>A <a href="http://a-fwd.com/com=marijhaver-20&amp;asin-com=1593279507">paper
version</a> of Eloquent JavaScript, including a bonus chapter, is
being brought out by <a href="https://nostarch.com/">No Starch
Press</a>. They also sell a more polished EPUB version that
includes the bonus chapter.</p>
<p>A paper version of Eloquent JavaScript, including a bonus
chapter, is being brought out
by <a href="https://nostarch.com/">No Starch Press</a>. They also
sell a more polished EPUB version that includes the bonus
chapter.</p>

</body>
</html>
8 changes: 1 addition & 7 deletions epub/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pre {
line-height: 1.35;
margin: 1rem 0;
position: relative;
font-size: 70%;
font-size: 90%;
white-space: pre-wrap;
overflow-wrap: break-word;
}
Expand All @@ -40,15 +40,9 @@ code, pre {
}

code {
font-size: 80%;
padding: 0 2px;
}

@media (min-width: 35em) {
pre { font-size: 80%; }
code { font-size: 90%; }
}

h1, h2, h3 {
font-family: 'Cinzel', Georgia, serif;
font-weight: 700;
Expand Down
119 changes: 9 additions & 110 deletions html/errata.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@

<article>

<h1>Errata<div style="font-size: 70%"><a class="subtlelink" href="index.html">Eloquent JavaScript</a>, 3rd Edition</div></h2>
<h1>Errata<div style="font-size: 70%"><a class="subtlelink" href="index.html">Eloquent JavaScript</a>, 4th Edition</div></h2>

<p>These are the known mistakes in the <strong>third edition</strong>
of the book. For errata in the first edition,
see <a href="https://eloquentjavascript.net/1st_edition/errata.html">this
page</a>. For the second edition,
see <a href="https://eloquentjavascript.net/2nd_edition/errata.html">this
page</a>. To report a problem that is not listed
here, <a href="mailto:[email protected]">send me an email</a>.</p>
<p>These are the known mistakes in the <strong>fourth edition</strong>
of the book. For errata in other editions, see these pages: <a href="https://eloquentjavascript.net/1st_edition/errata.html">first</a>, <a href="https://eloquentjavascript.net/2nd_edition/errata.html">second</a>, <a href="https://eloquentjavascript.net/3rd_edition/errata.html">third</a>. To report a problem that is not listed
here, <a href="mailto:[email protected]">send me an email</a>.</p>

<p><em>No issues found yet.</em></p>

<!--
<p>Issues whose page number is followed by an ordinal number are only
present up to the print denoted by that number. I.e. those followed by
Expand All @@ -30,107 +30,6 @@ <h2>Chapter 2</h2>
<p><strong>Page 34</strong> (1st) <em>Updating Bindings Succintly</em>: Where it
says <code>counter-</code> it should be <code>counter--</code>.</p>
<h2>Chapter 5</h2>

<p><strong>Page 91</strong> (3rd) <em>Composability</em>: Due to an initial
mistake in the script data set, the results of the computations on
this page differ from the ones with the current, corrected data. The
average year for living scripts should be 1165, the average for
non-living scripts should be 204.</p>

<h2>Chapter 6</h2>

<p><strong>Page 111</strong> (2nd) <em>Inheritance</em>: In the second
paragraph below the example code, instead of “<code>content</code>
method”, the text should say “<code>element</code> function”.

<h2>Chapter 8</h2>

<p><strong>Page 134</strong> (2nd) <em>Error Propagation</em>: In the third
paragraph of the section, a function <code>promptInteger</code> is
referred to. The function is actually
called <code>promptNumber</code>, and the word “whole” should be
dropped from the sentence (it accepts non-whole numbers, too).</p>

<h2>Chapter 10</h2>

<p><strong>Page 168</strong> (1st) <em>Modules as Building Blocks</em>: In “each
needs it own private scope“, it should say “<em>its</em> own private
scope“.</p>

<h2>Chapter 11</h2>

<p><strong>Page 189/190</strong> (4th) <em>Networks are Hard</em>: The text
under the code that defines <code>request</code> claims the function
will give up after four attempts and a second. In fact, it gives up
after three attempts, in three-quarter second.</p>

<h2>Chapter 14</h2>

<p><strong>Page 231</strong> (5th) <em>Moving Through the Tree</em>: Below
the code example, the text claims
that <code>for</code>/<code>of</code> loops don't work on DOM child
lists. But in current (even as of the book's release) browsers they
do.</p>

<p><strong>Page 234</strong> (2nd) <em>Creating Nodes</em>: In the
code, “edition” is misspelled as “editon”.</p>

<h2>Chapter 15</h2>

<p><strong>Page 255</strong> (7th) <em>Mouse Motion</em>: The second
paragraph on the page claims that you can isolate a button from
the <code>buttons</code> bitmask with the remainder operator, but that
doesn't really work (you'd also need a division and a floor, which
gets too obscure to go into in this chapter).</p>

<p><strong>Page 258</strong> (3rd) <em>Load Event</em>: The description of
the <code>beforeunload</code> claims that you just need to return a
string from your event handler. For handlers registered
with <code>addEventListener</code> you, in fact, need to
call <code>preventDefault</code> and set a <code>returnValue</code>
property to get the warn-on-leave behavior.</p>

<h2>Chapter 16</h2>

<p><strong>Page 271</strong> (8th) <em>Actors</em>: Near the bottom of the
page, the book incorrectly uses the term <em>phase</em> (of a sinus
wave) where it should say <em>period</em>.</p>

<p><strong>Page 278</strong> (8th) <em>Motion and Collision</em>: The code
that defines the <code>touches</code> method unintentionally (though
harmlessly) used <code>var</code> instead of <code>let</code> to
define variables.</p>

<p><strong>Page 285</strong> (2nd) <em>Pausing the Game</em>: The text
refers to the <code>arrow</code> binding, where it should
say <code>arrowKeys</code>.</p>

<h2>Chapter 19</h2>

<p><strong>Page 336</strong> (5th) <em>The State</em>: The text mentions the
property <code>fillColor</code> where it should
say <code>fillStyle</code> instead.

<h2>Chapter 20</h2>

<p><strong>Page 367</strong> <em>A File Server</em>: The part that
talks about “the output stream to the request” should say “the stream
from the request” instead.</p>

<p><strong>Page 369</strong> (1st) <em>Directory
Creation</em>: <code>MKCOL</code> stands for “make collection”, not “make
column” as the book claims.</p>

<h2>Chapter 21</h2>

<p><strong>Page 373</strong> (3rd) <em>HTTP Interface</em>: There is a
superfluous closing brace at the end of the example JSON snippet.</p>

<h2>Exercise Hints</h2>

<p><strong>Page 414</strong> (3rd) <em>A Modular Robot</em>:
The <code>dijkstrajs</code> package name is misspelled
as <code>dijkstajs</code>.
-->

</article>
25 changes: 7 additions & 18 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h1>Eloquent JavaScript<div style="font-size: 70%">3rd edition (2018)</div></h2>

<p>This is a book about JavaScript, programming, and the wonders of
the digital. You can read it online here, or buy your own
<a href="https://nostarch.com/ejs3">paperback copy</a>.</p>
<a href="https://nostarch.com/ejs3">paperback copy</a> (3rd edition).</p>

<p>Written by Marijn Haverbeke.</p>

Expand All @@ -42,27 +42,15 @@ <h1>Eloquent JavaScript<div style="font-size: 70%">3rd edition (2018)</div></h2>
may also be considered licensed under
an <a href="https://eloquentjavascript.net/code/LICENSE">MIT license</a>.</p>

<p>Illustrations by various artists: Cover and chapter illustrations
by <a href="http://madalinatantareanu.com/">Madalina Tantareanu</a>.
Pixel art in Chapters 7 and 16 by Antonio Perdomo Pastor. Regular
expression diagrams in Chapter 9 generated
<p>Illustrations by various artists: Cover
by <a href="http://www.pechane.com/">Péchane Sumi-e</a>. Chapter
illustrations by <a href="http://madalinatantareanu.com/">Madalina
Tantareanu</a>. Pixel art in Chapters 7 and 16 by Antonio Perdomo
Pastor. Regular expression diagrams in Chapter 9 generated
with <a href="https://regexper.com">regexper.com</a> by Jeff
Avallone. Village photograph in Chapter 11 by Fabrice Creuzot. Game
concept for Chapter 16 by <a href="http://lessmilk.com">Thomas
Palef</a>.</p>

<p>The third edition was made possible
by <a href="backers3.html">325 financial backers</a>, most
notably <a href="https://nextjournal.com/"><img src="img/nextjournal.png"
alt="Nextjournal" class=logo></a> and <a href="https://www.holbertonschool.com/"><img src="img/holberton.png" alt="Holberton School" class=logo></a>. The second edition
was supported by <a href="backers.html">454 backers</a>, with
significant contributions
from <a href="https://www.mozilla.org/en-US/"><img src="img/mozilla_mini.png"
alt=Mozilla
class=logo></a>, <a href="https://www.hackreactor.com/"><img src="img/hack_reactor_mini.png"
alt="Hack Reactor" class=logo></a>,
and <a href="https://www.ghostery.com/"><img src="img/ghostery_mini.png"
alt="Ghostery" class=logo></a>.</p>
</div>

</div>
Expand Down Expand Up @@ -123,6 +111,7 @@ <h2>Other pages</h2>
<li><a href="https://eloquentjavascript.net/Eloquent_JavaScript.mobi">This book as a MOBI (Kindle) file</a></li>
<li><a href="https://eloquentjavascript.net/1st_edition">The first edition of the book</a></li>
<li><a href="https://eloquentjavascript.net/2nd_edition">The second edition of the book</a></li>
<li><a href="https://eloquentjavascript.net/3rd_edition">The third edition of the book</a></li>
</ul>

<h2>Translations</h2>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Eloquent-JavaScript",
"license": "CC BY-NC 3.0",
"version": "0.1.0",
"author": "Marijn Haverbeke <[email protected]>",
"author": "Marijn Haverbeke <[email protected]>",
"description": "Sources for the book Eloquent JavaScript",
"repository": {
"type": "git",
Expand Down
17 changes: 7 additions & 10 deletions pdf/book.tex
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,13 @@
the book may also be considered licensed under an MIT license
(\url{https://eloquentjavascript.net/code/LICENSE}).
The illustrations are contributed by various artists: Cover and
chapter illustrations by Madalina Tantareanu. Pixel art in Chapters
7 and 16 by Antonio Perdomo Pastor. Regular expression diagrams in
Chapter 9 generated with \href{http://regexper.com}{regexper.com} by
Jeff Avallone. Village photograph in Chapter 11 by Fabrice Creuzot.
Game concept for Chapter 16 by \href{http://lessmilk.com}{Thomas
Palef}.
The third edition of Eloquent JavaScript was made possible
by \href{https://eloquentjavascript.net/backers3.html}{325 financial backers}.
The illustrations are contributed by various artists: Cover by
Péchane Sumi-e. Chapter illustrations by Madalina Tantareanu. Pixel
art in Chapters 7 and 16 by Antonio Perdomo Pastor. Regular
expression diagrams in Chapter 9 generated with
\href{http://regexper.com}{regexper.com} by Jeff Avallone. Village
photograph in Chapter 11 by Fabrice Creuzot. Game concept for
Chapter 16 by \href{http://lessmilk.com}{Thomas Palef}.
\vskip 1em
Expand Down

0 comments on commit e0a51d6

Please sign in to comment.