Example #1
0
    def __init__(self, *args, **kwargs):

        # The parent argument is to define the locality of
        # the TOC. If it's none, it's a global TOC and
        # any heading it's notified about is accepted.

        # If it's a node, then the heading needs to be "inside"
        # that node. This can be figured out because
        # the heading flowable keeps a reference to the title
        # node it was creatd from.
        #
        # Yes, this is gross.

        self.parent=kwargs.pop('parent')
        TableOfContents.__init__(self, *args, **kwargs)
        # reference ids for which this TOC should be notified
        self.refids = []
        # revese lookup table from (level, text) to refid
        self.refid_lut = {}
        self.linkColor = "#0000ff"
Example #2
0
    def __init__(self, *args, **kwargs):

        # The parent argument is to define the locality of
        # the TOC. If it's none, it's a global TOC and
        # any heading it's notified about is accepted.

        # If it's a node, then the heading needs to be "inside"
        # that node. This can be figured out because
        # the heading flowable keeps a reference to the title
        # node it was creatd from.
        #
        # Yes, this is gross.

        self.parent=kwargs.pop('parent')
        TableOfContents.__init__(self, *args, **kwargs)
        # reference ids for which this TOC should be notified
        self.refids = []
        # revese lookup table from (level, text) to refid
        self.refid_lut = {}
        self.linkColor = "#0000ff"
    def __init__(self):
        RepTOC.__init__(self)

        self.toc_h1 = ParagraphStyle(name='Heading1',
                                     fontSize=14,
                                     fontName="Times-Bold",
                                     leftIndent=6)
        self.toc_h2 = ParagraphStyle(name='Heading2',
                                     fontSize=12,
                                     fontName="Times-Roman",
                                     leftIndent=12)
        self.toc_h3 = ParagraphStyle(name='Heading3',
                                     fontSize=11,
                                     fontName="Times-Roman",
                                     leftIndent=24)
        self.toc_h4 = ParagraphStyle(name='Heading4',
                                     fontSize=11,
                                     fontName="Times-Roman",
                                     leftIndent=32)

        self.levelStyles = [self.toc_h1, self.toc_h2, self.toc_h3, self.toc_h4]
Example #4
0
 def __init__(self, ext):
     self.ext = re.compile(r'([^.]*)\.' + ext)
     return TableOfContents.__init__(self)
Example #5
0
 def __init__(self, ext):
     self.ext = re.compile(r'([^.]*)\.' + ext)
     return TableOfContents.__init__(self)