--- a/docs/reference/reference.yml Mon Jul 03 10:50:32 2000 +0000
+++ b/docs/reference/reference.yml Mon Jul 03 15:39:51 2000 +0000
@@ -99,9 +99,28 @@
In practice there is a fifth level, the canvas, so that if you want
you can do anything that pdfgen's canvas allows.
-.h2 BaseDocTemplate
+.h2 Document Templates
+.h3 BaseDocTemplate
+
+The basic document template class; it provides for initialisation and
+rendering of documents. A whole bunch of methods
+<b><font name=courier>handle_XXX</font></b> handle document
+rendering events. These event routines all contain some
+significant semantics so while these may be overridden that
+may require some detailed knowledge. Some other methods are
+completely virtual and are designed to be overridden.
+.h3 BaseDocTemplate
.getClassDoc reportlab.platypus.doctemplate BaseDocTemplate
+.pageBreak
+A simple document processor can be made using derived class,
+<b><font name=courier>SimpleDocTemplate</font></b>.
+
+.pageBreak
+.h3 SimpleDocTemplate
+.getClassDoc reportlab.platypus.doctemplate SimpleDocTemplate
+
+.pageBreak
.h2 Flowables
.getClassDoc reportlab.platypus.paragraph Paragraph
@@ -137,6 +156,9 @@
.h1 Appendix A - CVS Revision History
.beginPre Code
$Log: reference.yml,v $
+Revision 1.10 2000/07/03 15:39:51 rgbecker
+Documentation fixes
+
Revision 1.9 2000/06/28 14:52:43 rgbecker
Documentation changes
--- a/docs/tools/yaml.py Mon Jul 03 10:50:32 2000 +0000
+++ b/docs/tools/yaml.py Mon Jul 03 15:39:51 2000 +0000
@@ -85,7 +85,6 @@
#is it a parser method?
if hasattr(self.__class__, cmd):
method = eval('self.'+cmd)
- apply(method, tuple(args))
#this was very bad; any type error in the method was hidden
#we have to hack the traceback
try:
--- a/reportlab/platypus/doctemplate.py Mon Jul 03 10:50:32 2000 +0000
+++ b/reportlab/platypus/doctemplate.py Mon Jul 03 15:39:51 2000 +0000
@@ -31,9 +31,12 @@
#
###############################################################################
# $Log: doctemplate.py,v $
+# Revision 1.23 2000/07/03 15:39:51 rgbecker
+# Documentation fixes
+#
# Revision 1.22 2000/06/28 14:52:43 rgbecker
# Documentation changes
-#
+#
# Revision 1.21 2000/06/26 15:58:22 rgbecker
# Simple fix to widths problem
#
@@ -99,7 +102,7 @@
# Revision 1.1 2000/05/12 12:53:33 rgbecker
# Initial try at a document template class
#
-__version__=''' $Id: doctemplate.py,v 1.22 2000/06/28 14:52:43 rgbecker Exp $ '''
+__version__=''' $Id: doctemplate.py,v 1.23 2000/07/03 15:39:51 rgbecker Exp $ '''
__doc__="""
This module contains the core structure of platypus.
@@ -145,12 +148,18 @@
self.action = action
def wrap(self, availWidth, availHeight):
+ '''Should never be called.'''
raise NotImplementedError
def draw(self):
+ '''Should never be called.'''
raise NotImplementedError
def apply(self,doc):
+ '''
+ This is called by the doc.build processing to allow the instance to
+ implement its behaviour
+ '''
action = self.action[0]
args = tuple(self.action[1:])
arn = 'handle_'+action
@@ -544,6 +553,8 @@
page may can be built using this special approach.
"""
def handle_pageBegin(self):
+ '''override base method to add a change of page template after the firstpage.
+ '''
self._handle_pageBegin()
self._handle_nextPageTemplate('Later')
@@ -556,7 +567,7 @@
# do annotations and modify the document
...
- The functions can do thing like draw logos, page numbers,
+ The functions can do things like draw logos, page numbers,
footers, etcetera. They can use external variables to vary
the look (for example providing page numbering or section names).
"""
--- a/reportlab/platypus/paragraph.py Mon Jul 03 10:50:32 2000 +0000
+++ b/reportlab/platypus/paragraph.py Mon Jul 03 15:39:51 2000 +0000
@@ -31,9 +31,12 @@
#
###############################################################################
# $Log: paragraph.py,v $
+# Revision 1.16 2000/07/03 15:39:51 rgbecker
+# Documentation fixes
+#
# Revision 1.15 2000/06/23 13:13:54 rgbecker
# Fixes to splitting code
-#
+#
# Revision 1.14 2000/06/19 23:51:23 andy_robinson
# Added UserDocTemplate class, and paragraph.getPlainText()
#
@@ -76,7 +79,7 @@
# Revision 1.1 2000/04/14 13:21:52 rgbecker
# Removed from layout.py
#
-__version__=''' $Id: paragraph.py,v 1.15 2000/06/23 13:13:54 rgbecker Exp $ '''
+__version__=''' $Id: paragraph.py,v 1.16 2000/07/03 15:39:51 rgbecker Exp $ '''
import string
import types
from reportlab.pdfbase.pdfmetrics import stringWidth
@@ -260,20 +263,25 @@
return offset
class Paragraph(Flowable):
- """format a block of text into a paragraph with a given style
+ """ Paragraph(text, style, bulletText=None)
+ text a string of stuff to go into the paragraph.
+ style is a style definition as in reportlab.lib.styles.
+ bulletText is an optional bullet defintion.
+
+ This class is a flowable that can format a block of text
+ into a paragraph with a given style.
- The paragraph Text can contain XML-like markup including the
- tags:
- <b> ... </b> - bold
- <i> ... </i> - italics
- <u> ... </u> - underline
- <super> ... </super> - superscript
- <sub> ... </sub> - subscript
- <font name=fontfamily/fontname color=colorname size=float>
+ The paragraph Text can contain XML-like markup including the tags:
+ <b> ... </b> - bold
+ <i> ... </i> - italics
+ <u> ... </u> - underline
+ <super> ... </super> - superscript
+ <sub> ... </sub> - subscript
+ <font name=fontfamily/fontname color=colorname size=float>
The whole may be surrounded by <para> </para> tags
- It will also be able to handle any MathML specified Greek characters.
+ It will also be able to handle any MathML specified Greek characters.
"""
def __init__(self, text, style, bulletText = None, frags=None):