Copy link to clipboard
Copied
I have turned some page headings into hyperlinks and applied a character style to underline them ("Hyperlink underline") via the Edit Hyperlink Dialogue box. Not all headings need a hyperlink. The underline just helps to suggest which ones do.
When making a Table of Contents, and pulling those headings in as page entries, I am assigning a new paragraph style to them, but the problem is, the character style applied at the "Edit Hyperlink" dialogue box, is honoured in the Table of Contents, and stops further styling in the Table of Contents (by GREP styles for example).
I'm surprised the ToC honours the character style like this. I guess my only option is to have two different paragraph styles for the headings – one that is underlined for when the heading is hyperlinked, and one that is not underlined for when there is no hyperlink.
Or am I missing something more fundamental?
I've used the trick of having two different paragraph styles (or more!) when I've been in your position, in the past. Sometimes I have, instead of letting the hyperlink apply the style, selected "None" in the Character Style dropdown in the Edit Hyperlink dialog. Then I've gone and applied manual local formatting that matches the hyperlink style. Then, once I've created my TOC, I simply select all and Clear Overrides on the whole TOC, which removes the local formatting I applied to the hyperlink
...Copy link to clipboard
Copied
I've used the trick of having two different paragraph styles (or more!) when I've been in your position, in the past. Sometimes I have, instead of letting the hyperlink apply the style, selected "None" in the Character Style dropdown in the Edit Hyperlink dialog. Then I've gone and applied manual local formatting that matches the hyperlink style. Then, once I've created my TOC, I simply select all and Clear Overrides on the whole TOC, which removes the local formatting I applied to the hyperlink, and allows the GREP styles etc. in the TOC paragraph styles to take over.
Copy link to clipboard
Copied
Hi Joel
thanks so much for this. I've tried a few of these workarounds but there's a couple of new ones too which I hadn't thought of. I always assume the problem is with me as InDesign is such an incredible piece of software!
Copy link to clipboard
Copied
Don't apply those styles manually in the source style. I make for the URL a GREP style. This is not drawn into the TOC.
Copy link to clipboard
Copied
These are not text with the classic http:// structure to look for with a GREP if that's what you mean Willi.