Need help with a GREP expression
seems should easy, i've lost hours of life already. suggestions appreciated.
the type examples:
best bets weekend: this line of type, follows colon , ends in period, question mark or exclamation mark. more 1 sentance. details, page 21
this example, not precede colon. more 1 sentence, ends in period, question mark or exclamation mark. details, page 21
i need grep expression will:
-- when type begins colon precede (first example), apply "bold" character style type up-to-and-including colon. i'm defining colon precede type leading instance of colon, followed space --- occurs before sentence-ending punctuation (., ?, !).
-- not apply character style if there not colon precede (second example).
-- apply same "bold" character style last sentance in paragraph -- if sentence not end punctuation. bold-face page reference.
-- preferable incorporate functionality 1 paragraph style.
thanks help.
working memory (jus' browsing on ipad can't readily test it):
1. add grep style this:
^[^.?!]+:
and have apply bold character style.
2. add grep style:
(?<=[.!?] )[^!?.]+$
and have apply bold well.
> preferable incorporate functionality 1 paragraph style.
you can have many different grep styles want in each paragraph style. (although computer fan may start whining after fifth or so.)
More discussions in InDesign Scripting
adobe
Comments
Post a Comment