~openerp-dev/openobject-server/trunk-bug-712254-ysa

« back to all changes in this revision

Viewing changes to bin/reportlab/tools/docco/stylesheet.py

  • Committer: pinky
  • Date: 2006-12-07 13:41:40 UTC
  • Revision ID: pinky-3f10ee12cea3c4c75cef44ab04ad33ef47432907
New trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#Copyright ReportLab Europe Ltd. 2000-2004
 
2
#see license.txt for license details
 
3
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/tools/docco/stylesheet.py
 
4
#standard stylesheet for our manuals
 
5
from reportlab.lib.styles import StyleSheet1, ParagraphStyle
 
6
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT, TA_JUSTIFY
 
7
from reportlab.lib import colors
 
8
 
 
9
 
 
10
def getStyleSheet():
 
11
    """Returns a stylesheet object"""
 
12
    stylesheet = StyleSheet1()
 
13
 
 
14
    stylesheet.add(ParagraphStyle(name='Normal',
 
15
                                  fontName='Times-Roman',
 
16
                                  fontSize=10,
 
17
                                  leading=12,
 
18
                                  spaceBefore=6)
 
19
                   )
 
20
 
 
21
    stylesheet.add(ParagraphStyle(name='Comment',
 
22
                                  fontName='Times-Italic')
 
23
                   )
 
24
 
 
25
    stylesheet.add(ParagraphStyle(name='Indent1',
 
26
                                  leftIndent=36,
 
27
                                  firstLineIndent=0)
 
28
                   )
 
29
 
 
30
    stylesheet.add(ParagraphStyle(name='BodyText',
 
31
                                  parent=stylesheet['Normal'],
 
32
                                  spaceBefore=6)
 
33
                   )
 
34
    stylesheet.add(ParagraphStyle(name='Italic',
 
35
                                  parent=stylesheet['BodyText'],
 
36
                                  fontName = 'Times-Italic')
 
37
                   )
 
38
 
 
39
    stylesheet.add(ParagraphStyle(name='Heading1',
 
40
                                  parent=stylesheet['Normal'],
 
41
                                  fontName = 'Times-Bold',
 
42
                                  alignment=TA_CENTER,
 
43
                                  fontSize=18,
 
44
                                  leading=22,
 
45
                                  spaceAfter=6),
 
46
                   alias='h1')
 
47
 
 
48
    stylesheet.add(ParagraphStyle(name='Heading2',
 
49
                                  parent=stylesheet['Normal'],
 
50
                                  fontName = 'Times-Bold',
 
51
                                  fontSize=14,
 
52
                                  leading=17,
 
53
                                  spaceBefore=12,
 
54
                                  spaceAfter=6),
 
55
                   alias='h2')
 
56
 
 
57
    stylesheet.add(ParagraphStyle(name='Heading3',
 
58
                                  parent=stylesheet['Normal'],
 
59
                                  fontName = 'Times-BoldItalic',
 
60
                                  fontSize=12,
 
61
                                  leading=14,
 
62
                                  spaceBefore=12,
 
63
                                  spaceAfter=6),
 
64
                   alias='h3')
 
65
 
 
66
    stylesheet.add(ParagraphStyle(name='Heading4',
 
67
                                  parent=stylesheet['Normal'],
 
68
                                  fontName = 'Times-BoldItalic',
 
69
                                  spaceBefore=10,
 
70
                                  spaceAfter=4),
 
71
                   alias='h4')
 
72
 
 
73
    stylesheet.add(ParagraphStyle(name='Title',
 
74
                                  parent=stylesheet['Normal'],
 
75
                                  fontName = 'Times-Bold',
 
76
                                  fontSize=48,
 
77
                                  leading=56,
 
78
                                  spaceAfter=72,
 
79
                                  alignment=TA_CENTER
 
80
                                  ),
 
81
                   alias='t')
 
82
 
 
83
    stylesheet.add(ParagraphStyle(name='Bullet',
 
84
                                  parent=stylesheet['Normal'],
 
85
                                  firstLineIndent=0,
 
86
                                  leftIndent=54,
 
87
                                  bulletIndent=18,
 
88
                                  spaceBefore=0,
 
89
                                  bulletFontName='Symbol'),
 
90
                   alias='bu')
 
91
 
 
92
    stylesheet.add(ParagraphStyle(name='Definition',
 
93
                                  parent=stylesheet['Normal'],
 
94
                                  firstLineIndent=0,
 
95
                                  leftIndent=36,
 
96
                                  bulletIndent=0,
 
97
                                  spaceBefore=6,
 
98
                                  bulletFontName='Times-BoldItalic'),
 
99
                   alias='df')
 
100
 
 
101
    stylesheet.add(ParagraphStyle(name='Code',
 
102
                                  parent=stylesheet['Normal'],
 
103
                                  fontName='Courier',
 
104
                                  textColor=colors.navy,
 
105
                                  fontSize=8,
 
106
                                  leading=8.8,
 
107
                                  leftIndent=36,
 
108
                                  firstLineIndent=0))
 
109
 
 
110
    stylesheet.add(ParagraphStyle(name='FunctionHeader',
 
111
                                  parent=stylesheet['Normal'],
 
112
                                  fontName='Courier-Bold',
 
113
                                  fontSize=8,
 
114
                                  leading=8.8))
 
115
 
 
116
    stylesheet.add(ParagraphStyle(name='DocString',
 
117
                                  parent=stylesheet['Normal'],
 
118
                                  fontName='Courier',
 
119
                                  fontSize=8,
 
120
                                  leftIndent=18,
 
121
                                  leading=8.8))
 
122
 
 
123
    stylesheet.add(ParagraphStyle(name='DocStringIndent',
 
124
                                  parent=stylesheet['Normal'],
 
125
                                  fontName='Courier',
 
126
                                  fontSize=8,
 
127
                                  leftIndent=36,
 
128
                                  leading=8.8))
 
129
 
 
130
    stylesheet.add(ParagraphStyle(name='URL',
 
131
                                  parent=stylesheet['Normal'],
 
132
                                  fontName='Courier',
 
133
                                  textColor=colors.navy,
 
134
                                  alignment=TA_CENTER),
 
135
                   alias='u')
 
136
 
 
137
    stylesheet.add(ParagraphStyle(name='Centred',
 
138
                                  parent=stylesheet['Normal'],
 
139
                                  alignment=TA_CENTER
 
140
                                  ))
 
141
 
 
142
    stylesheet.add(ParagraphStyle(name='Caption',
 
143
                                  parent=stylesheet['Centred'],
 
144
                                  fontName='Times-Italic'
 
145
                                  ))
 
146
 
 
147
    return stylesheet
 
 
b'\\ No newline at end of file'