Beispiel #1
0
    def apply(self, **kwargs):
        # type: (Any) -> None
        if self.app.builder.name != 'latex':
            return

        matcher = NodeMatcher(nodes.container, literal_block=True)
        for node in self.document.traverse(matcher):  # type: nodes.container
            newnode = captioned_literal_block('', *node.children, **node.attributes)
            node.replace_self(newnode)
Beispiel #2
0
    def apply(self):
        # type: () -> None
        if self.app.builder.name != 'latex':
            return

        for node in self.document.traverse(nodes.container):
            if node.get('literal_block') is True:
                newnode = captioned_literal_block('', *node.children, **node.attributes)
                node.replace_self(newnode)
Beispiel #3
0
    def apply(self, **kwargs):
        # type: (Any) -> None
        if self.app.builder.name != 'latex':
            return

        matcher = NodeMatcher(nodes.container, literal_block=True)
        for node in self.document.traverse(matcher):
            newnode = captioned_literal_block('', *node.children,
                                              **node.attributes)
            node.replace_self(newnode)
Beispiel #4
0
    def apply(self):
        # type: () -> None
        if self.app.builder.name != 'latex':
            return

        for node in self.document.traverse(nodes.container):
            if node.get('literal_block') is True:
                newnode = captioned_literal_block('', *node.children,
                                                  **node.attributes)
                node.replace_self(newnode)
Beispiel #5
0
 def run(self, **kwargs: Any) -> None:
     matcher = NodeMatcher(nodes.container, literal_block=True)
     for node in self.document.findall(matcher):  # type: nodes.container
         newnode = captioned_literal_block('', *node.children,
                                           **node.attributes)
         node.replace_self(newnode)