Tgif Home
----
About Tgif
Current Release & Download
FAQ
Copyright Info
A Screendump of Tgif
Release History
Tools That Tgif Uses
Tools That Work with Tgif
Author of Tgif
Miscellaneous Info
----
 
Return to Tgif's Home Page
William Chia-Wei Cheng
(bill.cheng@acm.org)
 

Tgif FAQ - Accented & Math Characters

 
Without using XIM, how do I produce accented characters?
In text input mode, tgif uses the <ESC> key to "turn bit 7 on". ASCII character codes range from 0 through 127. In an 8-bit character representation (where bit 0 is the least significant bit), ASCII characters are considered to have bit 7 turned off. You can see the character codes using xfd. Please try the following. Do "xlsfonts | grep helvetica" and pick a font. For example, you can pick:

    -adobe-helvetica-medium-r-normal--14-100-100-100-p-76-iso8859-1
Then you can do:
    xfd -font "-adobe-helvetica-medium-r-normal--14-100-100-100-p-76-iso8859-1"
If you click on "a", you can see that it's character code is 0x61. If you divide the page displayed by xfd into 2 halves of 8 rows each and find the position corresponding to the "a" in the lower half of the page, you will find an "a" with a left-accent on top (sorry if the terminology is wrong). In tgif, in order to get a character in the bottom half, you enter an <ESC> character before the corresponding character in the top half of the map. Therefore, to get a left-accented "a", you can enter:

<ESC>a

in text mode. This also works with the Symbol font where you can get math symbols. For example, if you do:

    xfd -font "-adobe-symbol-medium-r-normal--12-*"
In order to get the ">=" symbol, you can enter:

<ESC>3
 
Using XIM, how do I produce accented characters?
There are two things you need to do.

  1. Use the following X default:
    Tgif.SingleByteInputMethod: xim
    (Please note that you must not specify Tgif.DoubleByteInputMethod as well. Otherwise, Tgif.SingleByteInputMethod will be ignored.)

    Alternative, you can start tgif with the "-sbim xim" commandline option.

  2. If your environment is not setup to use an international keyboard, you need to run the following command after your X server has started:
    setxkbmap -layout us_intl
    To see if your environment is already setup to use an international keyboard, just type the following (a single-quote followed by the letter "a") in something like an xterm:
    'a
    If you get an accented "a", then you are setup already.

To test if this is working in tgif, just start tgif, press <Cntrl>w to go into text mode and then type:

'a
and see if you get an accented "a".
 
How do I produce math and greek characters? [by Rich Shepard]
To enter Greek letters and mathematical symbols requires three things: 1) using the symbol font when entering text, 2) finding the position of the symbol/letter you want in the symbol font table and 3) translating that font table position to keystrokes that produce the desired result.

  1. When in text entry/editing mode (denoted by the presence of a wide-lined box on the figure), select from the menu: Properties -> Font -> Symbol.

  2. Using the command,
    xfd -font "-adobe-symbol-medium-r-normal--12-*"
    display the symbol font table. Locate the symbol you want in that table by noting the row and column position.

  3. Using the command,
    xfd -font 8x13
    display the font table that represents the standard, English keyboard. Find the equivalent position from step 2 (in row and column) to learn what keystrokes will enter the symbol/letter you want into the figure.

There is one more aspect of steps 2 and 3: whether the symbol/letter you want is in the upper or lower portion of the symbol font table. If the character is in the upper half of the symbol font table, enter the appropriate keystroke using the keyboard key alone or shifted. If the character is in the lower half of the symbol font table, press <ESC> before entering the keystroke(s).