7. Figures

Clicking the "The "Graphic" toolbar button Graphic" toolbar button displays a menu.

Figure 7-1. The Graphic menu
The Graphic menu
graphic
Insert a graphic element at caret position.
figure
Add a figure element after caret position[1].

In TEI, a p element may have a figure child element. However, this element arrangement does not make much sense. That's why the above menu entry will take great care to never add a figure inside a paragraph.

Specifying an image file

When you use any of the above menu entries, you'll be automatically prompted to specify an image file (the value of the url attribute of the newly inserted graphic element).

If, after that, you want to change this image file, please double-click the image or alternatively, right-click it and then select the "Set Graphic" entry from the contextual menu.

Figure 7-2. The contextual menu displayed by right-clicking an image (below it's just a placeholder because the image file has not yet been specified)
The contextual menu displayed by right-clicking an image placeholder

Doing this displays a dialog box letting you specify the location of an image file. This location, generally an URL relative to the location of the document being edited, is used to set the value of attribute url of the graphic element.

Figure 7-3. The dialog box letting you specify an image file
The dialog box letting you specify an image file

It's of course possible to resize an image by specifying the width, height or scale attribute of the graphic element in the Attributes tool. However the easiest way to do that is to click the image and then drag any of the red handles drawn around it.

Red handles around an image

[1] More precisely, the new figure is added after node selection (if any) or after caret, at a document location where it is valid to do so.