Skip to content

Commit a1c053c

Browse files
DOC: Technical Reference: Add table for text formatting (#3976)
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
1 parent 89044b8 commit a1c053c

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

doc/techref/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ visit the {gmt-docs}`GMT Technical Reference <reference.html>`.
1111
common_parameters.md
1212
projections.md
1313
fonts.md
14+
text_formatting.md
1415
patterns.md
1516
encodings.md
1617
environment_variables.md

doc/techref/text_formatting.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Text Formatting
2+
3+
The table below shows how text added to a plot, such as text strings added via
4+
`Figure.text`, plot title, labels of Cartesian axes and colorbars, and legend entries.
5+
Changing the font as well as its color and size in this way allows to change those
6+
only for specific characters of a longer text. The supported fonts are listed at
7+
[](/techref/fonts.md).
8+
9+
| Symbol | Behavior |
10+
| --- | --- |
11+
| @%*font*%*TEXT*@%% | Change the *font* of *TEXT* |
12+
| @;*color*;*TEXT*@;; | Change the font *color* of *TEXT* |
13+
| @:*size*:*TEXT*@:: | Change the font *size* of *TEXT* |
14+
| @-*TEXT*@- | Toggle subscripts on/off |
15+
| @+*TEXT*@+ | Toggle superscript on/off |
16+
| @#*TEXT*@# | Toggle small caps on/off |
17+
| @\_*TEXT*@\_ | Toggle underline on/off |
18+
| @!*CHAR1CHAR2* | Print two characters on top of each other (composite characters, e.g., overstrike) |
19+
| @\~*TEXT*@\~ | Toggle Greek letters on/off |
20+
| @@ | Print the @ sign |
21+
| @. | Print the ° (degree) symbol |
22+
| @s | Print letter ß |
23+
| @i | Print letter í |
24+
| @a or @A | Print letter å or Å |
25+
| @c or @C | Print letter ç or Ç |
26+
| @e or @E | Print letter æ or Æ |
27+
| @n or @N | Print letter ñ or Ñ |
28+
| @o or @O | Print letter ø or Ø |
29+
| @u or @U | Print letter ü or Ü |

0 commit comments

Comments
 (0)