Table of Contents inheriting underline style from hyperlink

Engaged ,
Dec 16, 2021 Dec 16, 2021

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?

TOPICS
How to

Views

66

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Dec 17, 2021 Dec 17, 2021

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

...

Likes

Translate

Translate
Adobe Community Professional ,
Dec 17, 2021 Dec 17, 2021

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. 

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 17, 2021 Dec 17, 2021

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! 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 17, 2021 Dec 17, 2021

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.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 04, 2022 Jan 04, 2022

Copy link to clipboard

Copied

LATEST

These are not text with the classic http:// structure to look for with a GREP if that's what you mean Willi.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines