Skip to content

DOC: Technical Reference: Add table for text formatting #3976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/techref/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ visit the {gmt-docs}`GMT Technical Reference <reference.html>`.
common_parameters.md
projections.md
fonts.md
text_formatting.md
patterns.md
encodings.md
environment_variables.md
Expand Down
21 changes: 21 additions & 0 deletions doc/techref/text_formatting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Text Formatting

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 |
| --- | --- |
| @%*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 |
| @@ | Print the @ sign |
| @. | Print the degree symbol |
Loading