def _insert_pagetitle(self): """ Outputs a reference to the top of the algorithm's rst of the form ".. _algm-AlgorithmName-vVersion:", so that the page can be referenced using :ref:`algm-AlgorithmName-version`. If this is the highest version then it outputs a reference ".. _algm-AlgorithmName: instead It then outputs a title for the page """ from mantid.api import AlgorithmFactory alg_name = self.algorithm_name() version = self.algorithm_version() # page reference must come directly before the title if it wants # to be referenced without defining the link text. Here we put the # specific version one first so that it always must be referenced # using the full link text ":ref`LinkText <algm-AlgorithmName-vX>`:" self.add_rst(".. _algm-%s-v%d:\n\n" % (alg_name, version)) if AlgorithmFactory.highestVersion(alg_name) == version: self.add_rst(".. _algm-%s:\n\n" % alg_name) # title title = "%s v%d" % (alg_name, version) self.add_rst(self.make_header(title, True)) self.add_rst(u"\n.. index:: %s-v%d\n\n" % (alg_name, version))