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@usc.edu)
 

Tgif FAQ - Superscripts & SubScripts

 
How do I use the superscript/subscript feature in tgif-4.x?
The best way to explain this is probably with an example. So, here are the step to create the single text object in the tgif screendump page.

  1. So the goal is to create a single text object that looks like the following:

    image of the final equation

  2. Set font to Times, set text size to 14, set text justification to left, and set color to black.

  3. Enter text drawing mode, click on the canvas, and enter the first line of the text:

    "The partial balance condition is satisfied if,"

  4. Highlight the words "partial balance" by <Btn1> click on the left side of "p" and <Shift><Btn1> click on the right side of the "e". (<Btn1> is the left mouse button on a right-handed mouse.)

  5. Select the "blue" color from the Color Menu. Click anywhere else on the canvas so you can see that the highlighted text has changed its color to blue.

  6. Click anywhere inside the text object again to continue editing it. Press the <End> key on your keyboard to move the text cursor to the end of the line you have created. Press the Carriage Return or <Enter> key on your keyboard to begin a new line within the same text object.

  7. Enter the second line of the text:

    "for any class c and any state x in A(n), where n >= 0,"

  8. Make the "any" bold by double-clicking on "any" and select Bold from the TextStyle Menu. Make the "c" italic by double-clicking on "c" and select Italic from the TextStyle Menu. Make the tail of the text italic by <Btn1> click on the left side of "x" and pressing <Shift><End> on your keyboard and select Italic from the TextStyle Menu. Double-click on "where" and select Roman from the TextStyle Menu.

  9. Three things are wrong with the 2nd line now. The "in" should be replaced by a mathematical symbol, "A" needs a subscript, and ">=" should be replaced by a mathematical symbol.

  10. The correct symbol for "in" is <ESC>N. (Please consult Tgif's Accented & Math Characters FAQ Page to see what you need to do.) Double-click on "in", select Symbol from the Font Menu, and press the <ESC> key followed by the uppercase "N".

  11. The correct symbol for ">=" is <ESC>3. Highlight ">=", select Symbol from the Font Menu, and press the <ESC> key followed by "3".

  12. Click on the right side of "A". Select InsertRightSubscript() from the Text Submenu of the Edit Menu. Enter "c".

    Before you get out of the subscript, try pressing the <DownArrow> key on your keyboard a few times while holding down the <Cntrl> key. You can see that the text cursor is moving between the supscript and the subscript in the same text block!

  13. Press the <RightArrow> key a few times to get out of the subscript. Press the <End> key and press <Enter> to get us to the 3rd line.

  14. Set font to Symbol, set text size to 24, and set text style to italic.

  15. Enter the second line of the text:

    "p(x)Sq(x,y) = Sp(y)q(y,x)"

    You have have something like the following:

    image of the partially done equation

  16. The x's and the y's are pretty simple to fix. Just select them individually and change their font to Times and their text style to BoldItalic. The q's and the parantheses are also easy to fix. Just select them individually and change their font to Times.

  17. Double-click on the first summation symbol and change its text size to 34 and color to "red". Select the second summation symbol and chage its text size to 34 and color to "blue". Since the procedures for both of the summation symbols are pretty much the same, I'll just describe what to do with the red one.

  18. Double-click on the red summation symbol and select InsertCenterSubscript() from the Text Submenu of the Edit Menu. Please note the "InsertCenterSubscript" menu item is only activated if you have a highlighted a simple string (that is, a string having one font, one size, one style, and one color).

  19. Change font to Times and enter the second line of the text:

    "y in A(n+1)"

    Turns out the font size is too big here. Press the <Home> key and then press the <Shift><End> key and then select 14 from the TextSize Menu. Please notice that the <Home> and the <End> keys operate within the subscript here. Please also try pressing the <Cntrl><DownArrow> are few times to see the movement of the text cursor. In this case, the text block consists of the superscript, the subscript, and the summation symbol.

  20. Change the "y" to BoldItalic. Change "in" and add the subscript according to steps 10 and 12 above.

  21. Do the same for the blue summation symbol and you are almost done. The only thing left to do is to remove the wide spacing between the 2nd and the 3rd line.

  22. The reason there is such a large gap between the 2nd and the 3rd line is that there is a hidden superscript for the summation symbols. What we want to do here is to raise the 3rd line so that the hidden superscript overlaps with the 2nd line.

  23. Now, click at the beginning of the 3rd line and select InsertVerticalOffset() from the Text Submenu of the Edit Menu. Enter "-24" when prompted. This moves the 3rd line up by 24 pixels.

  24. Click anywhere outside the text object and you are done!
When I move the text cursor with the cursor keys on my keyboard, it moves right through a block of text that contains superscript/subscript text. How can I move the text cursor into the superscript or subscript part of the text?
If you position the text cursor immediately to the left of such a block and press the <Cntrl><RightArrow> keys on your keyboard, the text cursor will be moved into the superscript part of the text.

Similarly, if you position the text cursor immediately to the right of such a block and press the <Cntrl><LeftArrow> keys on your keyboard, the text cursor will be moved into the superscript part of the text.

Once you are inside a superscript/subscript part of a text object, pressing the <Cntrl><DownArrow> keys moves the text curosr between the superscript and the subscript.