def visit_start_of_file(self, node: Element) -> None:
    self.next_section_ids.add(':doc')
    self.curfilestack.append(node['docname'])
    self.footnotestack.append(self.collect_footnotes(node))
def visit_start_of_file(self, node: Element) -> None:
    self.next_section_ids.add(':doc')
    self.curfilestack.append(node['docname'])
    self.footnotestack.append(self.collect_footnotes(node))