+
+class vrefr(nodes.Inline, nodes.TextElement):
+ pass
+
+def vrefr_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
+ latex = utils.unescape(text, restore_backslashes=True)
+ return [vrefr(latex=latex)], []
+
+def latex_visit_vrefr(self, node):
+ range = tuple(node['latex'].split(',', 1))
+ self.body.append(r'\vrefrange{%s}{%s}' % range)
+ raise nodes.SkipNode
+
+