def build_flowable(self): if self['format'] == 'pdf': # rst2pdf if self.text == 'PageBreak': return rt.PageBreak(style=rt.PageBreakStyle(page_break=True)) return rt.WarnFlowable("Unsupported raw pdf option: '{}'".format( self.text)) return rt.DummyFlowable()
def build_flowable(self): if self['format'] == 'rinoh': # TODO: Flowable.from_text(self.text) if self.text.startswith('ListOfFiguresSection'): return rt.ListOfFiguresSection() elif self.text == 'ListOfTablesSection': return rt.ListOfTablesSection() elif self.text == 'ListOfFigures(local=True)': return rt.ListOfFigures(local=True) elif self.text == 'ListOfTables(local=True)': return rt.ListOfTables(local=True) return rt.WarnFlowable("Unsupported raw pdf option: '{}'".format( self.text)) elif self['format'] == 'pdf': # rst2pdf if self.text == 'PageBreak': return rt.PageBreak() return rt.WarnFlowable("Unsupported raw pdf option: '{}'".format( self.text)) return rt.DummyFlowable()