previous   Grouping and Ungrouping ObjectsReversing a Path's Direction   next


Aligning Objects

It is only possible to align that form part of a . Objects within a group can be aligned vertically or horizontally using the sub menu Transform->Justify.

Transform->Justify->Left
Move all objects within the group so that the left edge of each object's lies along the left edge of the group's bounding box. (See Figure 8.21(b).)

Transform->Justify->Center
Move all objects within the group so that they are centered horizontally within the group's bounding box. (See Figure 8.21(c).)

Transform->Justify->Right
Move all objects within the group so that the right edge of each object's bounding box lies along the right edge of the group's bounding box. (See Figure 8.21(d).)

Transform->Justify->Top
Move all objects within the group so that the top of each object's bounding box lies along the top of the group's bounding box.

Transform->Justify->Middle
Move all objects within the group so that they are centered vertically within the group's .

Transform->Justify->Bottom
Move all objects within the group so that the bottom of each object's bounding box lies along the bottom of the group's bounding box.

Note that alignment is not recursive: if a group contains another group, the contents of the sub group will not be aligned, each element in the sub group will be moved by the same amount.

If the menu item TeX/LaTeX->Settings->Auto Adjust Anchor is selected, any that are contained in a group that is justified will automatically have their || changed. For example, in Figure 8.21 one of the objects is a text area. If the auto anchor update facility is enabled, the text area in Figure 8.21(b) will have its horizontal anchor changed to Left, in Figure 8.21(c) it will have its horizontal anchor changed to Center and in Figure 8.21(d) it will have its horizontal anchor changed to Right. Similarly, applying a vertical alignment will change the vertical anchor to one of: Top, Center or Bottom. Note that there is no way of aligning text areas along their baseline.8.3

alignex1a
(a)
alignex1b
(b)
alignex1c
(c)
alignex1d
(d)
Figure 8.21: Aligning a group consisting of three objects: (a) before; (b) left justified; (c) center justified; (d) right justified.

Tip: Sometimes you might want to center an relative to another thinner object. In this case it's better to create a || centered on the thin object that encompasses all the objects you want to justify. Include this rectangle in the group, justify, ungroup and then delete the rectangle. For example, the image shown in Figure 8.22(a) has a below the middle line. It would look better if the text was centered below the line, so I grouped the middle line and text area and justified them using Transform->Justify->Center. The result is shown in Figure 8.22(b). Although the text and line are now centered relative to each other, the line was moved to the center of the text area, not the other way round. This was not what was intended. Instead, in Figure 8.22(c), I created a new rectangle that is centered on the line. Since the line is on a tick mark and the grid lock is on, it is relatively easy to create this rectangle (much easier than trying to move the text area to manually align it). I then grouped the rectangle, the middle line and the text area and justified them using Transform->Justify->Center. The result is shown in Figure 8.22(d). The justified objects were then ungrouped and the rectangle was deleted to produced Figure 8.22(e).

alignex2a
(a)
alignex2b
(b)
alignex2c
(c)
alignex2d
(d)
alignex2e
(e)
Figure 8.22: Aligning a wider object relative to a thinner object: (a) original image; (b) middle line and text area have been grouped and justified; (c) rectangle added to original image centered on the middle line; (d) rectangle, middle line and text area have been grouped and justified; (e) justified objects have been ungrouped and the rectangle has been deleted.

See also:



Footnotes

... baseline.8.3
However it is possible that the baseline may coincide with the bottom of the text area if the text area doesn't contain any characters with descenders.

previous   Grouping and Ungrouping ObjectsReversing a Path's Direction   next