Skip to content

Use sphinx.ext.extlinks to add Sphinx roles for links to external package docs #27495

@dimpase

Description

@dimpase

We wish to link to external packages' documentation:

  • if the package documentation is installed locally in the Sage distribution, using the file link
  • in downstream packaging, using a file link appropriate for the doc installation scheme of the system (without having to patch the documentation)
  • if it is not available locally, using an http link to an online version of the package's documentation.

To this end, we use the sphinx.ext.extlinks facility, for which we already have infrastructure in sage.misc.sagedoc, assigning a Sphinx role to every external document.

We use a systematic naming scheme for these roles: :spkg_SPKG_DOC: where DOC is usually just doc but if a package has several manuals, it can be used to distinguish them.

In this ticket, we do this for the documents covered by a previous iteration of this ticket:

The location of some of the locally installed documentation files can be determined at runtime, see #27495 comment:58 for maxima.
This should probably go through sage.feature.

Related:

CC: @tobihan @kcrisman @kiwifb @embray @haraldschilly @mkoeppe @antonio-rojas @mwageringel @videlec

Component: documentation

Keywords: sd111

Issue created by migration from https://trac.sagemath.org/ticket/27495

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions