Show More
@@ -1,13 +1,24 b'' | |||||
1 | import os,sys |
|
1 | import fileinput,os,sys | |
2 |
|
2 | |||
3 | def oscmd(c): |
|
3 | def oscmd(c): | |
4 | os.system(c) |
|
4 | os.system(c) | |
5 |
|
5 | |||
|
6 | # html manual. | |||
6 | oscmd('sphinx-build -d build/doctrees source build/html') |
|
7 | oscmd('sphinx-build -d build/doctrees source build/html') | |
7 |
|
8 | |||
8 | if sys.platform != 'win32': |
|
9 | if sys.platform != 'win32': | |
|
10 | # LaTeX format. | |||
9 | oscmd('sphinx-build -b latex -d build/doctrees source build/latex') |
|
11 | oscmd('sphinx-build -b latex -d build/doctrees source build/latex') | |
|
12 | ||||
|
13 | # Produce pdf. | |||
10 | os.chdir('build/latex') |
|
14 | os.chdir('build/latex') | |
|
15 | ||||
|
16 | # Change chapter style to section style: allows chapters to start on the current page. Works much better for the short chapters we have. | |||
|
17 | for line in fileinput.FileInput('manual.cls',inplace=1): | |||
|
18 | line=line.replace('py@OldChapter=\chapter','py@OldChapter=\section') | |||
|
19 | print line, | |||
|
20 | ||||
|
21 | # Copying the makefile produced by sphinx... | |||
11 | oscmd('pdflatex ipython.tex') |
|
22 | oscmd('pdflatex ipython.tex') | |
12 | oscmd('pdflatex ipython.tex') |
|
23 | oscmd('pdflatex ipython.tex') | |
13 | oscmd('pdflatex ipython.tex') |
|
24 | oscmd('pdflatex ipython.tex') | |
@@ -15,4 +26,5 b" if sys.platform != 'win32':" | |||||
15 | oscmd('makeindex -s python.ist modipython.idx') |
|
26 | oscmd('makeindex -s python.ist modipython.idx') | |
16 | oscmd('pdflatex ipython.tex') |
|
27 | oscmd('pdflatex ipython.tex') | |
17 | oscmd('pdflatex ipython.tex') |
|
28 | oscmd('pdflatex ipython.tex') | |
|
29 | ||||
18 | os.chdir('../..') |
|
30 | os.chdir('../..') |
@@ -120,10 +120,10 b" latex_font_size = '10pt'" | |||||
120 |
|
120 | |||
121 | # Grouping the document tree into LaTeX files. List of tuples |
|
121 | # Grouping the document tree into LaTeX files. List of tuples | |
122 | # (source start file, target name, title, author, document class [howto/manual]). |
|
122 | # (source start file, target name, title, author, document class [howto/manual]). | |
123 |
latex_documents = [('ipython','ipython.tex','IPython Documentation',' |
|
123 | latex_documents = [('ipython','ipython.tex','IPython Documentation','IPython developers','manual')] | |
124 |
|
124 | |||
125 | # Additional stuff for the LaTeX preamble. |
|
125 | # Additional stuff for the LaTeX preamble. | |
126 | #latex_preamble = '' |
|
126 | latex_preamble = '\\def\\thesection{\\arabic{section}}' | |
127 |
|
127 | |||
128 | # Documents to append as an appendix to all manuals. |
|
128 | # Documents to append as an appendix to all manuals. | |
129 | #latex_appendices = [] |
|
129 | #latex_appendices = [] |
General Comments 0
You need to be logged in to leave comments.
Login now