From 34e15f69e150c2c88215a1029b29c3425a1f27c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Sun, 15 Jun 2025 19:18:18 +0200 Subject: [PATCH 01/15] Add table for text formating --- doc/techref/index.md | 1 + doc/techref/text_formatting.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 doc/techref/text_formatting.md diff --git a/doc/techref/index.md b/doc/techref/index.md index 76ef1e1432d..9d6367ac055 100644 --- a/doc/techref/index.md +++ b/doc/techref/index.md @@ -11,6 +11,7 @@ visit the {gmt-docs}`GMT Technical Reference `. common_parameters.md projections.md fonts.md +text_formatting.md patterns.md encodings.md environment_variables.md diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md new file mode 100755 index 00000000000..8beb89977fb --- /dev/null +++ b/doc/techref/text_formatting.md @@ -0,0 +1,18 @@ +# GMT text formatting + +The table below shows how text added via :meth:`Figure.text` as well as labels of colorbars +and Cartesian axis can be formatted. + +| Symbol | Behavior | +| --- | --- | +| @%*font*%*text*@%% | Change the font | +| @;*color*;*text*@;; | Change the font color | +| @:*size*:*text*@:: | Change the font size | +| @-*text*@- | Toggle subscripts on/off | +| @+*text*@+ | Toggle superscript on/off | +| @#*text*@# | Toggle small caps on/off | +| @_*text*@_ | Toggle underline on/off | +| @!*char1char2* | Print two characters on top of each other (composite characters, e.g., overstrike) | +| @\~*text*@\~ | Toggle Greek letters on/off | +| @@ | Print the @ sign | +| @. | Print the degree symbol | From ae405df5a1b6af6015442825b39d60c74c6d4f4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Sun, 15 Jun 2025 19:58:02 +0200 Subject: [PATCH 02/15] Use upper case letters in heading --- doc/techref/text_formatting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md index 8beb89977fb..c586250f96d 100755 --- a/doc/techref/text_formatting.md +++ b/doc/techref/text_formatting.md @@ -1,4 +1,4 @@ -# GMT text formatting +# GMT Text Formatting The table below shows how text added via :meth:`Figure.text` as well as labels of colorbars and Cartesian axis can be formatted. From 96690f6c25b4a25a5fb3105a91af02eb3ab11c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Sun, 15 Jun 2025 19:58:54 +0200 Subject: [PATCH 03/15] Remove execution permission --- doc/techref/text_formatting.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 doc/techref/text_formatting.md diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md old mode 100755 new mode 100644 From 51946afd3cd63fb3b975f632441f8e729d98b1ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Sun, 15 Jun 2025 20:02:47 +0200 Subject: [PATCH 04/15] Shorten formulation --- doc/techref/text_formatting.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md index c586250f96d..be0ebb5d430 100644 --- a/doc/techref/text_formatting.md +++ b/doc/techref/text_formatting.md @@ -1,7 +1,6 @@ # GMT Text Formatting -The table below shows how text added via :meth:`Figure.text` as well as labels of colorbars -and Cartesian axis can be formatted. +The table below shows how text as well as labels of colorbars and Cartesian axis can be formatted. | Symbol | Behavior | | --- | --- | From 5d3e55eae8bb566ec0c3bba44c564b09017ba7ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Sun, 15 Jun 2025 20:07:52 +0200 Subject: [PATCH 05/15] Use UNIX line endings --- doc/techref/text_formatting.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md index be0ebb5d430..74d1cc122e9 100644 --- a/doc/techref/text_formatting.md +++ b/doc/techref/text_formatting.md @@ -1,17 +1,17 @@ -# GMT Text Formatting - -The table below shows how text as well as labels of colorbars and Cartesian axis can be formatted. - -| Symbol | Behavior | -| --- | --- | -| @%*font*%*text*@%% | Change the font | -| @;*color*;*text*@;; | Change the font color | -| @:*size*:*text*@:: | Change the font size | -| @-*text*@- | Toggle subscripts on/off | -| @+*text*@+ | Toggle superscript on/off | -| @#*text*@# | Toggle small caps on/off | -| @_*text*@_ | Toggle underline on/off | -| @!*char1char2* | Print two characters on top of each other (composite characters, e.g., overstrike) | -| @\~*text*@\~ | Toggle Greek letters on/off | -| @@ | Print the @ sign | -| @. | Print the degree symbol | +# GMT Text Formatting + +The table below shows how text as well as labels of colorbars and Cartesian axis can be formatted. + +| Symbol | Behavior | +| --- | --- | +| @%*font*%*text*@%% | Change the font | +| @;*color*;*text*@;; | Change the font color | +| @:*size*:*text*@:: | Change the font size | +| @-*text*@- | Toggle subscripts on/off | +| @+*text*@+ | Toggle superscript on/off | +| @#*text*@# | Toggle small caps on/off | +| @_*text*@_ | Toggle underline on/off | +| @!*char1char2* | Print two characters on top of each other (composite characters, e.g., overstrike) | +| @\~*text*@\~ | Toggle Greek letters on/off | +| @@ | Print the @ sign | +| @. | Print the degree symbol | From 17f3e8d4638cf70bd010cc5e7413ca04fcc1a785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Mon, 16 Jun 2025 12:10:00 +0200 Subject: [PATCH 06/15] Add more docs --- doc/techref/text_formatting.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md index 74d1cc122e9..6edbd1d87eb 100644 --- a/doc/techref/text_formatting.md +++ b/doc/techref/text_formatting.md @@ -1,6 +1,10 @@ # GMT Text Formatting -The table below shows how text as well as labels of colorbars and Cartesian axis can be formatted. +The table below shows how text add to a plot as well as labels of colorbars and +Cartesian axes can be formatted. Changing the font as well as its color and size +in this way allows to change those only for specific words of a longer text. The +supported fonts are listed at [](/techref/fonts.md). For Greek letters, is there +any official list for the assignment ??? . | Symbol | Behavior | | --- | --- | From 3da7c5383e5486ae2d18dfe35349a72a839e78ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Tue, 17 Jun 2025 16:32:56 +0200 Subject: [PATCH 07/15] Improve word Co-authored-by: Dongdong Tian --- doc/techref/text_formatting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md index 6edbd1d87eb..fce4162d6b5 100644 --- a/doc/techref/text_formatting.md +++ b/doc/techref/text_formatting.md @@ -2,7 +2,7 @@ The table below shows how text add to a plot as well as labels of colorbars and Cartesian axes can be formatted. Changing the font as well as its color and size -in this way allows to change those only for specific words of a longer text. The +in this way allows to change those only for specific characters of a longer text. The supported fonts are listed at [](/techref/fonts.md). For Greek letters, is there any official list for the assignment ??? . From e8006109c339fad0e7317ac702f48d2d7bc9a48d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Tue, 17 Jun 2025 20:01:59 +0200 Subject: [PATCH 08/15] Remove docs --- doc/techref/text_formatting.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md index fce4162d6b5..3df9969e01d 100644 --- a/doc/techref/text_formatting.md +++ b/doc/techref/text_formatting.md @@ -3,8 +3,7 @@ The table below shows how text add to a plot as well as labels of colorbars and Cartesian axes can be formatted. Changing the font as well as its color and size in this way allows to change those only for specific characters of a longer text. The -supported fonts are listed at [](/techref/fonts.md). For Greek letters, is there -any official list for the assignment ??? . +supported fonts are listed at [](/techref/fonts.md). | Symbol | Behavior | | --- | --- | From 7af82b5f7f1cbebec33fc36cdfda31a3277cf480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Wed, 18 Jun 2025 23:13:59 +0200 Subject: [PATCH 09/15] Escape underscores Co-authored-by: Dongdong Tian --- doc/techref/text_formatting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md index 3df9969e01d..d0fa362802c 100644 --- a/doc/techref/text_formatting.md +++ b/doc/techref/text_formatting.md @@ -13,7 +13,7 @@ supported fonts are listed at [](/techref/fonts.md). | @-*text*@- | Toggle subscripts on/off | | @+*text*@+ | Toggle superscript on/off | | @#*text*@# | Toggle small caps on/off | -| @_*text*@_ | Toggle underline on/off | +| @\_*text*@\_ | Toggle underline on/off | | @!*char1char2* | Print two characters on top of each other (composite characters, e.g., overstrike) | | @\~*text*@\~ | Toggle Greek letters on/off | | @@ | Print the @ sign | From 697f5a330f8a37fdab493b0d1c08916b67d38711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Thu, 19 Jun 2025 09:46:15 +0200 Subject: [PATCH 10/15] Update heading Co-authored-by: Dongdong Tian --- doc/techref/text_formatting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md index d0fa362802c..3a56755b2d5 100644 --- a/doc/techref/text_formatting.md +++ b/doc/techref/text_formatting.md @@ -1,4 +1,4 @@ -# GMT Text Formatting +# Text Formatting The table below shows how text add to a plot as well as labels of colorbars and Cartesian axes can be formatted. Changing the font as well as its color and size From c63034295e3d71bd21e5a502e51213b2b3909e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Sat, 21 Jun 2025 21:21:34 +0200 Subject: [PATCH 11/15] Fix typo --- doc/techref/text_formatting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md index 3a56755b2d5..383f7d239ec 100644 --- a/doc/techref/text_formatting.md +++ b/doc/techref/text_formatting.md @@ -1,6 +1,6 @@ # Text Formatting -The table below shows how text add to a plot as well as labels of colorbars and +The table below shows how text added to a plot as well as labels of colorbars and Cartesian axes can be formatted. Changing the font as well as its color and size in this way allows to change those only for specific characters of a longer text. The supported fonts are listed at [](/techref/fonts.md). From 9bfcd72bc442cb224264f28af6bd7cb684d3bde5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Sat, 21 Jun 2025 22:19:19 +0200 Subject: [PATCH 12/15] Use line length --- doc/techref/text_formatting.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md index 383f7d239ec..34bc67979a0 100644 --- a/doc/techref/text_formatting.md +++ b/doc/techref/text_formatting.md @@ -1,9 +1,9 @@ # Text Formatting The table below shows how text added to a plot as well as labels of colorbars and -Cartesian axes can be formatted. Changing the font as well as its color and size -in this way allows to change those only for specific characters of a longer text. The -supported fonts are listed at [](/techref/fonts.md). +Cartesian axes can be formatted. Changing the font as well as its color and size in this +way allows to change those only for specific characters of a longer text. The supported +fonts are listed at [](/techref/fonts.md). | Symbol | Behavior | | --- | --- | From 1e509016a74d83d1aff9e28c734af80d0adfe60b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Sun, 22 Jun 2025 09:04:29 +0200 Subject: [PATCH 13/15] Mention title and legend --- doc/techref/text_formatting.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md index 34bc67979a0..acfac6859fa 100644 --- a/doc/techref/text_formatting.md +++ b/doc/techref/text_formatting.md @@ -1,9 +1,10 @@ # Text Formatting -The table below shows how text added to a plot as well as labels of colorbars and -Cartesian axes can be formatted. Changing the font as well as its color and size in this -way allows to change those only for specific characters of a longer text. The supported -fonts are listed at [](/techref/fonts.md). +The table below shows how text added to a plot as well as the title of the plot and +labels of colorbars, Cartesian axes, and legend entries can be formatted. Changing +the font as well as its color and size in this way allows to change those only for +specific characters of a longer text. The supported fonts are listed at +[](/techref/fonts.md). | Symbol | Behavior | | --- | --- | From 24ff9220a4efb37774d71cad0c9d2f0d97968eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Sun, 22 Jun 2025 10:18:01 +0200 Subject: [PATCH 14/15] Improve readablity Co-authored-by: Dongdong Tian --- doc/techref/text_formatting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md index acfac6859fa..71916c375ae 100644 --- a/doc/techref/text_formatting.md +++ b/doc/techref/text_formatting.md @@ -8,7 +8,7 @@ specific characters of a longer text. The supported fonts are listed at | Symbol | Behavior | | --- | --- | -| @%*font*%*text*@%% | Change the font | +| @%*font*%*TEXT*@%% | Change the *font* of *TEXT* | | @;*color*;*text*@;; | Change the font color | | @:*size*:*text*@:: | Change the font size | | @-*text*@- | Toggle subscripts on/off | From 6360e89b549a6f8ee83172cb06bfaafdb7469853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= Date: Sun, 22 Jun 2025 17:11:50 +0200 Subject: [PATCH 15/15] Use upper-case to improve readability --- doc/techref/text_formatting.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/techref/text_formatting.md b/doc/techref/text_formatting.md index 71916c375ae..5bad9440f3d 100644 --- a/doc/techref/text_formatting.md +++ b/doc/techref/text_formatting.md @@ -9,13 +9,13 @@ specific characters of a longer text. The supported fonts are listed at | Symbol | Behavior | | --- | --- | | @%*font*%*TEXT*@%% | Change the *font* of *TEXT* | -| @;*color*;*text*@;; | Change the font color | -| @:*size*:*text*@:: | Change the font size | -| @-*text*@- | Toggle subscripts on/off | -| @+*text*@+ | Toggle superscript on/off | -| @#*text*@# | Toggle small caps on/off | -| @\_*text*@\_ | Toggle underline on/off | -| @!*char1char2* | Print two characters on top of each other (composite characters, e.g., overstrike) | -| @\~*text*@\~ | Toggle Greek letters on/off | +| @;*color*;*TEXT*@;; | Change the font *color* of *TEXT* | +| @:*size*:*TEXT*@:: | Change the font *size* of *TEXT* | +| @-*TEXT*@- | Toggle subscripts on/off | +| @+*TEXT*@+ | Toggle superscript on/off | +| @#*TEXT*@# | Toggle small caps on/off | +| @\_*TEXT*@\_ | Toggle underline on/off | +| @!*CHAR1CHAR2* | Print two characters on top of each other (composite characters, e.g., overstrike) | +| @\~*TEXT*@\~ | Toggle Greek letters on/off | | @@ | Print the @ sign | | @. | Print the degree symbol |