##// END OF EJS Templates
docs: new changes by james spencer to improve pdf doc style....
Ville M. Vainio -
Show More
@@ -13,9 +13,43 b" if sys.platform != 'win32':"
13 13 # Produce pdf.
14 14 os.chdir('build/latex')
15 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.
16 # Change chapter style to section style: allows chapters to start on
17 # the current page. Works much better for the short chapters we have.
18 # This must go in the class file rather than the preamble, so we modify
19 # manual.cls at runtime.
20 chapter_cmds=r'''
21 % Local changes.
22 \renewcommand\chapter{
23 \thispagestyle{plain}
24 \global\@topnum\z@
25 \@afterindentfalse
26 \secdef\@chapter\@schapter
27 }
28 \def\@makechapterhead#1{
29 \vspace*{10\p@}
30 {\raggedright \reset@font \Huge \bfseries \thechapter \quad #1}
31 \par\nobreak
32 \hrulefill
33 \par\nobreak
34 \vspace*{10\p@}
35 }
36 \def\@makeschapterhead#1{
37 \vspace*{10\p@}
38 {\raggedright \reset@font \Huge \bfseries #1}
39 \par\nobreak
40 \hrulefill
41 \par\nobreak
42 \vspace*{10\p@}
43 }
44 '''
45
46 unmodified=True
17 47 for line in fileinput.FileInput('manual.cls',inplace=1):
18 line=line.replace('py@OldChapter=\chapter','py@OldChapter=\section')
48 if 'Support for module synopsis' in line and unmodified:
49 line=chapter_cmds+line
50 elif 'makechapterhead' in line:
51 # Already have altered manual.cls: don't need to again.
52 unmodified=False
19 53 print line,
20 54
21 55 # Copying the makefile produced by sphinx...
@@ -123,7 +123,7 b" latex_font_size = '10pt'"
123 123 latex_documents = [('ipython','ipython.tex','IPython Documentation','IPython developers','manual')]
124 124
125 125 # Additional stuff for the LaTeX preamble.
126 latex_preamble = '\\def\\thesection{\\arabic{section}}'
126 #latex_preamble = ''
127 127
128 128 # Documents to append as an appendix to all manuals.
129 129 #latex_appendices = []
General Comments 0
You need to be logged in to leave comments. Login now