def depart_document(self, node: Element) -> None:
    self.footnotestack.pop()
    self.curfilestack.pop()
def depart_document(self, node: Element) -> None:
    self.footnotestack.pop()
    self.curfilestack.pop()