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

Skip to content

Commit bb8e9ce

Browse files
authored
Merge pull request AllenDowney#40 from jjlwork/master
Make a more pleasant epub
2 parents 666a2f2 + f67d49f commit bb8e9ce

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
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

0 commit comments

Comments
 (0)