Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2a13b7e

Browse files
committed
2 parents b192e05 + e8903c6 commit 2a13b7e

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

book/Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,18 @@ hevea: book.tex header.html footer.html
4040

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

43-
epub:
44-
cd html; ebook-convert index.html thinkpython2.epub
43+
epub: book.tex
44+
#replace the pdfs with eps
45+
sed s/.pdf/.eps/g book.tex >thinkpython2.tex
46+
latex thinkpython2
47+
rm -rf epub
48+
mkdir epub
49+
hevea -fix -O -e latexonly htmlonly thinkpython2
50+
grep -v latexonly thinkpython2.image.tex > a; mv a thinkpython2.image.tex
51+
sed s/\\\\usepackage{fancyhdr}// < thinkpython2.image.tex > a; mv a thinkpython2.image.tex
52+
imagen -png thinkpython2
53+
mv thinkpython2.html thinkpython2*.png epub
54+
cd epub; ebook-convert thinkpython2.html thinkpython2.epub
4555

4656
distrib:
4757
rm -rf dist

book/book.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ \section*{Contributor List}
723723
% ENDCONTRIB
724724

725725
In addition, people who spotted typos or made corrections include
726-
Czeslaw Czapla, Dale Wilson,
726+
Czeslaw Czapla, Dale Wilson, Francesco Carlo Cimini,
727727
Richard Fursa, Brian McGhie, Lokesh Kumar Makani, Matthew Shultz, Viet
728728
Le, Victor Simeone, Lars O.D. Christensen, Swarup Sahoo, Alix Etienne,
729729
Kuang He, Wei Huang, Karen Barber, and Eric Ransom.
@@ -9724,7 +9724,7 @@ \section{Tuples as return values}
97249724
if the value is a tuple, the effect is the same as returning
97259725
multiple values. For example, if you want to divide two integers
97269726
and compute the quotient and remainder, it is inefficient to
9727-
compute {\tt x/y} and then {\tt x\%y}. It is better to compute
9727+
compute {\tt x//y} and then {\tt x\%y}. It is better to compute
97289728
them both at the same time.
97299729
\index{divmod}
97309730

code/analyze_book1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def skip_gutenberg_header(fp):
4040
fp: open file object
4141
"""
4242
for line in fp:
43-
if line.startswith('*END*THE SMALL PRINT!'):
43+
if line.startswith('*** START OF TH'):
4444
break
4545

4646

code/markov.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def skip_gutenberg_header(fp):
4242
fp: open file object
4343
"""
4444
for line in fp:
45-
if line.startswith('*END*THE SMALL PRINT!'):
45+
if line.startswith('*** START OF TH'):
4646
break
4747

4848

0 commit comments

Comments
 (0)