##// END OF EJS Templates
Local commit before merge
Local commit before merge

File last commit:

r1170:50064f67
r1182:ecd957c2 merge
Show More
do_sphinx.py
30 lines | 944 B | text/x-python | PythonLexer
vivainio2
sphinx: improve pdf rendering
r1170 import fileinput,os,sys
Ville M. Vainio
do_sphinx: implement pdf creation (for non-windows platforms)
r1167
Ville M. Vainio
add do_sphinx.py
r1118 def oscmd(c):
Ville M. Vainio
do_sphinx: implement pdf creation (for non-windows platforms)
r1167 os.system(c)
vivainio2
sphinx: improve pdf rendering
r1170 # html manual.
Ville M. Vainio
do_sphinx: implement pdf creation (for non-windows platforms)
r1167 oscmd('sphinx-build -d build/doctrees source build/html')
if sys.platform != 'win32':
vivainio2
sphinx: improve pdf rendering
r1170 # LaTeX format.
Ville M. Vainio
do_sphinx: implement pdf creation (for non-windows platforms)
r1167 oscmd('sphinx-build -b latex -d build/doctrees source build/latex')
vivainio2
sphinx: improve pdf rendering
r1170
# Produce pdf.
Ville M. Vainio
do_sphinx: implement pdf creation (for non-windows platforms)
r1167 os.chdir('build/latex')
vivainio2
sphinx: improve pdf rendering
r1170
# Change chapter style to section style: allows chapters to start on the current page. Works much better for the short chapters we have.
for line in fileinput.FileInput('manual.cls',inplace=1):
line=line.replace('py@OldChapter=\chapter','py@OldChapter=\section')
print line,
# Copying the makefile produced by sphinx...
Ville M. Vainio
do_sphinx: implement pdf creation (for non-windows platforms)
r1167 oscmd('pdflatex ipython.tex')
oscmd('pdflatex ipython.tex')
oscmd('pdflatex ipython.tex')
oscmd('makeindex -s python.ist ipython.idx')
oscmd('makeindex -s python.ist modipython.idx')
oscmd('pdflatex ipython.tex')
oscmd('pdflatex ipython.tex')
vivainio2
sphinx: improve pdf rendering
r1170
Ville M. Vainio
do_sphinx: implement pdf creation (for non-windows platforms)
r1167 os.chdir('../..')