About
Shop
LaTeX
Software
Books
Gallery
News
Contact
Blog
Settings
Account
Smile for the Camera: a new cybercrime short story ebook.
Previous: Grouping and Ungrouping Objects  Up: Selecting and Editing Objects  Next: Reversing a Path's Direction  


Aligning Objects

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

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.

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

Transform->Justify->Centre
Move all objects within the group so that they are centred horizontally within the group's bounding box. (See Figure 8.28(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.28(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 centred vertically within the group's bounding box.

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.

If the Auto Adjust Anchor checkbox in the TeX Configuration Settings Dialog is selected, any text areas that are contained in a group that is justified will automatically have their anchors changed. For example, in Figure 8.28 one of the objects is a text area. If the auto anchor update facility is enabled, the text area in Figure 8.28(b) will have its horizontal anchor changed to Left, in Figure 8.28(c) it will have its horizontal anchor changed to Centre and in Figure 8.28(d) it will have its horizontal anchor changed to Right. Similarly, applying a vertical alignment will change the vertical anchor to one of: Top, Centre 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.28: Aligning a group consisting of three objects: (a) before; (b) left justified; (c) centre justified; (d) right justified.

Tip: Sometimes you might want to centre an object relative to another thinner object. In this case it's better to create a rectangle centred 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.29(a) has a text area below the middle line. It would look better if the text was centred below the line, so I grouped the middle line and text area and justified them using Transform->Justify->Centre. The result is shown in Figure 8.29(b). Although the text and line are now centred relative to each other, the line was moved to the centre of the text area, not the other way round. This was not what was intended. Instead, in Figure 8.29(c), I created a new rectangle that is centred 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->Centre. The result is shown in Figure 8.29(d). The justified objects were then ungrouped and the rectangle was deleted to produced Figure 8.29(e).

alignex2a
(a)
alignex2b
(b)
alignex2c
(c)
alignex2d
(d)
alignex2e
(e)
Figure 8.29: 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 centred 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 Objects  Up: Selecting and Editing Objects  Next: Reversing a Path's Direction  

© 2014 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs