It sounds like GREP find and replace could work, or even a GREP style, but some more information and screen shots would be helping in figuring out the best method.
Between the 2 [ ....... ]
Use a grep style as: \[[^\[$].+\]
Sorry, I've not seen your reply!
A GREP style can format the glyphs, but it cannot format paragraph level attributes like indents, spacing or alignment, so probably is NOT the correct method here. I think it might be scriptable -- Ariel has some scripts that do similar things I think -- but it certainly is no problem to use find/change after placing the text to find either or both of the glyphs and assign the correct paragraph style.
Totally. In this case:
Replace by format: what para style you want
But, as SRiegel said, we need screenshots to delimite the problem!
Why paragraph style, but not character styles?
The problem with GREP and Nested style is that you can only apply a character style to the text, I need to apply a paragraph style. I want to auto apply my sidebar paragraph style every time the text [sidebar: sample text bla bla bal.] occurs. If I use character styles for the sidebar text would my italics drop out?
Here's a screenshot of the text: the double column text is text indent the single column text is Sidebar text
You're right! it's clearer with a screenshot!
Does it really need to happen automatically? Why not run a search that changes the paragraph style when the "[sidebar: sample text bla bla bal.]" text is found after the text is flowed in? Something like this:
If you are constantly cutting and pasting or placing the text, it would be fairly easy to script the place/find & change or paste/find & change into one key command.
Sorry, I missed Peter's #4
Here's an example of an AppleScript paste with find and change. You would edit the first two lines to reflect the search string and your desired paragraph style name:
set myidtext to "[sidebar: sample text.]" as string
set styleName to "YourParagraphStyle"
tell application "Adobe InDesign CS6"
set pStyle to paragraph style styleName
display dialog "There's no paragraph style named " & styleName & " in the active document"
set find text preferences to nothing
set change text preferences to nothing
set find what of find text preferences to myidtext
set change to of change text preferences to " "
set applied paragraph style of change text preferences to pStyle
set f to change text
Message was edited by: Rob Day
Nothing to be sorry about, and the script is a great addition.
Thanks Rob, that works perfectly! I forgot all about the change format
*Rosebud Eustace | Designer, Book Group | direct 425.629.6133 |
*becker&mayer! Books | 11120 NE 33rd Place, Suite 101, Bellevue, WA
98004Main 425.827.7120 | Fax 425.828.9659 | *