def add_xref(self, id: str, name: str, node: Node) -> None:
    name = self.escape_menu(name)
    sid = self.get_short_id(id)
    if self.config.texinfo_cross_references:
        self.body.append(('@ref{%s,,%s}' % (sid, name)))
        self.referenced_ids.add(sid)
        self.referenced_ids.add(self.escape_id(id))
    else:
        self.body.append(name)
def add_xref(self, id: str, name: str, node: Node) -> None:
    name = self.escape_menu(name)
    sid = self.get_short_id(id)
    if self.config.texinfo_cross_references:
        self.body.append(('@ref{%s,,%s}' % (sid, name)))
        self.referenced_ids.add(sid)
        self.referenced_ids.add(self.escape_id(id))
    else:
        self.body.append(name)