Object Styles can utilise Paragraph Styles, but not the other way around as far as I know.
Question: What is the inline image, and it's purpose - also, what appearance are you trying to give it?
Is it possible for you to post a screen shot?
There might be another way to achieve the look you're after.
How are the inline grahics created? Is there a way in your workflow for you to assign the object style (by making it the default for graphics, for example) at the time they are created?
Hi Tony and Peter,
Thanks for your help.
The inline images are small PDF images of keys on the computer keyboard. They are placed inline whenever keyboard shortcuts are discussed in the document (a software manual.
The images tend to collide with descenders on the previous line. Here's how they look without any styling:
I could adjust the leading for the paragraph style, but this means large leading values, even in paragraphs where there are no inline images. My solution was to create an object styles for these images with a small negative Y offset, so as to drop them a bit below the baseline. Now I'd like to apply this style to all of these objects at once, rather than one by one. Here's how they look after applying my object style:
I could make this the default for graphics, which would help when I change them in the future. The problem now, however, is that there are already hundreds of them in the book. Also, not all of the graphics are within text like this. Many of them are large images that aren't inside the text flow.
There's potential her to do this with find/change, or maybe a GREP style...
You'll need to define a character style with baseline shift, then apply it to any anchored object marker in the paragraph.
For plain text you'd search for ^a or for GREP searc or a GREP style use ~a
A GREP style is a good idea, and it definitely works with "~a" (the "anchored object" code).
Seeing as your graphics are very closely cropped, you can also automatically add some white space to the left and right with an additional GREP style. Create a character style "whitespace" and set its tracking to +200. Apply this to the following GREP style:
-- you will see a bit of space appear between the previous character and the graphic, and (although not addressed in the GREP style) between the graphic and the next character as well.
1 person found this helpful
This whole exercise would work probably much better if those characters were actually glyphs - you may want to consider for the future.
There are several keyboard fonts out there, such as: http://new.myfonts.com/fonts/linotype/mac-key-caps-pi/
Or, if you wanted to use your own shapes, make your own font: http://www.fontlab.com/font-editor/typetool/
Excellent idea about the fonts. That would save an enormous amount of hassle.
I can't seem to find ANY that both look good and contain all of the keys on a modern machine, but I'll keep looking.