summaryrefslogtreecommitdiff
path: root/bin/reportlab/tools/docco/stylesheet.py
diff options
context:
space:
mode:
authorpinky <>2006-12-07 13:41:40 +0000
committerpinky <>2006-12-07 13:41:40 +0000
commit004a0b996ff8f269451e07346f71a129a1f3fbaf (patch)
tree48f43c1fc2ca4c1f4d5648e7e73553d3f4ccae06 /bin/reportlab/tools/docco/stylesheet.py
New trunk
bzr revid: pinky-3f10ee12cea3c4c75cef44ab04ad33ef47432907
Diffstat (limited to 'bin/reportlab/tools/docco/stylesheet.py')
-rw-r--r--bin/reportlab/tools/docco/stylesheet.py147
1 files changed, 147 insertions, 0 deletions
diff --git a/bin/reportlab/tools/docco/stylesheet.py b/bin/reportlab/tools/docco/stylesheet.py
new file mode 100644
index 00000000000..f011fe4b86b
--- /dev/null
+++ b/bin/reportlab/tools/docco/stylesheet.py
@@ -0,0 +1,147 @@
+#Copyright ReportLab Europe Ltd. 2000-2004
+#see license.txt for license details
+#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/tools/docco/stylesheet.py
+#standard stylesheet for our manuals
+from reportlab.lib.styles import StyleSheet1, ParagraphStyle
+from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT, TA_JUSTIFY
+from reportlab.lib import colors
+
+
+def getStyleSheet():
+ """Returns a stylesheet object"""
+ stylesheet = StyleSheet1()
+
+ stylesheet.add(ParagraphStyle(name='Normal',
+ fontName='Times-Roman',
+ fontSize=10,
+ leading=12,
+ spaceBefore=6)
+ )
+
+ stylesheet.add(ParagraphStyle(name='Comment',
+ fontName='Times-Italic')
+ )
+
+ stylesheet.add(ParagraphStyle(name='Indent1',
+ leftIndent=36,
+ firstLineIndent=0)
+ )
+
+ stylesheet.add(ParagraphStyle(name='BodyText',
+ parent=stylesheet['Normal'],
+ spaceBefore=6)
+ )
+ stylesheet.add(ParagraphStyle(name='Italic',
+ parent=stylesheet['BodyText'],
+ fontName = 'Times-Italic')
+ )
+
+ stylesheet.add(ParagraphStyle(name='Heading1',
+ parent=stylesheet['Normal'],
+ fontName = 'Times-Bold',
+ alignment=TA_CENTER,
+ fontSize=18,
+ leading=22,
+ spaceAfter=6),
+ alias='h1')
+
+ stylesheet.add(ParagraphStyle(name='Heading2',
+ parent=stylesheet['Normal'],
+ fontName = 'Times-Bold',
+ fontSize=14,
+ leading=17,
+ spaceBefore=12,
+ spaceAfter=6),
+ alias='h2')
+
+ stylesheet.add(ParagraphStyle(name='Heading3',
+ parent=stylesheet['Normal'],
+ fontName = 'Times-BoldItalic',
+ fontSize=12,
+ leading=14,
+ spaceBefore=12,
+ spaceAfter=6),
+ alias='h3')
+
+ stylesheet.add(ParagraphStyle(name='Heading4',
+ parent=stylesheet['Normal'],
+ fontName = 'Times-BoldItalic',
+ spaceBefore=10,
+ spaceAfter=4),
+ alias='h4')
+
+ stylesheet.add(ParagraphStyle(name='Title',
+ parent=stylesheet['Normal'],
+ fontName = 'Times-Bold',
+ fontSize=48,
+ leading=56,
+ spaceAfter=72,
+ alignment=TA_CENTER
+ ),
+ alias='t')
+
+ stylesheet.add(ParagraphStyle(name='Bullet',
+ parent=stylesheet['Normal'],
+ firstLineIndent=0,
+ leftIndent=54,
+ bulletIndent=18,
+ spaceBefore=0,
+ bulletFontName='Symbol'),
+ alias='bu')
+
+ stylesheet.add(ParagraphStyle(name='Definition',
+ parent=stylesheet['Normal'],
+ firstLineIndent=0,
+ leftIndent=36,
+ bulletIndent=0,
+ spaceBefore=6,
+ bulletFontName='Times-BoldItalic'),
+ alias='df')
+
+ stylesheet.add(ParagraphStyle(name='Code',
+ parent=stylesheet['Normal'],
+ fontName='Courier',
+ textColor=colors.navy,
+ fontSize=8,
+ leading=8.8,
+ leftIndent=36,
+ firstLineIndent=0))
+
+ stylesheet.add(ParagraphStyle(name='FunctionHeader',
+ parent=stylesheet['Normal'],
+ fontName='Courier-Bold',
+ fontSize=8,
+ leading=8.8))
+
+ stylesheet.add(ParagraphStyle(name='DocString',
+ parent=stylesheet['Normal'],
+ fontName='Courier',
+ fontSize=8,
+ leftIndent=18,
+ leading=8.8))
+
+ stylesheet.add(ParagraphStyle(name='DocStringIndent',
+ parent=stylesheet['Normal'],
+ fontName='Courier',
+ fontSize=8,
+ leftIndent=36,
+ leading=8.8))
+
+ stylesheet.add(ParagraphStyle(name='URL',
+ parent=stylesheet['Normal'],
+ fontName='Courier',
+ textColor=colors.navy,
+ alignment=TA_CENTER),
+ alias='u')
+
+ stylesheet.add(ParagraphStyle(name='Centred',
+ parent=stylesheet['Normal'],
+ alignment=TA_CENTER
+ ))
+
+ stylesheet.add(ParagraphStyle(name='Caption',
+ parent=stylesheet['Centred'],
+ fontName='Times-Italic'
+ ))
+
+ return stylesheet \ No newline at end of file