Exemple #1
0
 def visit_footnote_reference(self, node):
     self.open_moin_page_node(
         moin_page.note(attrib={moin_page.note_class: u'footnote'}))
     new_footnote = moin_page.note_body()
     self.open_moin_page_node(new_footnote)
     self.footnotes[node.children[-1]] = new_footnote
     node.children = []
Exemple #2
0
    def _FootNote_repl(self, args, text, context_block):
        if not args:
            # return a minimal note elem to indicate explicit footnote placement
            elem = moin_page.note()
            return elem

        text = args
        text = self.macro_text(
            text)  # footnotes may have markup, macro_text is likely overridden
        elem_body = moin_page.note_body(children=text)
        attrib = {moin_page.note_class: 'footnote'}
        elem = moin_page.note(attrib=attrib, children=[elem_body])

        if context_block:
            return moin_page.p(children=[elem])
        return elem
Exemple #3
0
 def inline_footnote_repl(self,
                          stack,
                          footnote,
                          footnote_begin=None,
                          footnote_text=None,
                          footnote_end=None,
                          footnote_start=None):
     # stack.top_check('emphasis'):
     if footnote_begin is not None:
         stack.push(
             moin_page.note(attrib={moin_page.note_class: 'footnote'}))
         stack.push(moin_page.note_body())
     elif footnote_end is not None:
         stack.pop()
         stack.pop()