To create a text area, select the text tool either by clicking on the text button or by selecting Tools->Text (Ctrl-T). Click with the left mouse button at the position where you want the text to start. This will produce a shaded area with a cursor in which you can type no more than a single line of text. Clicking inside this shaded area will move the cursor around the text area under construction.
When you want to complete a text area, either press Enter (which will start a new text area on the line below) or click anywhere on the canvas outside of the current text area (which will start a new text area at the new location). Selecting another tool whilst a text area is under construction will finish the current text area. Once a text area has been completed, the only way to edit it is via the edit text function. If you click the mouse on the location of a completed text area (while the text tool is selected) you will simply create a new overlapping text area.
Whilst a text area is under construction, you can activate the text area popup menu, illustrated in Figure 6.3. (This is usually done with a right mouse click but depends on your system. The function key F3 has the same effect.)
The text area popup menu provides the following functions:
- Copy (Ctrl-C)
- Copies selected text to the clipboard.
- Cut (Ctrl-X)
- Cuts selected text to the clipboard.
- Paste (Ctrl-V)
- Pastes text from the clipboard.
- Select All (Ctrl-A)
- Selects all the text.
- Insert Symbol... (Insert)
- Opens the Insert Symbol dialog box if you want to enter a symbol that doesn't appear on your keyboard.
The Insert Symbol dialog box (see Figure 6.4) has a field at the top which contains the text currently in the text area. If you know the hexadecimal unicode value for the character you want to insert, you can type the number into the Unicode box and press the Select button to insert it into the text area. Alternatively, you can use the scroll box on the left to select the character you want to insert in the text field. On the right hand panel below the Unicode field there is an enlarged image of the selected character.
If you intend to save your picture as a pgfpicture
environment, by default the text will be placed in the file "as
is". This means you should take care using TeX's special
characters, unless the auto escape special
characters facility is enabled. For example,
$100 will cause a problem. However, you can specify an
alternative to appear in the LaTeX file using the
edit text dialog box. Similarly, if
you select a symbol from the Insert Symbol dialog
box, you will most likely need to specify alternative text to appear
in the LaTeX file that uses the relevant command to produce the
required symbol. (For example, in Figure 6.4 the
plus or minus symbol has been selected, but this would need to be
specified as \pm in the LaTeX file, and the text would
need to be placed in maths mode.)
Note also that text in your pgfpicture environment may not look exactly the same as in Jpgfdraw due to font differences as well as the translation of LaTeX commands. See Anchor for more details.
- Text Colour
- Text Style
- Editing Text Areas
- Converting a Text Area, Text-Path or Pattern to a Path
- Splitting Text Areas
- Setting the Normal Font Size
- Automatically Escaping TeX's Special Characters
- Step-by-Step Example: An Artificial Neuron
- Step-by-Step Example: A House With No Mouse