def ref_catalog chapter, catalog, id
      catalog_exists? catalog
      if @report.at_css("#{catalog}").at("//*[@id='#{id}']")
        chap = @report.at_css("#{chapter}")
        if chap.at("[@idref='#{id}']").nil?
          newentry = Nokogiri::XML::Node.new("#{catalog.to_s.gsub(/s?_catalog/,'_ref')}", self.report)
          newentry["idref"] = id
          chap << newentry
        end
      else
        raise "catalog entry with id: #{id} do not exist."      
      end
    end
def ref_catalog chapter, catalog, id
      catalog_exists? catalog
      if @report.at_css("#{catalog}").at("//*[@id='#{id}']")
        chap = @report.at_css("#{chapter}")
        if chap.at("[@idref='#{id}']").nil?
          newentry = Nokogiri::XML::Node.new("#{catalog.to_s.gsub(/s?_catalog/,'_ref')}", self.report)
          newentry["idref"] = id
          chap << newentry
        end
      else
        raise "catalog entry with id: #{id} do not exist."      
      end
    end
Set reference to a catalog entry.
 e.g.: reference an author entry from authors_catalog to Chapter 2.2 QMRF authors
@example ref_catalog
  report.ref_catalog 'qmrf_authors', 'authors_catalog', 'firstauthor'
 @param [String] chapter Name of the chapter to add the catalog reference. e.g.: qmrf_authors, model_authors, QSAR_software, ...
 @param [String] catalog Name of the catalog. One of {OpenTox::QMRFReport::CATALOGS CATALOGS}.
 @param [String] id entry node in the catalog