genelements.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:deviation-manual 作者: DeviationTX 项目源码 文件源码
def gather_elements(self, client, node, style):
        if isinstance(node.parent, docutils.nodes.sidebar):
            elements = [Paragraph(client.gen_pdftext(node),
                client.styles['sidebar-subtitle'])]
        elif isinstance(node.parent, docutils.nodes.document):
            #elements = [Paragraph(client.gen_pdftext(node),
                #client.styles['subtitle'])]
            # The visible output is now done by the cover template
            elements = []
            # FIXME: looks like subtitles don't have a rawsource like
            # titles do.
            # That means that literals and italics etc in subtitles won't
            # work.
            client.doc_subtitle = getattr(node,'rawtext',node.astext()).strip()
        else:
            elements = node.elements  # FIXME Can we get here???
        return elements
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号