Changing formatting between marks/codes
- This topic has 8 replies, 4 voices, and was last updated 9 years, 8 months ago by .
- You must be logged in to reply to this topic.
Learn / Forums / General InDesign Topics / Changing formatting between marks/codes
Learn / Forums / General InDesign Topics / Changing formatting between marks/codes
Tagged: find/change formatting
Need to run find/change and make the text assume the formatting between the marks/code in my index.
@8:<I>Aggression, the Crime of Crimes<$>
The text between the code needs to be italic
How do I do that for any index.
This sounds like a job for GREP Styles, something like this: https://creativepro.com/findbetween-a-useful-grep-string.php perhaps?
This is how I would write it
(?<=@8:<I>).+(?=<\$>)
(?<=@8:<I>).+?(?=<\$>)
This is better
This one worked!!!!! Thanks SO MUCH!!!!!
(?<=) is a positive lookbehind – which means it will look behind what you’re searching for but it won’t include it in the result
Inserting the text you want it to look behind would be @8:<I>
Therefore it’s
(?<=@8:<I>)
Adding .+? after this means it will select all the next lot of text zero or 1 time only
<if you only had .+ it would keep on searching right to the end>
(?=) is a positive lookahead – it will look ahead but won’t include it in the search results.
<adding in <$> wouldn’t work because $ is GREP code for finding at the end of a paragraph>
Therefore we need to “escape the $” and we do this by adding a “\”
<\$> makes it search for a $ in the text.
Resulting in
(?<=@8:<I>).+?(?=<\$>)
I would just do a find/change like this:
Interesting – that’s not working for me in CS5.5
Must move on to CC 2014 soon.
Thanks David, but it didn’t work for me. I am changing the formatting not the characters/words. The words between the <I> and <$> need to be italic and take on a style from my style guide.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies allows us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.
You have to be logged in to save.
Not a member? Join Today - it's FREE!