Cloning and Syncing Objects in ID CS5.5
February 18, 2012 | Extras | en | fr
Factorization is a profound paradigm in graphic design. Of course designers want to focus on newness, and they hate repeat what is already done. But this is a hard battle, because their work is mainly about pattern, analogy, iteration, derivation, and update, so they often have to deal with reusing the same stuff in a different way. Let's go further on this subject.
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:
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:
OK, I would have got the same feature through a common object style—you win! Then, let's change A's content too:
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:
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:
One more try? Adding a nested image:
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:
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:
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:
Applications
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:
This provides a powerful way to create and refine from one single place a vector pattern based on symmetrical transformations, transparency effects, etc.:
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).
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!
Comments
Hello! I'd say Smart Objects, but I don't know if they are available in ID...
@PECourtejoie
“Smart Objects” is basically a Photoshop feature. Of course you can place a PSD file in InDesign and address the original Photoshop layer(s) from within the app, which indirectly allows you to benefit from the underlying smart objects. But a native InDesign object (or layer) cannot be 'smart' in that sense—unfortunately!
Try again ;-)
Marc
Place this object as anchor object inside linked story.
@kapooostin
CONGRATS! YOU WON :-)
It's a bit frustrating to me that you found the solution so quickly, but I knew Indiscripts' readers were very cunning. Your answer is correct.
Now we need to expend further on preparing the master object, syncing the clones through the Links panel, and exploring interesting applications of this technique. Rest of my article coming soon…
@+
Marc
Thank you! You've left several hints in your article, so it was amazing I found the answer earlier than anyone else.
The idea itself is great. Linking objects inside InD is already very promising. And we can add context changes (because we are dealing with an anchor), i.e. position to spine and size and rotation of containing frame.
> And we can add context changes (because we are dealing with
> an anchor), i.e. position to spine and size and rotation
> of containing frame.
Yes ;-) And even SCALING of containing frame(s), which allows to manage smart clones having a different size relative to the master…
Yep. I'll looking forward to use it in the upcoming project :)
I do not have CS5.5, but I do have a solution for CS5 or CS4 which also works most probably in CS3 or 2: See the video that proves it here:
http://dl.dropbox.com/u/2009516/sam...
Greets, Stibi
@Stibi
Brilliant!!!
Do you use a Table Header or something?
@+
Marc
sure, that's a table header. The graphics are scalable and you can rotate or mirror them as you like.
Do I get a special price for the solution for all those without CS5.5 ? ;-)
Stibi, great job! May be you'll get dome benefits from Marc =)
Well, it's fair to reward Stibi for her killer trick, I agree.
@Stibi
As a “special price” we'll offer you a PRO script from your choice. Tell me which.
@+
Marc
Passionnant !
En plus je découvre cette nouvelle fonction d'ID CS_5.5, les "articles liés".
Peut-être même qu'ils vont m'être bien utile dans le cas d'onglets par exemple : un objet identique, mais dont le positionnement varie au fil du livre :)
Merci Marc, vos articles sont toujours riches d'enseignement pour moi.
Hi,
I used the sample javacript "ScriptMenuAction.jsx" to create a custom menu.
When i Quit and reopen Indesign, menu script was not working.
please help us.
Hi Ramki,
Are you sure you've posted your message into the right topic? The 'ScriptMenuAction' script seems more related to this page:
http://www.indiscripts.com/post/201...
@+
Marc
Bonjour,
un big problem avec Xml et ObjectStyle. Je n'arrive pas à faire en sorte qu'au moment de l'importation d'un Xml dans des blocs ayant un ObjectStyle appliqué, celui ci soit rspecté 100%. En effet la justification verticale et autres attributs fonctionnent mais pas celui de Style de parragraphe et suivant.
Je voudrais que les style de ¶ soient appliqué par le StyleObjet et ne pas avoir a le definir dans mon Xml (via tags).
Je sais que ce n'est pas facile de décrire le probleme par ecrit et ose vous l'exposer car personne n'arrive à me répondre. J'ai même trouvé un post de qq'un qui a le même problème: http://forums.adobe.com/message/479...
Je vous remercie bcp et apprécis énormément votre travail.
Cordialement
Patryck Aguilar
I would be very interested in a way to have synchronized strokes. Let's say I have two identical strokes, one is parent stroke, and the other is a child stroke. I want the points and the handles on the stroke to stay synchronized, but be able to apply different stroke styles to each stroke (and have the appearance stay independent). So if I move or add a point on the parent stroke, the same changes to the points and handles would happen in the child stroke.
I guess I could compare it to the behavior of the appearance panel in Illustrator, where you can have multiple strokes on a single object.
I'm not sure how it would be possible, but I thought I'd throw it out there as something of interest, as it is kind of along the same lines as this blog post.
Great article! I learned some new tricks.
Ok, I get how to do this, but I'm trying to do even more complex (I believe). I'm not sure if it's possible, but here is the situation:
Working on different files, I'd like to have the text update the changes automatically in all files, but also be able to add + to the style (I want some story aligned right and others left in the same page). Duplicating styles would not be practical because the different stories have a lot of different styles in them.
I tried using InCopy export, but it does not allow changing the alignment of the text without updating all files...
Hopefully someone knows a solution!