7

I'm trying to somehow set InDesign object style for images that I add into text frame directly so they flow along with text when I edit content. My document is of technical nature so it has a single text frame per page. It's more of technical document really.

This are my requirements:

  • images need to break text block apart, so text won't flow over/around them
  • images need to centrally aligned in the text frame regardless of their width
  • images have to move with text (hence they are pasted into)
  • images have a description that must never break to next page
  • images have to align to the last baseline gridline just above description so description always appears it's positioned exactly the same space after image (upper margin will therefore vary but should be at least one leading high) - By last baseline I mean if an images occupies few line-heights (leadings), bottom of the image frame should align exactly with the last line and not somewhere in between.

I'm heaving great difficulty creating my object style to accomplish this. The main problem being positioning images exactly on the last baseline grid.

2
  • 1
    This is definitely a tough one. That last part is the hardest. Commented Jan 28, 2011 at 16:15
  • @MikeNGarrett: Tough one yes. But can it be solved? Commented Jan 31, 2011 at 10:57

2 Answers 2

5

You can do this.

I've tested the following in CS5 and 5.5, but the technique should work at least as far back as CS3, when iirc Object Styles were first introduced.

So, in sequence:

  1. To get started, set up a Paragraph Style of "Image", which is set to align to grid and centered. First line, all lines, doesn't matter. The paragraph will only contain one line.

  2. Set up a paragraph style called "Description." In Keep Options, check "Keep With Previous."

  3. Edit the "Image" paragraph style, to add "Next Style: Description." (This isn't essential, but it makes things quicker later.)

  4. Paste your first image into its own paragraph, and set the style to "Image."

  5. Set the anchored image options to "Inline or Above Line" and choose the "Inline" radio button. The Y offset should be 0. The bottom of the image will now be sitting on a baseline. The top of the image will be below the last line of the previous paragraph.

  6. Select the image and Alt/Option-Click the new style icon in the Object Styles panel. Call this "Image" and give it a keyboard shortcut. Activate the Paragraph Styles checkbox, and "Use Next Style" in the associated Paragraph Styles dialog. Select the "Anchored Object Options" checkbox, and verify those settings.

  7. You're all set. You can now paste an inline image into its own paragraph, assign the "Image" object style using the keyboard shortcut, and press Enter/Return to create the next paragraph, which will have a paragraph style of "Description" assigned automatically. (If you are working on existing text, select the image and the description and right-click the "Image" paragraph style in the Paragraph Styles panel, then choose "Apply Image then Next Style" from the context menu.)

At this point you have an image that won't have any text flowing around it, with a description that will never break to the next page without taking the image with it.

2
  • 1
    I think your idea of simple is different than mine—this does take seven steps after all—but +1 for actually finding a way to make this work. Well played. Commented May 18, 2011 at 14:42
  • 2
    LOL! I did qualify it as "fairly" simple. Once you've created a style or two, it's a very simple process that you can show someone in a few seconds, and they get it. Explaining those steps in a written list, unambiguously, makes it seem (even to me) much harder. Once the initial work is done, though, it's a walk in the park to use what you've set up, which is why I threw in the "extra credit" stuff about "Next Style" and keyboard shortcuts. Commented May 18, 2011 at 22:25
1
+100

I don't think you'll be able to accomplish this through styles alone with those last two bullets being a requirement.

For one, object styles don't have a setting for anything having to do with the grid except when working with a text frame, and even then relative-to-grid settings only deal with the top of the frame which won't be of much help. Second, you could place the image frame in the text flow and apply a paragraph, but then a paragraph style aligns to a grid by the first line or all lines, but nothing in between.

If dodging repetitive work is the goal here, then the only thing I can think of would be to create an object library that has the objects you need and some hooks for automation (like an applied label on the backend) and write up a script that will then go through the document, find the objects, and fix the layout "automagically" after you have finished populating your document. That's no small feat, and even with the most robust automatic layout systems, someone still has to go in a tweak layouts manually if layout quality is even a vague concern.

I suggest either relaxing your layout requirements or handle this manually as you do your layout. It's a drag no matter how I look at this but that's also why a lot of us have jobs.

3
  • That's what I was afraid of. I came to the same conclusion, but I hoped someone else might have a better answer. Commented Jan 31, 2011 at 21:08
  • From a software development standpoint, I don't feel it is reasonably possible to have the functionality the OP describes in the styles functionality of an application. Those are some pretty specific use-cases, as I see it. Commented Feb 1, 2011 at 15:58
  • Au contraire, there is a fairly simple way to accomplish this. See below. Commented May 17, 2011 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.