def METHOD_NAME(self, node):
    inline = isinstance(node.parent, nodes.TextElement)
    if inline:
        self.body.append('$%s$' % node['latex'])
    else:
        self.body.extend(['\\begin{equation}',
                          node['latex'],
                          '\\end{equation}'])