From ecf9cf9d5d6783c72b5721fd4cfe9c03fe57bd0d Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 14 Sep 2023 08:27:33 +0800 Subject: [PATCH] Use :gmt-docs: instead of full links (#2682) --- doc/contributing.md | 3 +-- examples/gallery/embellishments/legend.py | 2 +- examples/gallery/lines/decorated_lines.py | 2 +- examples/gallery/lines/quoted_lines.py | 2 +- examples/gallery/symbols/patterns.py | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/contributing.md b/doc/contributing.md index 84f7930b0b0..fffc0a7bc40 100644 --- a/doc/contributing.md +++ b/doc/contributing.md @@ -456,8 +456,7 @@ Linking to the GMT documentation and GMT configuration parameters can be done us An example would be using :gmt-docs:\`makecpt.html\` to link to {gmt-docs}`makecpt.html`. For GMT configuration parameters, an example is -:gmt-term:\`COLOR_FOREGROUND\` to link to -{gmt-term}`https://docs.generic-mapping-tools.org/latest/gmt.conf#term-COLOR_FOREGROUND `. +:gmt-term:\`COLOR_FOREGROUND\` to link to {gmt-term}`COLOR_FOREGROUND`. Sphinx will create a link to the automatically generated page for that function/class/module/method. diff --git a/examples/gallery/embellishments/legend.py b/examples/gallery/embellishments/legend.py index 76ac2f000af..f2f80128b9e 100644 --- a/examples/gallery/embellishments/legend.py +++ b/examples/gallery/embellishments/legend.py @@ -9,7 +9,7 @@ with instructions for the layout of the legend items and pass it to the ``spec`` parameter of :meth:`pygmt.Figure.legend`. For details on how to set up such a file, please see the GMT documentation at -https://docs.generic-mapping-tools.org/latest/legend.html#legend-codes. +:gmt-docs:`legend.html#legend-codes`. """ # %% diff --git a/examples/gallery/lines/decorated_lines.py b/examples/gallery/lines/decorated_lines.py index c48e9f26d8a..22a8ea74fcc 100644 --- a/examples/gallery/lines/decorated_lines.py +++ b/examples/gallery/lines/decorated_lines.py @@ -12,7 +12,7 @@ For modifying the main decorated line via the ``pen`` parameter, see the :doc:`Line styles example `. For details on the input data see the upstream GMT documentation -at https://docs.generic-mapping-tools.org/latest/plot.html#s. +at :gmt-docs:`plot.html#s`. Furthermore, there are so-called *line fronts*, which are often used to plot fault lines, subduction zones, or weather fronts; for details see the diff --git a/examples/gallery/lines/quoted_lines.py b/examples/gallery/lines/quoted_lines.py index cfdc267fc31..0bde6f8bf90 100644 --- a/examples/gallery/lines/quoted_lines.py +++ b/examples/gallery/lines/quoted_lines.py @@ -11,7 +11,7 @@ For modifying the main quoted line via the ``pen`` parameter, see the :doc:`Line styles example `. For details on the input data see the upstream GMT documentation -at https://docs.generic-mapping-tools.org/latest/plot.html#s. +at :gmt-docs:`plot.html#s`. """ # %% diff --git a/examples/gallery/symbols/patterns.py b/examples/gallery/symbols/patterns.py index 4dc206ee0cf..ff419e4c089 100644 --- a/examples/gallery/symbols/patterns.py +++ b/examples/gallery/symbols/patterns.py @@ -26,7 +26,7 @@ *pattern* can either be a number in the range 1-90 or the name of a 1-, 8-, or 24-bit image raster file. The former will result in one of the 90 predefined 64 x 64 bit-patterns provided by GMT; an overview can by found at -https://docs.generic-mapping-tools.org/latest/cookbook/predefined-patterns.html. +:gmt-docs:`cookbook/predefined-patterns.html`. The latter allows the user to create customized, repeating images using image raster files. By specifying upper case **P** instead of **p** the image will be