docs: def make_item_ref(app, env, fromdocname, item_info):
      """
      Creates a reference node for an item, embedded in a
      paragraph. Reference text adds also a caption if it exists.
  
      """
      id = item_info['target']['refid']
  
      if item_info['caption'] != '':
          caption = ', ' + item_info['caption']
      else:
          caption = ''
  
      para = nodes.paragraph()
      newnode = nodes.reference('', '')
      innernode = nodes.emphasis(id + caption, id + caption)
      newnode['refdocname'] = item_info['docname']
      try:
          newnode['refuri'] = app.builder.get_relative_uri(fromdocname,
                                                           item_info['docname'])
          newnode['refuri'] += '#' + id
      except NoUri:
          # ignore if no URI can be determined, e.g. for LaTeX output :(
          pass
      newnode.append(innernode)
      para += newnode
  
      return para