Thoughts on factorization

Factorization is the way we try to abstract, centralize and take control of temporary invariants. Practically, this meets two basic needs of graphic designers:

    1) Doing once what there is no reason to redo.
    2) Updating/synchronizing instances, if possible from one single place.

The problem is: depending on our task, what we want to make the same and what we need to make different significantly vary. There are many levels to consider. Take a moment to think about how you factorize things in InDesign. A few examples: building a document template for future instantiations, applying a master to different pages, repeating a transformation (or a scripted process) on various objects, synchronizing stories within or between documents, preserving style settings through the composition, prototyping the XML structure of a catalog, sharing the same primary layout between different media. And so on.

As you can see, all these situations involve a key principle. Given an attribute or an action (A) that we want to apply/perform on several objects (O1, O2, O3…), the goal is to do: A × (O1 + O2 + O3...) instead of A × O1 + A × O2 + A × O3... That's factorization.

In fact, almost every feature in InDesign offers a way, a path, to factorize something. If A is a Transformation and (O1, O2, O3…) a set of page items, then we use the Transform Again Sequence Individually feature. Now if we want to lay out a set of structured data in the same way, we will probably take advantage of Data Merge, or XML workflow. Need to apply the same template, including fixed objects, to several pages or spreads? Masters will do the job. If we have to instantiate the same text at different places, depending on the context we can use Text Variables, Section Markers, maybe Cross-References, or Linked Articles. What if we need to reuse graphic resources or components between different documents? Links, Snippets, Library. Given a set of parameters that we need to manage and maintain across various objects, paragraphs, or character ranges, go to Objects Styles, Paragraph Styles, Characters Styles—and behind the scene: effects, stroke styles, swatches… Think about Layers, GREP Styles, Object States, Table Headers, Grids, Presets, Preferences… The list is endless!

Factorizing is not only about sharing temporary invariants across things, it also regards how these settings are linked to existing or future objects, what kind of modifications these objects should support relative to the master factor, whether the link is dynamic or static, whether one can update, lock, override, the original choice.

The bottom line is to provide flexibility at some level without breaking synchronization at another level. (By the way, this is probably the major issue that designers—and InDesign developers—are trying to solve today: the “Fluid Layout” challenge.)

Smart Clones

Back to concrete! Although InDesign offers obvious functionalities to replicate objects (Copy/Paste, Duplicate, Step and Repeat), a surprising fact is that we cannot easily factorize objects, in the sense of linking a prototype to several instances. Of course each master (spread) provides a ‘channel’ through which one could template and manage master objects. But this kind of factorization is dramatically rigid, in that it binds the position of each instance relative to a parent spread. Actually, this feature only allows to factorize pages and spreads in their entirety. Also, factorizing the appearance of objects is easy (thanks to Object Styles), but again this does not regard the objects in themselves, I mean: shape, size, applied transformations, content, interactivity.

In the below screenshot we see three text frames (A, B, C) that, apparently, are just independent duplicates:

Are these smart clones or simple duplicates?

My goal is to create a deep connection between these objects, considering A as the master, and (B, C) as two cloned instances that inherit from any modification applied to A. These instances could be anywhere in the active document. In some way I want them to react as if they were A's subscribers. Each time something happens to A, they must receive a full message which tells them how they have to update.

Suppose I change A's background:

Synchronizing swatch.

OK, I would have got the same feature through a common object style—you win! Then, let's change A's content too:

Synchronizing text.

Much more exciting! But since I'm talking to InDesign CS5.5 users, you probably know that such synchronization could be achieved through Linked Stories. You still won! Next, I'd like to apply a rotation angle:

Synchronizing transformation(s).

Here again, it can be argued that InDesign allows to quickly repeat transformations. You are tough opponents! But have you seen the hint in the above picture? No? Let's move one step forward by changing path points:

Synchronizing shape.

One more try? Adding a nested image:

Synchronizing nested/anchored content.

Clearly, any internal modification of the master extends to child instances. I just need to double-click in some panel to get clones updated. Also, remember that they could be anywhere in the same document, including separate spreads or separate layers. No external resource is used to get clones working as showed above.

Solving the riddle in InDesign CS5.5

Update (02/19/2012). — I thought this problem would give a headache to my readers, but I was wrong! In just a few hours, kapooostin posted the correct answer: “Place this object as anchor object inside linked story.” (See comment #3 below.)

To better understand how this trick works, let's disclose the underlying structure of our sample frame:

Underlying structure of the sample frame.

As showed above, the “Sample text” frame is in fact an ANCHORED OBJECT. Behind the scene, it is entirely nested in a parent frame (STORY CONTAINER) whose sole purpose is to host the anchor.

The anchor in itself is an invisible character, but the point is that InDesign makes it work as a fully functional reference which embodies the anchored object. For example, you could simply copy/paste the anchor character to instantly duplicate the anchored object. But there are much better things to do…

InDesign CS5.5 allows us to create one or several Linked Stories from the original STORY CONTAINER. A linked story behaves similar to a regular link. It provides a way to manage and make in sync multiple replicates of a text content in the same document. Since the special anchor character is considered a text content, the underlying anchored object also inherits the linking mechanism. This is how smart clones are built. Click the below screenshot to study how objects are connected:

Set of anchored “linked objects.”

Each instance of the “Sample text” frame is nested in a linked story which simply derives from the original container. The Links panel displays the status of these instances and, of course, if the master object is edited, the out of sync icon appears next to the group of linked stories, so you just need to double-click the icon to update the clones.

Do it yourself!

The demonstration below shows in detail how you create from scratch your own linked objects:

Smart Clone Demo


I think this technique has wonderful applications. First of all, keep in mind that linked stories consider content and disregard settings, style, effects or transformations applied to the story containers. Hence, for example, if you apply a rotation to the root container—not the anchored object!—this has no effect on linked children, so you can easily manage clones having different orientation, or scaling:

Typographic artwork easily replicated.

This provides a powerful way to create and refine from one single place a vector pattern based on symmetrical transformations, transparency effects, etc.:

Working on multiple instances from one single place!

Take note that in the above screenshot effects and transformations are not directly applied to the anchored clones—which would make the links out of sync—but only to their respective containers. When I want to change the global pattern, I just have to operate on the master object in the upper left corner of the screen.

Here is another promising application: you can put in the same root container as many anchors as you need, which allows you to manage a set of objects from one place and to produce their clones in a different arrangement, based on the specific rules applied to each container. In the following layout, a set of six images is purely cloned and arranged in two different ways. The master container—at left—has all images arranged in a single column using a custom baseline (most anchor characters are separated by forced line breaks). Meanwhile, the linked container—top center—displays the same set of pictures in two rows and adds various effects (scaling, skewing, drop shadow, blending mode).

Cloned images including various effects.

Playing with frame options, baselines, paragraph and character styles, offers many possibilities. In this specific case, I also checked “Remove Forced Line Breaks” in the Linked Story Options dialog in order to inhibit any line break entered in the master container. (Click the image to see more details.)

Have fun!