previous   A PosterA Newspaper   next


A House With No Mouse

This example illustrates how to create and edit pictures without using the mouse.

  1. For this example I'm going to use units. To do this, use the menu mnemonics Alt-S G G. This will open up the Grid Settings dialog box shown in Figure 11.47. The Major Divisions field should already have the focus, but if not, you can do Alt-M. Set this value to 100. Press the Tab key to move to the unit . Press the b key to select bp. Press Tab or Alt-S to select the Sub-Divisions field. Set this value to 10. Then press either Enter or Alt-O to apply these settings and close the dialog box.

    gridsettings1a
    Figure 11.47: No Mouse Example--Grid Settings Dialog Box

  2. Make sure that you don't have the grid lock on as some of the co-ordinates that this example uses lie between tick marks. Shift-F2 or Alt-S G L toggles between setting the grid lock on and off.

  3. Select the ||, using either Ctrl-R or Alt-O R.

  4. The rectangle forming the main part of the house will go from (100bp, 100bp) to (250bp, 200bp). To move the mouse either press F5 or use the menu mnemonic Alt-N G. This will open up the dialog box shown in Figure 11.48. Set the x field to 100bp and the y field to 100bp. (You can use the Tab key to move to the next focusable component, or you can use Alt-X to select the x field and Alt-Y to select the y field.) Then press Enter or Alt-O.

    goto
    Figure 11.48: No Mouse Example--Go To Co-Ordinate Dialog Box

  5. Press F4 to emulate a mouse click. This will anchor the rectangle at (100bp, 100bp). Then use either F5 or Alt-N G to display the Go To dialog box. Set the x field to 250bp and the y field to 200bp. Then press Enter or Alt-O.

  6. To complete the rectangle, press either Enter or F4. (See Figure 11.49.)

    housenomouse1
    Figure 11.49: No Mouse Example--Completed Rectangle

  7. Let's make it a yellow brick house. To change the rectangle's fill colour, we first need to switch to the select tool. To do this either use Ctrl-P or use the menu mnemonic Alt-O S.

  8. To select the rectangle, use either F6 or Alt-N K.11.1 Alternatively, you can use Alt-N D which will show a dialog box with a that you can use to select an object.

  9. To change the fill colour use the menu mnemonic Alt-E H F. This will open up the dialog box shown in Figure 11.50.

    housenomouse2
    Figure 11.50: No Mouse Example--Set Fill Colour Dialog Box

  10. To select the Colour radio button, either do Alt-L or press Tab until the Colour button has the focus, and then press Space.

  11. The single colour selector will now be enabled. To change the colour to yellow, you can do one of the following: Then press Enter or Alt-O to apply the fill colour and close the dialog box (see Figure 11.51).

    housenomouse3
    Figure 11.51: No Mouse Example--Fill Colour Set

  12. Next we need to construct a triangle for the roof. The || is needed for this, so either use Ctrl+Shift-L or use the menu mnemonic Alt-O I.

  13. The triangle vertices will be at (80bp, 100bp), (175bp, 50bp) and (270bp, 100bp). Move to the first co-ordinate using either F5 or Alt-N G, and set the x field to 80bp and the y field to 100bp in the Go To... dialog box. Press Enter or Alt-O to close the dialog box and move the mouse to the required location, and press F4 to set the first vertex.

  14. Repeat the process for the second and third vertices, and press Enter to complete the path. The path will automatically close. (See Figure 11.52.)

    housenomouse4
    Figure 11.52: No Mouse Example--Completed Triangle

  15. Let's make the roof red. First switch to the select tool using either Ctrl-P or Alt-O S.

  16. Select the triangle using F6 or Alt-N K.

  17. Open the fill colour dialog box using the menu mnemonic Alt-E H F.

  18. Use Alt-L to select the Colour radio button.

  19. To set the colour to red either use the Tab key to move the focus to the red colour swatch and press Space or use Alt-R to select the RGB tab and set the Red field to 100, the Green and Blue fields to 0 and the Alpha field to 100.

  20. Press Enter or Alt-O to set the fill colour and close the dialog box. (See Figure 11.53).

    housenomouse5
    Figure 11.53: No Mouse Example--Triangle Fill Colour Set to Red

  21. Now for the windows: press Ctrl-R or use the menu mnemonic Alt-O R to select the rectangle tool.

  22. Create four rectangles using the method described above with opposing vertices at: See Figure 11.54.

    housenomouse6
    Figure 11.54: No Mouse Example--Windows Added

  23. To change the fill colour of the window rectangles, you will first need to switch to the select tool using either Ctrl-P or Alt-O S.

  24. It's more efficient to select all four of the window rectangles and change their fill colour simultaneously, rather than setting the fill colour individually. Since the four small rectangles are at the of the , pressing Shift-F6 four times will select these four rectangles.

  25. Now use the menu mnemonic Alt-E H F to set the fill colour to white, following the same process as before to produce the image shown in Figure 11.55.

    housenomouse7
    Figure 11.55: No Mouse Example--Window Fill Colour Set

  26. Now make a black rectangle with opposing corners at (160bp, 200bp) and (190bp, 160bp) using the same method as above, to produce the image shown in Figure 11.56.

    housenomouse8
    Figure 11.56: No Mouse Example--Completed House

  27. To illustrate how to move objects using the keyboard, let's now shift the house 100bp to the right and 50bp down. First make sure you are using the select tool. Then select all the objects using either Ctrl-A or Alt-E A.

  28. Then either press F7 or use the menu mnemonic Alt-E M. This will open up the dialog box shown in Figure 11.57. Set the x field to 100bp and the y field to 50bp.

    housenomouse9
    Figure 11.57: No Mouse Example--Move Dialog Box

  29. To illustrate how to edit a path using only the keyboard, let's make the roof a bit shallower. First deselect all the objects using Ctrl+Shift-A or Alt-E D.

  30. Press F6 repeatedly until the triangle is selected.

  31. To enter edit mode, use either Ctrl-I or Alt-E H E. You should now see the path in edit mode. (See Figure 11.58.)

    housenomouse10
    Figure 11.58: No Mouse Example--Edit Mode

  32. Press F6 until the highest vertex is selected.

  33. Press F3 to popup the edit path menu (Figure 11.59).

    housenomouse11
    Figure 11.59: No Mouse Example--Edit Path Menu

  34. Press Alt-R to display the dialog box shown in Figure 11.60.

    housenomouse12
    Figure 11.60: No Mouse Example--Control Point Co-Ordinates Dialog Box
    Set the y field to 120bp, and press Enter.

    Press Ctrl-I to exit edit path mode. The image should now look like Figure 11.61.

    housenomouse13
    Figure 11.61: No Mouse Example--Editing Finished

  35. To illustrate how to create a using the keyboard, let's add a label. First select the text tool using either Ctrl-T or Alt-O T.

  36. Press F5 or Alt-N G to display the Go To... dialog box. Set the x field to 200bp and the y field to 100bp.

  37. Press F4 to start the . You should now see a small pale rectangle with a cursor, as illustrated in Figure 11.62. Whilst this rectangle contains a cursor, you can type in text or press F3 to display the text area .

    housenomouse14
    Figure 11.62: No Mouse Example--Creating a New Text Area

  38. Type in the text House #1, then switch to the select tool (using Ctrl-P or Alt-O S.)

  39. The contains one of TeX's special characters, namely the hash (#) character. This will cause a problem if you want to save your image as a pgfpicture environment if the || is not enabled. If so, you will need to modify the so that it has an alternative text to be used if the image is saved in a LaTeX file. You can do this as follows:

    1. Press F6 to select the .

    2. Press Ctrl+Shift-I or Alt-E X E to display the Edit Text dialog box. Select the Different button (either Tab to it and press Space or use Alt-D.) This will enable the alternate text field. Change the text to House \#1 (Figure 11.63).

      housenomouse15
      Figure 11.63: No Mouse Example--Editing Text Area

    3. Press Enter or Alt-O to update the , and close the dialog box.

  40. It would look better if the label was centred over the house. In order to use the align function, it is necessary to group all the objects that make up the house. This is done as follows:

  41. Assuming you created all the objects in the same order as listing in this example, the should be at the front of the , then the door, the four windows, the roof and lastly the body of the house. You should still have the selected, and nothing else. If not, deselect all objects (Ctrl+Shift-A) and press F6 to select the .

  42. Press F6 to deselect the and select the next object in the (the door).

  43. Press Shift-F6 to add the next object to the selection. Keep pressing Shift-F6 until everything has been selected except the .

  44. Press Ctrl-G or Alt-T G to group the selected objects.

  45. Press Shift-F6 to add the to the selection.

  46. Press Ctrl-G or Alt-T G to group the selected objects.

  47. Use the menu mnemonic Alt-T J C to centre the objects.

  48. Press Ctrl-U or Alt-T U to ungroup the objects. The image should now look like Figure 11.64. Note that the house had to be grouped and that group then grouped with the to ensure that the individual house components maintained their position relative to each other.

    housenomouse16
    Figure 11.64: No Mouse Example--Text is Now Centred

  49. If you want to save your image as a pgfpicture environment, you will need to change the || settings to ensure that the in the LaTeX file remains centred. (Otherwise font differences may cause the text to appear slightly off centre.) To do this:

    1. Ensure that the is selected.

    2. Use the menu mnemonic Alt-E X F A H to display the Horizontal Anchor Setting dialog box.

    3. If the doesn't already have the focus, press Alt-A.

    4. Press c or use the arrow keys to set the horizontal setting to Centre.

    5. Press Enter or Alt-O to apply the settings and close the dialog box.

    (Note that you don't need to do this if the menu item TeX/LaTeX->Settings->Auto Adjust Anchor is selected as it will automatically update the anchor when you align the text area.)



Footnotes

...skip.11.1
Since there is only one object on the canvas, you could use any of the other select functions in the Navigate menu, but F6 is easier to type.

previous   A PosterA Newspaper   next