Mobile app version of vmapp.org
Login or Join
Steve758

: Is there an automatic way to replace tab and images, instead of Find and Replace in Adobe Indesign? I am writing a textbook with Adobe InDesign that has optional sections. These sections have

@Steve758

Posted in: #AdobeIndesign #TableOfContents

I am writing a textbook with Adobe InDesign that has optional sections. These sections have a tab then a flag at the right end of the tabs. I am wondering if in the TOC, how should I treat the TOC prior to refain myself to Find (the tab and image) and Replace (to styled text) at each updates of TOC?



This is the example after treatment.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Steve758

1 Comments

Sorted by latest first Latest Oldest Best

 

@Tiffany317

You can use InDesign's GREP styles for that.

First of all, create the character style "option", which is set to your needs (if it doesn't already exist).

Modify the TOC format such that a right aligned tab (y) is used before the page number instead of a usual one (t).

Then modify your TOC-entry's paragraph style (if you're using the same as the original paragraph, you need to copy the style, optionally with the original as its base) and select "GREP styles". Here, add a new entry using the "option" format to anything matching
(?<=Dt).+(?=~yd+$) (click the link for an explanation, except that we're using ~y to match the right-aligned tab instead of a regular tab). Also remove the regular tabulator position of this format!

The RegEx above will match anything that your title has after a tab. Alternatively, you can of course simply have it match (opt) (the parentheses must be -escaped in RegEx).

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme