Skip to content

Commit 3bd0cb6

Browse files
committed
move chapter*.tex to part directory
1 parent 6f6c428 commit 3bd0cb6

25 files changed

+1104
-21
lines changed

thinkpython/tex-zh/.book.tex.swp

-56 KB
Binary file not shown.

thinkpython/tex-zh/Makefile

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
LATEX = latex
2+
3+
DVIPS = dvips
4+
5+
PDFFLAGS = -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress \
6+
-dCompressPages=true -dUseFlateCompression=true \
7+
-dEmbedAllFonts=true -dSubsetFonts=true -dMaxSubsetPct=100
8+
9+
10+
%.dvi: %.tex
11+
$(LATEX) $<
12+
13+
%.ps: %.dvi
14+
$(DVIPS) -o $@ $<
15+
16+
%.pdf: %.ps
17+
ps2pdf $(PDFFLAGS) $<
18+
19+
all: book.tex
20+
xetex book
21+
makeindex book
22+
xetex book
23+
dvips -t letter -Ppdf -o thinkpython.ps book
24+
# dvips -T 6.75in,9.25in -Ppdf -o thinkpython.ps book
25+
# dvips -t b5 -Ppdf -o thinkpython.ps book
26+
# dvips -T 7in,10in -Ppdf -o thinkpython.ps book
27+
gv thinkpython.ps
28+
29+
html: book.tex header.html footer.html
30+
rm -rf html
31+
mkdir html
32+
hevea -O -e latexonly htmlonly book
33+
# the following line is a kludge to prevent imagen from seeing
34+
# the definitions in latexonly
35+
grep -v latexonly book.image.tex > a; mv a book.image.tex
36+
imagen -png book
37+
hacha book.html
38+
cp up.png next.png back.png html
39+
mv index.html book.css book*.html book*.png *motif.gif html
40+
41+
DEST = /home/downey/public_html/greent/thinkpython
42+
43+
distrib:
44+
ps2pdf $(PDFFLAGS) thinkpython.ps
45+
rm -rf dist
46+
mkdir dist dist/tex dist/tex/figs
47+
rsync -a thinkpython.pdf thinkpython.ps html dist
48+
rsync -a Makefile book.tex latexonly htmlonly dist/tex
49+
rsync -a figs/*.fig figs/*.eps dist/tex/figs
50+
cd dist; zip -r thinkpython.tex.zip tex
51+
cd dist; zip -r thinkpython.html.zip html
52+
rsync -a dist/* $(DEST)
53+
chmod -R o+r $(DEST)/*
54+
55+
clean:
56+
rm -f *~ *.aux *.log *.dvi *.idx *.ilg *.ind *.toc *.pdf
57+
58+
59+

thinkpython/tex-zh/book.tex

Lines changed: 65 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,50 +14,94 @@
1414
% Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1515
%
1616

17-
\input{preamble}
17+
\documentclass[10pt]{book}
18+
\usepackage[width=5.5in,height=8.5in,
19+
hmarginratio=3:2,vmarginratio=1:1]{geometry} %指定了{h,v}marginratio,width和height被忽略了,可以不用指定(参考geometry.pdf, $texdoc geometry.pdf)。
20+
21+
%下面的这些包,你可能需要安装texlive-latex-extra(in Debian/Ubuntu)
22+
\usepackage{pslatex} %
23+
\usepackage{url}
24+
\usepackage{fancyhdr}
25+
\usepackage{graphicx}
26+
\usepackage{amsmath,amsthm,amssymb}
27+
\usepackage{exercise}
28+
\usepackage{makeidx}
29+
\usepackage{setspace}
30+
\usepackage{hevea}
31+
\usepackage{upquote}
32+
%这些是对中文的支持
33+
\usepackage{xeCJK}
34+
\usepackage{fontspec}
35+
\setCJKmainfont{FangSong_GB2312:style=Regular}
36+
\setmainfont{FangSong_GB2312:style=Regular}
37+
\XeTeXlinebreaklocale "zh"
38+
\XeTeXlinebreakskip=0pt plus 1pt minus 0.1pt
39+
40+
\title{思考Python}
41+
\newcommand{\thetitle}{思考Python:像计算机科学家一样思考}
42+
\newcommand{\theversion}{1.1.22}
43+
44+
%以下的这些风格被转换成html的css
45+
\newstyle{a:link}{color:black;}
46+
\newstyle{p+p}{margin-top:lem;margin-bottom:lem}
47+
\newstyle{img}{border:opx}
48+
49+
%改变箭头(方向)
50+
\setlinkstext
51+
{\imgsrc[ALT="Previous"]{back.png}}
52+
{\imgsrc[ALT="Previous"]{up.png}}
53+
{\imgsrc[ALT="Previous"]{next.png}}
54+
55+
\makeindex
56+
57+
\begin{document}
58+
59+
\frontmatter
60+
61+
\input{part/chapter00}
1862

1963
\mainmatter
2064

21-
\input{chapter01}
65+
\input{part/chapter01}
2266

23-
\input{chapter02}
67+
\input{part/chapter02}
2468

25-
\input{chapter03}
69+
\input{part/chapter03}
2670

27-
\input{chapter04}
71+
\input{part/chapter04}
2872

29-
\input{chapter05}
73+
\input{part/chapter05}
3074

31-
\input{chapter06}
75+
\input{part/chapter06}
3276

33-
\input{chapter07}
77+
\input{part/chapter07}
3478

35-
\input{chapter08}
79+
\input{part/chapter08}
3680

37-
\input{chapter09}
81+
\input{part/chapter09}
3882

39-
\input{chapter10}
83+
\input{part/chapter10}
4084

41-
\input{chapter11}
85+
\input{part/chapter11}
4286

43-
\input{chapter12}
87+
\input{part/chapter12}
4488

45-
\input{chapter13}
89+
\input{part/chapter13}
4690

47-
\input{chapter14}
91+
\input{part/chapter14}
4892

49-
\input{chapter15}
93+
\input{part/chapter15}
5094

51-
\input{chapter16}
95+
\input{part/chapter16}
5296

53-
\input{chapter17}
97+
\input{part/chapter17}
5498

55-
\input{chapter18}
99+
\input{part/chapter18}
56100

57-
\input{chapter19}
101+
\input{part/chapter19}
58102

59103
\appendix
60104

61-
\input{appendix}
105+
\input{part/appendix}
62106

63107
\end{document}

0 commit comments

Comments
 (0)