Commits

Takafumi Arakaki committed 53e90a4

Change texinfo writer: put @pxref in parentheses

  • Participants
  • Parent commits 8e57ee6

Comments (0)

Files changed (1)

sphinx/writers/texinfo.py

     def add_xref(self, id, name, node):
         name = self.escape_menu(name)
         sid = self.get_short_id(id)
-        self.body.append('@pxref{%s,,%s}' % (sid, name))
+        self.body.append('%s (@pxref{%s,,%s})' % (name, sid, name))
         self.referenced_ids.add(sid)
         self.referenced_ids.add(self.escape_id(id))
 
             id = self.escape_id(id)
             name = self.escape_menu(name)
             if name == id:
-                self.body.append('@pxref{%s,,,%s}' % (id, uri))
+                self.body.append('(@pxref{%s,,,%s})' % (id, uri))
             else:
-                self.body.append('@pxref{%s,,%s,%s}' % (id, name, uri))
+                self.body.append('%s (@pxref{%s,,%s,%s})'
+                                 % (name, id, name, uri))
         else:
             uri = self.escape_arg(uri)
             name = self.escape_arg(name)