next up previous contents index
Next: Embedded grdfile format specifications Up: General features Previous: Color palette tables

                                                    
Character escape sequences

For annotation labels or textstrings plotted with pstext , GMT provides several escape sequences that allow the user to temporarily switch to the symbol font, turn on sub- or superscript, etc. within words. These conditions are toggled on/off by the escape sequence @x, where x can be one of several types. The escape sequences recognized in GMT are listed in Table 4.2.


 
Table 4.2: GMT text escape sequences
Code Effect
@~ Turns symbol font on or off
@% fontno% Switches to another font; @%% resets to previous font
@+ Turns superscript on or off
@- Turns subscript on or off
@# Turns small caps on or off
@! Creates one composite character of the next two characters
@@ Prints the @ sign itself
 

Shorthand notation for a few special Scandinavian characters has also been added (Table 4.3):    


 
Table 4.3: Shortcuts for Scandinavian characters
Code Effect
@E Æ
@e æ
@O Ø
@o ø
@A Å
@a å
 

PostScript fonts used in GMT may be re-encoded to include several accented characters used in many European languages. To access these, you must specify the full octal code $\backslash$xxx (See Appendix F). Also see the definition of (and reason for) WANT_EURO_FONT in the gmtdefaults  man page. Basically, WANT_EURO_FONT must be set to TRUE for the special characters to be available. Many characters that are not directly available by using single octal codes may be constructed with the composite character mechanism @!. Some examples of escape sequences and embedded octal codes in GMT strings:


		2@~p@~r@+2@+h@-0@- E\363tv\363s 		 = 		 2$\pi r^2h_0$
Eötvös 
10@+-3 @Angstr@om = 10-3 Ångstrøm
Se@!\304nor Gar@!\317con = Señor Garçon
A@\#cceleration@\# (ms@+-2@+) = ACCELERATION (MS-2)

The option in pstext  to draw a rectangle surrounding the text will not work for strings with escape sequences. A chart of characters and their octal codes is given in Appendix F.


next up previous contents index
Next: Embedded grdfile format specifications Up: General features Previous: Color palette tables
Paul Wessel
1999-12-03