From 7b0066add48aaab87a8b57db54774c6308df0cc8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 11 Mar 2024 20:36:16 -0700 Subject: [PATCH 1/8] src/sage/misc/sagedoc.py: Add extlinks for Giac, Maxima, Pari, PPL, Singular manuals --- src/doc/en/developer/sage_manuals.rst | 24 ++++++++++++++++++++++++ src/sage/misc/sagedoc.py | 8 +++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/doc/en/developer/sage_manuals.rst b/src/doc/en/developer/sage_manuals.rst index 578419384c7..4708f2ee36e 100644 --- a/src/doc/en/developer/sage_manuals.rst +++ b/src/doc/en/developer/sage_manuals.rst @@ -131,6 +131,30 @@ by Sage, you can link toward it without specifying its full path: - ``:mathscinet:`MR0100971``` - :mathscinet:`MR0100971` + * - :ref:`Giac ` + - ``:giac_cascmd:`gbasis ``` + - :giac_cascmd:`gbasis ` + + * - + - ``:giac_us:`Unary-functions``` + - :giac_us:`Unary-functions` + + * - :ref:`Maxima ` + - ``:maxima:`struve_h ``` + - :maxima:`struve_h ` + + * - :ref:`Pari ` + - ``:pari:`lfungenus2``` + - :pari:`lfungenus2` + + * - :ref:`PPL ` + - ``:ppl:`Linear_Expression ``` + - :ppl:`Linear_Expression ` + + * - :ref:`Singular ` + - ``:singular:`stdfglm ``` + - :singular:`stdfglm ` + **http links:** copy/pasting a http link in the documentation works. If you want a specific link name, use ```link name `_`` diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py index 61cabbd1e79..f4a7d6a8a66 100644 --- a/src/sage/misc/sagedoc.py +++ b/src/sage/misc/sagedoc.py @@ -513,7 +513,13 @@ 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'), + '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: '), + 'ppl': ('https://www.bugseng.com/products/ppl/documentation/user/ppl-user-1.2-html/%s.html', 'PPL: %s'), + 'singular': ('https://www.singular.uni-kl.de/Manual/4-3-2/%s.htm', 'Singular: %s'), + } From e10a7258b89a37c4189e4f7dacfd004a254d9812 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 16 Mar 2024 16:00:56 -0700 Subject: [PATCH 2/8] src/doc/en/developer/sage_manuals.rst, src/sage/misc/sagedoc.py: Add :gap:, :gap_package: roles --- src/doc/en/developer/sage_manuals.rst | 8 ++++++++ src/sage/misc/sagedoc.py | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/doc/en/developer/sage_manuals.rst b/src/doc/en/developer/sage_manuals.rst index 4708f2ee36e..38f3728c7da 100644 --- a/src/doc/en/developer/sage_manuals.rst +++ b/src/doc/en/developer/sage_manuals.rst @@ -131,6 +131,14 @@ by Sage, you can link toward it without specifying its full path: - ``:mathscinet:`MR0100971``` - :mathscinet:`MR0100971` + * - :ref:`GAP ` + - ``:gap:`Groups ``` + - :gap:`Groups ` + + * - + - ``:gap_package:`guava``` + - :gap_package:`guava` + * - :ref:`Giac ` - ``:giac_cascmd:`gbasis ``` - :giac_cascmd:`gbasis ` diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py index f4a7d6a8a66..d4cfa976462 100644 --- a/src/sage/misc/sagedoc.py +++ b/src/sage/misc/sagedoc.py @@ -514,6 +514,8 @@ def process_dollars(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'), + 'gap': ('https://gap-system.org/Manuals/doc/ref/%s_mj.html', 'GAP: %s'), + 'gap_package': ('https://www.gap-system.org/Packages/%s.html', '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: '), From eb5757c27fbceab100e493361ba0787a89636adb Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 16 Mar 2024 19:36:52 -0700 Subject: [PATCH 3/8] src/doc/en/developer/sage_manuals.rst, src/sage/misc/sagedoc.py: Add :ecl:, :common_lisp:, :qepcad: roles --- src/doc/en/developer/sage_manuals.rst | 12 ++++++++++++ src/sage/misc/sagedoc.py | 3 +++ 2 files changed, 15 insertions(+) diff --git a/src/doc/en/developer/sage_manuals.rst b/src/doc/en/developer/sage_manuals.rst index 38f3728c7da..91288714fe5 100644 --- a/src/doc/en/developer/sage_manuals.rst +++ b/src/doc/en/developer/sage_manuals.rst @@ -131,6 +131,14 @@ by Sage, you can link toward it without specifying its full path: - ``:mathscinet:`MR0100971``` - :mathscinet:`MR0100971` + * - :ref:`ECL ` + - ``:ecl:`Manipulating-Lisp-objects``` + - :ecl:`Manipulating-Lisp-objects` + + * - + - ``:common_lisp:`RENAME-PACKAGE ``` + - :common_lisp:`RENAME-PACKAGE ` + * - :ref:`GAP ` - ``:gap:`Groups ``` - :gap:`Groups ` @@ -159,6 +167,10 @@ by Sage, you can link toward it without specifying its full path: - ``:ppl:`Linear_Expression ``` - :ppl:`Linear_Expression ` + * - :ref:`QEPCAD ` + - ``:qepcad:`QEPCAD: Entering formulas ``` + - :qepcad:`QEPCAD: Entering formulas ` + * - :ref:`Singular ` - ``:singular:`stdfglm ``` - :singular:`stdfglm ` diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py index d4cfa976462..885ae907b81 100644 --- a/src/sage/misc/sagedoc.py +++ b/src/sage/misc/sagedoc.py @@ -514,12 +514,15 @@ def process_dollars(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'), + '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://gap-system.org/Manuals/doc/ref/%s_mj.html', 'GAP: %s'), 'gap_package': ('https://www.gap-system.org/Packages/%s.html', '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: '), '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'), 'singular': ('https://www.singular.uni-kl.de/Manual/4-3-2/%s.htm', 'Singular: %s'), } From 5250624eb6a24fe7cb1f47850ba9ee9d68e87360 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 16 Mar 2024 20:32:27 -0700 Subject: [PATCH 4/8] src/doc/en/developer/sage_manuals.rst, src/sage/misc/sagedoc.py: Add :meson:, :polymake:, :scip:, :soplex: roles --- src/doc/en/developer/sage_manuals.rst | 18 +++++++++++++++++- src/sage/misc/sagedoc.py | 7 +++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/doc/en/developer/sage_manuals.rst b/src/doc/en/developer/sage_manuals.rst index 91288714fe5..002d3a56cc6 100644 --- a/src/doc/en/developer/sage_manuals.rst +++ b/src/doc/en/developer/sage_manuals.rst @@ -159,22 +159,38 @@ by Sage, you can link toward it without specifying its full path: - ``:maxima:`struve_h ``` - :maxima:`struve_h ` + * - :ref:`Meson ` + - ``:meson:`install_subdir ``` + - :meson:`install_subdir ` + * - :ref:`Pari ` - ``:pari:`lfungenus2``` - :pari:`lfungenus2` + * - :ref:`polymake ` + - ``:polymake:`matroid``` + - :polymake:`matroid` + * - :ref:`PPL ` - - ``:ppl:`Linear_Expression ``` + - ``:ppl:`Linear_Expression ``` - :ppl:`Linear_Expression ` * - :ref:`QEPCAD ` - ``:qepcad:`QEPCAD: Entering formulas ``` - :qepcad:`QEPCAD: Entering formulas ` + * - :ref:`SCIP ` + - ``:scip:`SCIPsolve ``` + - :scip:`SCIPsolve ` + * - :ref:`Singular ` - ``:singular:`stdfglm ``` - :singular:`stdfglm ` + * - :ref:`SoPlex ` + - ``:soplex:`soplex::LinSolverRational ``` + - :soplex:`soplex::LinSolverRational ` + **http links:** copy/pasting a http link in the documentation works. If you want a specific link name, use ```link name `_`` diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py index 885ae907b81..7c04c1b3ffe 100644 --- a/src/sage/misc/sagedoc.py +++ b/src/sage/misc/sagedoc.py @@ -520,11 +520,14 @@ def process_dollars(s): 'gap_package': ('https://www.gap-system.org/Packages/%s.html', '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: '), + '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'), } From 2b9ba8afd5995c326c8c02e2b631e747b90168f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Mon, 18 Mar 2024 09:56:26 -0700 Subject: [PATCH 5/8] src/sage/misc/sagedoc.py: Update gap manual URL Co-authored-by: Max Horn --- src/sage/misc/sagedoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py index 7c04c1b3ffe..180c54db9c8 100644 --- a/src/sage/misc/sagedoc.py +++ b/src/sage/misc/sagedoc.py @@ -516,7 +516,7 @@ def process_dollars(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://gap-system.org/Manuals/doc/ref/%s_mj.html', 'GAP: %s'), + 'gap': ('https://docs.gap-system.org/doc/ref/%s_mj.html', 'GAP: %s'), 'gap_package': ('https://www.gap-system.org/Packages/%s.html', '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'), From ca1d5251fd110f35ab60177e03c3e358d134c712 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 19 Mar 2024 19:54:29 -0700 Subject: [PATCH 6/8] src/doc/en/developer/sage_manuals.rst, src/sage/misc/sagedoc.py: Update :gap_pkg: --- src/doc/en/developer/sage_manuals.rst | 4 ++-- src/sage/misc/sagedoc.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/doc/en/developer/sage_manuals.rst b/src/doc/en/developer/sage_manuals.rst index 002d3a56cc6..1c541d61e1c 100644 --- a/src/doc/en/developer/sage_manuals.rst +++ b/src/doc/en/developer/sage_manuals.rst @@ -144,8 +144,8 @@ by Sage, you can link toward it without specifying its full path: - :gap:`Groups ` * - - - ``:gap_package:`guava``` - - :gap_package:`guava` + - ``:gap_package:`GAP package QuaGroup ``` + - :gap_package:`GAP package QuaGroup ` * - :ref:`Giac ` - ``:giac_cascmd:`gbasis ``` diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py index 180c54db9c8..ead9037253f 100644 --- a/src/sage/misc/sagedoc.py +++ b/src/sage/misc/sagedoc.py @@ -517,7 +517,7 @@ def process_dollars(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://www.gap-system.org/Packages/%s.html', 'GAP package %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'), From bcb5c8af7d79cb298010129ef4562755ac8f2f93 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 19 Mar 2024 20:08:08 -0700 Subject: [PATCH 7/8] Use :gap:, :gap_package: roles --- src/sage/algebras/quantum_groups/quantum_group_gap.py | 5 ++--- src/sage/combinat/designs/incidence_structures.py | 3 +-- src/sage/groups/cubic_braid.py | 4 ++-- src/sage/groups/generic.py | 3 +-- src/sage/groups/matrix_gps/finitely_generated_gap.py | 3 +-- src/sage/libs/gap/util.pyx | 4 ++-- 6 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/sage/algebras/quantum_groups/quantum_group_gap.py b/src/sage/algebras/quantum_groups/quantum_group_gap.py index 0c92355503c..997fe0f3b04 100644 --- a/src/sage/algebras/quantum_groups/quantum_group_gap.py +++ b/src/sage/algebras/quantum_groups/quantum_group_gap.py @@ -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 `, +originally authored by Willem Adriaan de Graaf. """ # **************************************************************************** diff --git a/src/sage/combinat/designs/incidence_structures.py b/src/sage/combinat/designs/incidence_structures.py index 839006798a0..5d622672e43 100644 --- a/src/sage/combinat/designs/incidence_structures.py +++ b/src/sage/combinat/designs/incidence_structures.py @@ -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 + - Soicher, Leonard, :gap_package:`Design package manual ` """ if algorithm == "gap": libgap.load_package("design") diff --git a/src/sage/groups/cubic_braid.py b/src/sage/groups/cubic_braid.py index e2b49edf867..9dd59e069f9 100644 --- a/src/sage/groups/cubic_braid.py +++ b/src/sage/groups/cubic_braid.py @@ -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 `__). + (see the :issue:`33498` and :gap:`section 47.3-2 of the + Gap Reference manual `). Therefore, the comparison is done via the Burau representation. diff --git a/src/sage/groups/generic.py b/src/sage/groups/generic.py index 206e8561e5a..9d41dd49d3f 100644 --- a/src/sage/groups/generic.py +++ b/src/sage/groups/generic.py @@ -1611,8 +1611,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 - `_. + algorithm to build it, see :gap:`GAP's documentation `. INPUT: diff --git a/src/sage/groups/matrix_gps/finitely_generated_gap.py b/src/sage/groups/matrix_gps/finitely_generated_gap.py index 5dd566a96c2..14bf551789f 100644 --- a/src/sage/groups/matrix_gps/finitely_generated_gap.py +++ b/src/sage/groups/matrix_gps/finitely_generated_gap.py @@ -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() diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx index 8685dc08fa5..81df83a6e0d 100644 --- a/src/sage/libs/gap/util.pyx +++ b/src/sage/libs/gap/util.pyx @@ -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 `_ + :envvar:`SAGE_GAP_MEMORY` to a particular value, as described in + the :gap:`GAP Manual `. Specifically, the value is for `-s` and `-o` options. TESTS:: From 13e15e9db03eee9b6636ebf7d4a963d296dfc1cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Mon, 25 Mar 2024 16:28:26 -0700 Subject: [PATCH 8/8] Update src/sage/combinat/designs/incidence_structures.py --- src/sage/combinat/designs/incidence_structures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/combinat/designs/incidence_structures.py b/src/sage/combinat/designs/incidence_structures.py index 5d622672e43..79c95d2c4fb 100644 --- a/src/sage/combinat/designs/incidence_structures.py +++ b/src/sage/combinat/designs/incidence_structures.py @@ -1810,7 +1810,7 @@ def dual(self, algorithm=None): REFERENCE: - - Soicher, Leonard, :gap_package:`Design package manual ` + - Leonard Soicher, :gap_package:`Design package manual ` """ if algorithm == "gap": libgap.load_package("design")