Relationships Between Items
Page-layout programs like QuarkXPress are designed so that you can put a number of text and picture objects on a page. That's the whole point. And anytime you have more than one object on a page, you're going to be concerned about the relationships between those objects. For instance, if you have a block of text and a picture next to it, you probably have an idea about how you want those two items to relate: Do they align on their left edges? Are they centered next to each other? Should the picture always follow the text?
Curiously, some page-layout software developers don't understand this fundamental element of page layout, and they haven't included tools for handling these relationships in their programs. Fortunately for us, however, Quark does understand.
In this section I talk about controlling relationships between items: layering, grouping, constraining, and, finally, their position on the page relative to other page elements.
Layering Items
QuarkXPress, like most desktop publishing programs, handles multiple objects on a page by layering them. Each page item (picture box, text box, contentless box, text path, or line) is always on a higher or lower layer than the other page items. This is also called a stacking order. This is generally an intuitive approach to working with page elements; it's just what you would do if each of the objects were on a little piece of paper in front of you. When you're placing objects on your page, you work from the bottom of the stacking order up. The first object you place is the bottom-most object, the second object is on top of it, and so on.
If none of your page elements touch or overlap one another, then layering has almost no relevance to you. However, when they do touch or overlap in some way, you want to be able to control which objects overlap which. The primary methods for controlling the stacking order are the Bring to Front and Send to Back commands in the Item menu.
Bring to Front and Send to Back function as sweeping controls, moving a selected object all the way to the back or all the way to the front layer. When you hold down the Option key while selecting the Item menu, the Send to Back and Bring to Front items become Send Backward and Bring Forward. (Note that these are always visible in Windows, so you don't have to hold down a modifier key.) Note that you can also use the function keys to move things up and down through layers (see Table 3-4).
Table 3-4. Layering keystrokes
PRESS ... |
TO ... |
F5 |
Bring to Front |
Shift-F5 |
Send to Back |
Option-F5 (Ctrl-F5) |
Bring Forward |
Shift-Option-F5 (Shift-Ctrl-F5) |
Send Backward |
For even more control over how your objects stack up, you can also create multiple layers in the Layers palette; I discuss that in "The Layers Palette," later in this chapter.
Grouping Objects
Objects on a page are rarely lone creatures. Often, they like to bunch together to form single units, like organic cells grouping to form a vital organ in your body. Similarly, you can create groups of page items. A group of objects can include any number of boxes and/or lines. When you select one member of the group with the Item tool, the whole group gets selected. Or, you can select and modify individual members of the group with the Content tool. Here's what you do.
- Using the Item or Content tool, select the items you want grouped. You can hold down the Shift key to select multiple items. Or, you can drag a marquee over or around the objects (any object that the marquee touches is selected).
- Select Group from the Item menu or press Command-G (Ctrl-G).
It's that easy. When the group is selected with the Item tool, a dotted line shows the bounding box of the grouped objects (see Figure 3-52).
To ungroup the objects, select the grouped object with the Item tool and select Ungroup from the Item menu (or press Command-U or Ctrl-U).
Modifying Grouped Objects
As I mentioned above, once you have grouped a set of objects, you can still modify each of them using the Content tool. Just select the element and change it. Each item can be rotated, resized, or edited just as usual. To move a single object in a grouped selection, hold down the Command (Ctrl) key to get a temporary Item tool. Then move the object where you want it and release the Command (Ctrl) key.
The group Modify dialog box. QuarkXPress lets you do some pretty nifty things with grouped items. If you select Modify from the Item menu (or press Command/Ctrl-M, or double-click on the group with the Item tool), QuarkXPress gives you a special Modify dialog box for the group. Which controls you see in this Modify dialog box depends on whether every object in a group is the same type of object (all rules, all text boxes, or whatever).
Some features in this group Modify dialog box are always available, like Origin Across and Origin Down, which determine the upper-left corner of the bounding box for the whole group. Angle, too, sets the rotation for the group, as though the group were a single object.
If you change a value in the group Modify dialog box, you change that value for every one of the objects in the group. For example, if you specify a background color for the grouped objects, the background color is applied to all the boxes and lines in the group. If you set the Picture Angle to 20 degrees for a group of picture boxes, the items in each of the picture boxes are rotated within their boxes (see Chapter 9, Pictures).
You can turn on the Suppress Printout option for a group of mixed objects, and each of the objects in the group has its Suppress Printout check-box turned on. Similarly, you can add or change the frame around a group of objects, as long as they're all boxes. If you later ungroup the objects, the settings you made while they were grouped remain.
Note that if you have any lines (rules) in the group, changing the background color of the group affects the color of the line itself.
There's one rule that applies to modifying groups of objects that I still can't figure out: You can't open the Modify dialog box for a group of objects when one group is nested inside another. You have to ungroup the objects, and regroup them individually. Strange.
Scaling groups. The engineers at Quark snuck a little feature into the program without much ado: the ability to scale groups of objects. I'm surprised they were so quiet about it, as it's a wonderful step forward. But it's not quite a leap forward yet—you'll see why in a moment.
To scale several objects at once, you first have to group them. Next, you can drag one of the group's corner or side handles. When you let go, all the objects in the group are scaled proportionally. There are, as always, a few options you can take advantage of.
- If you hold down the Command (Ctrl) key when you drag, any content (text and pictures) inside boxes or lines within the group is also scaled.
- If you hold down Option (or Alt) and Shift when you drag, the group is scaled proportionally. (Again, add the Command or Ctrl key to scale the contents proportionally, too.)
- If you only hold down the Shift key, the group is constrained into a square (not particularly useful, but it's good to know the option is there).
-
You can type values in the height or width fields in the Measurements palette. This forces the whole group to fit within that size. For example, if you need to fit three picture boxes within a 10-centimeter column, you could type "10 cm" in the width field. Of course, it's easy to scale the items disproportionately when you do this (see "Tip: Proportional Resizing by the Numbers," earlier in this chapter). Also, note that this scales the boxes, but not their contents.
Remember that you can scale by a percentage by using XPress's built-in math functions. For instance, if you want each item in the group to be 130-percent larger, type "*1.3" after the current width and height values.
The ability to scale groups was added to QuarkXPress 4 almost as an afterthought, and sadly, this limited feature didn't get any better in XPress 5 or 6. There are a number of features that XPress doesn't scale when you scale a group and its contents, such as the values for Space Before, Indent, Rule Above, and so on. These may be bugs, but they just shore up my opinion that XPress needs a real scaling tool, much like those offered in some of the XTension packages, like Gluon's ProScale.
Constraining
Ten years ago, if you asked a QuarkXPress user what one feature they would have sold their grandmother to get rid of, they would invariably have said, "Parent-and-child boxes." Back in versions 1 and 2 of XPress, these parent-and-child boxes made it nearly impossible to be flexible with page design because boxes became "trapped" inside other boxes. These constraints were actually rather useful and accessible when you got accustomed to them. But there were many times when what I really needed was a choice of whether to enable it or not. Parent-and-child constraints are still in QuarkXPress, but thank goodness they are now an option rather than a rule.
Let's be clear here for those not familiar with this feature. I'm not talking about the type of constraining that people usually talk about (and that I've mentioned earlier in this chapter) that refers to holding down the Shift key to constrain the movement of an object to a 45- or 90-degree angle. This is a different sort of constraint.
Parent-and-child box constraints remind me of a baby's playpen (this is probably some leftover childhood trauma, but I don't want to go into it). A playpen is basically a box that is a structure in its own right. However, you can place objects (or babies) into it, and they can't get out unless you physically take them out.
Similarly, a parent box is a text or picture box that has certain structural constraints so that any items that are created or placed inside its boundaries ("child" items) can't easily get outside those boundaries. Imagine a text box that was specified as a parent box. It acts as a normal text box. However, when you draw a line inside it using one of the Line tools, that line cannot be moved or resized to extend outside the text box. The only way you can get it out is by cutting it and pasting it elsewhere.
I know it sounds awful, but, as I said, there are some great applications. For example, building a table by adding vertical and horizontal rules to a text box is aided if those rules don't slip away when you move the box (child items always move with their parents). Also, if you have a specific area in which all items must remain, creating a parental constraint makes sure that you don't accidentally mess up your specifications when your eyes are bleary at three in the morning.
You can create parent-and-child box constraints in two ways: automatic constraints and manual constraints. Let's look at each of these.
Automatic constraints. Automatic constraints were the standard for early versions of QuarkXPress. With automatic constraints on, all picture and text boxes act as parent constraint boxes. You can turn automatic constraints on and off by checking the Auto Constraint box in the Preferences dialog box. You can turn on Auto Constraint when every box you create is to be a parent or a child box, and then turn it off to create "normal" boxes and items.
Note that the parent box and the child items are grouped when you select them with the Item tool. To unconstrain these items, see "Manual constraints," below.
Manual constraints. If you prefer, you can apply your own parent-and-child box constraints to a set of objects by manually constraining them. It's easy to do.
- Make sure the page elements you want to be child items are totally within the boundaries of the box you want to be the parent box.
- Make sure the soon-to-be-parent box is behind each of the objects that are soon to be constrained. Parent boxes must be on a lower layer than their children. You can think of the playpen analogy: the playpen must be under—and surrounding—the child.
- Select and group the child and parent objects and boxes (see "Modifying Grouped Objects," earlier in this chapter).
- Select Constrain from the Item menu.
Those objects that are on top of the parent box and that are in that group are constrained to the boundaries of the parent box.
You can unconstrain this group of objects by clicking on the parent-and-child group with the Item tool and selecting either Unconstrain or Ungroup from the Item menu. Unconstrain removes the constraints, but leaves the items grouped. Ungroup removes both the grouping and constraining specifications. (You can't have parent-and-child constraints without grouping.)
Aligning and Distributing Objects
Before I knew how cool the Space/Align feature was, I simply didn't know how badly I needed it. Now I use it all the time; once you know about it, you probably will, too. Space/Align is, in some ways, the control center for setting up object relationships on your page. Let's look at why.
The whole idea of Space/Align is to move page items around to create certain relationships between them. The tools you have to work with are Between, Space, and Distribute Evenly. Here's what you do.
- Select all the items that you want to relate to one another. For instance, if you want two items to align along their left edges, select both of them.
- Select Space/Align from the Item menu and determine the nature of the relationship. Are you trying to align the objects vertically or horizontally? Or both? Turn on the appropriate checkboxes in the dialog box.
- Decide whether you want to align or distribute the objects. I'll talk about the difference in just a moment. If you're aligning the objects, select Space and enter the amount of space you want between the items; if you're distributing them, select Distribute Evenly.
- Tell QuarkXPress what part of the objects you want to align or distribute. For example: the left edges of two boxes, or the tops of a few lines, or the centers of five mixed items.
Starting with the second step, let's take a look at each of these.
Vertical/Horizontal. If you select some objects, then choose Space/Align from the Item menu (or press Command-comma or Ctrl-comma), you'll see the Space/Align Items dialog box (see Figure 3-53). This dialog box is broken down into Horizontal and Vertical sections, and you can use one or the other—or both—by clicking their respective checkboxes.
Figure 3-53 The Space/Align dialog box
Space. Enabling the Space control (by clicking the radio button in front of it) lets you align objects. The value in the Space field determines how far apart the objects should align. A value of zero (which is the default) means "align exactly." For example, let's say you want to line up the left edges of two boxes. If you specify "0p" as the Space value, the left edge of the first box is at the same place as the left edge of the second box. If you specify "5p" as the Space value, the left edge of the first box is placed 5 picas from the left edge of the second box (see Figure 3-54).
Figure 3-54 Horizontal spacing with Space/Align
But which box moves? The top-most or left-most items always stay stationary; they are the reference points for alignment. Other page elements move to align with them.
As I said, I use alignment all the time. If I have four text boxes that I want to line up on their right edges, I no longer have to draw guides or figure measurements. Now, I just select them all and align their right edges with Space set to zero.
Distribute Evenly. Let's say you have three picture boxes and you want the space between them to be equal. It could take nigh-on forever to figure out exactly where to move the middle box so that you've got equal space on each side. Instead, you can let the Distribute Evenly feature do it for you. I find distribution helpful when I have a number of items that are all the same size, but are scattered around the page (see Figure 3-55).
Figure 3-55 Distribute Evenly with Space/Align
Distribute Evenly always takes the left-most and right-most, or the topmost and bottom-most, page elements that you have selected (depending on whether you're aligning vertically, horizontally, or both) and uses them as the distribution boundaries. In other words, those objects don't move, but all the other objects that you selected do move.
Between. The last step in the process outlined above is figuring out what part of the objects you want to align or distribute. Your choices are the edges (Top, Bottom, Right, and Left), the Center, and the object itself (called Item). You choose any one of these by selecting it from the Between popup menu. Of course, the Horizontal section only lets you choose Left Edges, Right Edges, or Centers, while the Vertical section only lets you choose Top Edges, Bottom Edges, or Centers.
The concept of aligning or distributing objects based on Item is sometimes confusing to people. Item refers to the bounding box of the page element. So, for example, horizontally aligning two text boxes with Space set to zero and Between set to Item results in the right side of one being aligned with the left side of the second. Another way to say this is that there is zero space between the items.
And note that I said this is based on the bounding box of the object, which is the smallest rectangle that can enclose the entire object. This may result in alignment that you might not expect, especially when you're working with rotated or oddly shaped Bézier picture boxes. Typically, when you're distributing objects, you'll use Item as the Between setting.
If you have multiple objects on a page, and you want to center all of them on top of each other, you can apply both a vertical and a horizontal alignment to them, with Centers selected in the Between popup menu, and Space set to zero.
Figure 3-56 First baseline to bottom of picture box