Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDowney committed Nov 1, 2018
2 parents b192e05 + e8903c6 commit 2a13b7e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
14 changes: 12 additions & 2 deletions book/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,18 @@ hevea: book.tex header.html footer.html

DEST = /home/downey/public_html/greent/thinkpython2

epub:
cd html; ebook-convert index.html thinkpython2.epub
epub: book.tex
#replace the pdfs with eps
sed s/.pdf/.eps/g book.tex >thinkpython2.tex
latex thinkpython2
rm -rf epub
mkdir epub
hevea -fix -O -e latexonly htmlonly thinkpython2
grep -v latexonly thinkpython2.image.tex > a; mv a thinkpython2.image.tex
sed s/\\\\usepackage{fancyhdr}// < thinkpython2.image.tex > a; mv a thinkpython2.image.tex
imagen -png thinkpython2
mv thinkpython2.html thinkpython2*.png epub
cd epub; ebook-convert thinkpython2.html thinkpython2.epub

distrib:
rm -rf dist
Expand Down
4 changes: 2 additions & 2 deletions book/book.tex
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ \section*{Contributor List}
% ENDCONTRIB

In addition, people who spotted typos or made corrections include
Czeslaw Czapla, Dale Wilson,
Czeslaw Czapla, Dale Wilson, Francesco Carlo Cimini,
Richard Fursa, Brian McGhie, Lokesh Kumar Makani, Matthew Shultz, Viet
Le, Victor Simeone, Lars O.D. Christensen, Swarup Sahoo, Alix Etienne,
Kuang He, Wei Huang, Karen Barber, and Eric Ransom.
Expand Down Expand Up @@ -9724,7 +9724,7 @@ \section{Tuples as return values}
if the value is a tuple, the effect is the same as returning
multiple values. For example, if you want to divide two integers
and compute the quotient and remainder, it is inefficient to
compute {\tt x/y} and then {\tt x\%y}. It is better to compute
compute {\tt x//y} and then {\tt x\%y}. It is better to compute
them both at the same time.
\index{divmod}
Expand Down
2 changes: 1 addition & 1 deletion code/analyze_book1.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def skip_gutenberg_header(fp):
fp: open file object
"""
for line in fp:
if line.startswith('*END*THE SMALL PRINT!'):
if line.startswith('*** START OF TH'):
break


Expand Down
2 changes: 1 addition & 1 deletion code/markov.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def skip_gutenberg_header(fp):
fp: open file object
"""
for line in fp:
if line.startswith('*END*THE SMALL PRINT!'):
if line.startswith('*** START OF TH'):
break


Expand Down

0 comments on commit 2a13b7e

Please sign in to comment.