add a character style that has character color of None and apply it as a nested style (NOT Locally applied or it will not work) to the text you don't want to appear in your text.
Can't seem to make it work.
Invisible Text will remain invisible in the table of contents! Can't seem to override character styles at all!
Ah, Wrong alarm!
I accidentaly applied the invisible character style directly onto the text.
I still had to modify the nested style of the table of contents to get the font size right, but now it works! Thanks fpr your help!
Still trying to figure out how to hide text from the table of contents though...
Sorry, missed the second part of the question. I think the only way to do that is to use invisible "dummy" text of some sort, and if you're going to do it for some entries, you might as will do it for all.
One of the easiest ways is to put the text you want inthe TOC into an anchored frame attached to the actual heading in the text (so it moves along with it). Use a unique paragraph style for this text, and include this style, not the one applied to the headings inthe text, to make the TOC. I usually use a character color of red to make it satnd oout so I don't forget it's there, and the position on the page isn't really critical. Select the anchored frame, open the Attributes panel and make it non-printing. You'll see it in editing mode, the TOC will pick it up (as will variables, if required) but it will disappear on output.
Actually, now that I think about it a bit more, there's really no reason you can't use a nested style in the same way to hide text in the TOC listings, as long as the trigger is present in the text (so you'd need to enter end nested character style here markers in the running text, if that's the only trigger that will work). In addition to a charracter color of none you might have to reduce the size of the"invisible" text to .1 pt, and maybe scale it to 1% as well so it uses nearly no space, but this would only work with relatively short hidden strings, and probably not at all if you want to use tab leaders because even invisible that text will occupy space on the line.
So you mean I should have two text frames per picture:
- One hidden text frame for the table of contents
- One visible textframe for the captions
That should work out! Even though I was hoping that I could avoid this!
reply to Peter Spier, 11.11.2013 16:32
I've been playing around with nested invisible text styles and it turned out to be quite complicated. Also theres always a liitle blank space left in the TOC. So I definitely prefer the solution with the hidden text frame!
Thanks for your help!