Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
sagemathgh-37598: Sphinx extlinks for ecl, gap, giac, maxima, meson, ppl, qepcad, scip, singular, soplex
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

We create a standard way to refer to the online manuals of these
packages, which are generated by tools other than Sphinx and therefore
cannot be linked to using Intersphinx.

This extends what has been already done with Pari.

Examples:
- [Examples in the Developer Guide](https://deploy-preview-37598--
sagemath.netlify.app/html/en/developer/sage_manuals#hyperlinks)

Fixes sagemath#27495.

Outside of the scope of this PR:
- adding such extlinks everywhere
- working with upstream projects to upgrade to better documentation
tools
- projects that can be linked to using Intersphinx; that's sagemath#37575
- any consideration how to link instead to local copies of those
manuals, whether installed from SPKG or system packages.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#37598
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe, Max Horn
  • Loading branch information
Release Manager committed Mar 29, 2024
2 parents 84ff380 + 13e15e9 commit d34787c
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 14 deletions.
60 changes: 60 additions & 0 deletions src/doc/en/developer/sage_manuals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,66 @@ by Sage, you can link toward it without specifying its full path:
- ``:mathscinet:`MR0100971```
- :mathscinet:`MR0100971`

* - :ref:`ECL <spkg_ecl>`
- ``:ecl:`Manipulating-Lisp-objects```
- :ecl:`Manipulating-Lisp-objects`

* -
- ``:common_lisp:`RENAME-PACKAGE <f_rn_pkg>```
- :common_lisp:`RENAME-PACKAGE <f_rn_pkg>`

* - :ref:`GAP <spkg_gap>`
- ``:gap:`Groups <chap39>```
- :gap:`Groups <chap39>`

* -
- ``:gap_package:`GAP package QuaGroup <quagroup/doc/chap0_mj.html>```
- :gap_package:`GAP package QuaGroup <quagroup/doc/chap0_mj.html>`

* - :ref:`Giac <spkg_giac>`
- ``:giac_cascmd:`gbasis <node280>```
- :giac_cascmd:`gbasis <node280>`

* -
- ``:giac_us:`Unary-functions```
- :giac_us:`Unary-functions`

* - :ref:`Maxima <spkg_maxima>`
- ``:maxima:`struve_h <index-struve_005fh>```
- :maxima:`struve_h <index-struve_005fh>`

* - :ref:`Meson <spkg_meson>`
- ``:meson:`install_subdir <Reference-manual_functions.html#install_subdir>```
- :meson:`install_subdir <Reference-manual_functions.html#install_subdir>`

* - :ref:`Pari <spkg_pari>`
- ``:pari:`lfungenus2```
- :pari:`lfungenus2`

* - :ref:`polymake <spkg_polymake>`
- ``:polymake:`matroid```
- :polymake:`matroid`

* - :ref:`PPL <spkg_ppl>`
- ``:ppl:`Linear_Expression <classParma__Polyhedra__Library_1_1 Linear__Expression>```
- :ppl:`Linear_Expression <classParma__Polyhedra__Library_1_1Linear__Expression>`

* - :ref:`QEPCAD <spkg_qepcad>`
- ``:qepcad:`QEPCAD: Entering formulas <user/EnterForm>```
- :qepcad:`QEPCAD: Entering formulas <user/EnterForm>`

* - :ref:`SCIP <spkg_scip>`
- ``:scip:`SCIPsolve <group__PublicSolveMethods>```
- :scip:`SCIPsolve <group__PublicSolveMethods>`

* - :ref:`Singular <spkg_singular>`
- ``:singular:`stdfglm <sing_358>```
- :singular:`stdfglm <sing_358>`

* - :ref:`SoPlex <spkg_soplex>`
- ``:soplex:`soplex::LinSolverRational <classsoplex_1_1SLinSolverRational>```
- :soplex:`soplex::LinSolverRational <classsoplex_1_1SLinSolverRational>`

**http links:** copy/pasting a http link in the documentation works. If you want
a specific link name, use ```link name <http://www.example.com>`_``

Expand Down
5 changes: 2 additions & 3 deletions src/sage/algebras/quantum_groups/quantum_group_gap.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
- Travis Scrimshaw (03-2017): initial version
The documentation for GAP's QuaGroup package, originally authored by
Willem Adriaan de Graaf, can be found at
https://www.gap-system.org/Packages/quagroup.html.
See the :gap_package:`documentation for GAP's QuaGroup package <quagroup/doc/chap0_mj.html>`,
originally authored by Willem Adriaan de Graaf.
"""

# ****************************************************************************
Expand Down
3 changes: 1 addition & 2 deletions src/sage/combinat/designs/incidence_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -1810,8 +1810,7 @@ def dual(self, algorithm=None):
REFERENCE:
- Soicher, Leonard, Design package manual, available at
https://www.gap-system.org/Manuals/pkg/design/htm/CHAP003.htm
- Leonard Soicher, :gap_package:`Design package manual <design/htm/CHAP003.htm>`
"""
if algorithm == "gap":
libgap.load_package("design")
Expand Down
4 changes: 2 additions & 2 deletions src/sage/groups/cubic_braid.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ def _richcmp_(self, other, op):
:class:`FinitelyPresentedGroupElement` (via Gap) does not terminate
in the case of more than 5 strands (not only infinite cases).
On less than 5 strands comparison is not assumed to be deterministic
(see the :issue:`33498` and section 47.3-2 of the
`Gap Reference manual <https://www.gap-system.org/Manuals/doc/ref/chap47.html>`__).
(see the :issue:`33498` and :gap:`section 47.3-2 of the
Gap Reference manual <chap47>`).
Therefore, the comparison is done via the Burau representation.
Expand Down
3 changes: 1 addition & 2 deletions src/sage/groups/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1625,8 +1625,7 @@ def structure_description(G, latex=False):
This methods wraps GAP's ``StructureDescription`` method.
For full details, including the form of the returned string and the
algorithm to build it, see `GAP's documentation
<https://www.gap-system.org/Manuals/doc/ref/chap39.html>`_.
algorithm to build it, see :gap:`GAP's documentation <chap39>`.
INPUT:
Expand Down
3 changes: 1 addition & 2 deletions src/sage/groups/matrix_gps/finitely_generated_gap.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ def module_composition_factors(self, algorithm=None):
Type ``G.module_composition_factors(algorithm='verbose')`` to get a
more verbose version.
For more on MeatAxe notation, see
https://www.gap-system.org/Manuals/doc/ref/chap69.html
For more on MeatAxe notation, see :gap:`chap69`.
"""
from sage.libs.gap.libgap import libgap
F = self.base_ring()
Expand Down
4 changes: 2 additions & 2 deletions src/sage/libs/gap/util.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ cdef initialize() noexcept:
"""
Initialize the GAP library, if it hasn't already been
initialized. It is safe to call this multiple times. One can set
:envvar:`SAGE_GAP_MEMORY` to a particular value, as desribed in
`GAP Manual <https://www.gap-system.org/Manuals/doc/ref/chap3.html>`_
:envvar:`SAGE_GAP_MEMORY` to a particular value, as described in
the :gap:`GAP Manual <chap3>`.
Specifically, the value is for `-s` and `-o` options.
TESTS::
Expand Down
16 changes: 15 additions & 1 deletion src/sage/misc/sagedoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,21 @@ def process_dollars(s):
'oeis': ('https://oeis.org/%s', 'OEIS sequence %s'),
'doi': ('https://doi.org/%s', 'doi:%s'),
'pari': ('https://pari.math.u-bordeaux.fr/dochtml/help/%s', 'pari:%s'),
'mathscinet': ('https://www.ams.org/mathscinet-getitem?mr=%s', 'MathSciNet %s')
'mathscinet': ('https://www.ams.org/mathscinet-getitem?mr=%s', 'MathSciNet %s'),
'common_lisp': ('https://www.lispworks.com/documentation/lw50/CLHS/Body/%s.htm', 'Common Lisp: %s'),
'ecl': ('https://ecl.common-lisp.dev/static/manual/%s.html', 'ECL: %s'),
'gap': ('https://docs.gap-system.org/doc/ref/%s_mj.html', 'GAP: %s'),
'gap_package': ('https://docs.gap-system.org/pkg/%s', 'GAP package %s'),
'giac_cascmd': ('https://www-fourier.ujf-grenoble.fr/~parisse/giac/doc/en/cascmd_en/%s.html', 'Giac: %s'),
'giac_us': ('https://www-fourier.ujf-grenoble.fr/~parisse/giac_us.html#%s', 'Giac API: %s'),
'maxima': ('https://maxima.sourceforge.io/docs/manual/maxima_singlepage.html#%s', 'Maxima: %s'),
'meson': ('https://mesonbuild.com/%s', 'Meson: %s'),
'polymake': ('https://polymake.org/doku.php/documentation/latest/%s', 'polymake: %s'),
'ppl': ('https://www.bugseng.com/products/ppl/documentation/user/ppl-user-1.2-html/%s.html', 'PPL: %s'),
'qepcad': ('https://www.usna.edu/CS/qepcadweb/B/%s.html', 'QEPCAD: %s'),
'scip': ('https://scipopt.org/doc/html/%s.php', 'SCIP: %s'),
'singular': ('https://www.singular.uni-kl.de/Manual/4-3-2/%s.htm', 'Singular: %s'),
'soplex': ('https://soplex.zib.de/doc/html/%s.php', 'SoPlex: %s'),
}


Expand Down

0 comments on commit d34787c

Please sign in to comment.