Copy link to clipboard
Copied
When creating a TOC, both the text and the page number link to the paragraph in the body of the document. What I need to do is change the color of only the page number in the TOC. When I create a Character format and apply it to the page number, then the hyperlink goes away for the page number (but is still active for the TOC text). How do I change only the color of the TOC page number and retain the hyperlink? For example:
TOC Text .....................PageNumber
Where I want the PageNumber to be red in color but the TOC Text, the dot leader and the PageNumber all hyperlink to the paragraph in the body text. I have tried in both Framemaker V9 and V12.
Thanks,
Bill
Copy link to clipboard
Copied
Not easily. FM uses any change in formatting (the colour in this case) to delimit the range of the hypertext range. IIRC, Rick Quatro has a script that duplicates the hypertext markers at all formatting changes in a paragraph to make it all behave seamlessly. However, you would need to have Framescript for this as well.
Copy link to clipboard
Copied
Thanks. That is the answer I was dreading (but suspecting).
Best regards,
Bill
Copy link to clipboard
Copied
> ... the answer I was dreading (but suspecting).
Well, it's not full drop dead dread. In addition to the aftermarket script that Arnis mentioned ...
You could do a hand-crafted TOC, if:
I'd start with the generated TOC.
This hand-crafted TOC will have its headings and page numbers auto-updated on Update Book. What it won't get is new entries as new headings are added elsewhere. Any deletions will throw unresolved cross-reference errors, and will be easy to find.
Copy link to clipboard
Copied
> ... the hyperlink goes away for the page number (but is still active for the TOC text).
Any change in Character Format causes the preceding hypertext Marker to terminate at the change. This was recently discussed here because it can result from any Character Format applied, such as:
TOC link with a subscript character does not work in PDF
> Where I want the PageNumber to be red in color but the TOC Text, the dot leader and the PageNumber all hyperlink to the paragraph in the body text
Even if you can work around the Marker issue, this may not be possible, as the dot leader is considered to be part of the page number, and gets the color in the quick test I did.
Copy link to clipboard
Copied
Thanks for the input.
Copy link to clipboard
Copied
As far as the original question (linking the entire TOC entry to the source location), I recommend a script that simply copies the hypertext link from the beginning of the entry to the end.
As far as the comment that "the dot leader is considered to be part of the page number, and gets the color in the quick test I did," I also did some experimenting and found that any leader dots can use a different character format than the page number as long as there is a space using the default paragraph font after the tab on the reference page. In more detail, it seems that the leader characters use the character format of the following character, not the character format of the associated tab character. Furthermore, the character format of the page number is determined by the character format of the < in the <$pagenum> building block on the reference page.
--Lynne