Compiler warnings when multiple TOCs

Discussions about Help+Manual 9

Moderators: Alexander Halser, Tim Green

Post Reply
KerryPenver
Posts: 9
Joined: Thu Jun 08, 2023 11:40 am

Compiler warnings when multiple TOCs

Unread post by KerryPenver »

I have a second table of contents in my project which includes a small subset of the main manual.
When I publish it to CHM I get lots of warnings about links to topics that are not included in the build. However those links are from topics not included in the table of contents I'm publishing, so why do I see them ? Could they be auto included topics because they are referenced from other topics I do have in my subset TOC ?
User avatar
Tim Green
Site Admin
Posts: 23189
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Compiler warnings when multiple TOCs

Unread post by Tim Green »

KerryPenver wrote: Tue Sep 05, 2023 4:05 pm Could they be auto included topics because they are referenced from other topics I do have in my subset TOC ?
That is exactly the reason. This is because if they were not available, the links would be dead. For a quick fix you can configure the handling of links like this in View > Program Options > Compilers, where you can choose to remove the links or allow them to be dead instead of automatically also including the referenced topic files without TOC entries so that they can still be viewed with the links.

A better solution is to use conditional text tags to also exclude the links, or even better to replace them with alternative text when you publish with the other TOC. How to do this is explained here in the documentation:

https://www.helpandmanual.com/help/hm_a ... links.html
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
KerryPenver
Posts: 9
Joined: Thu Jun 08, 2023 11:40 am

Re: Compiler warnings when multiple TOCs

Unread post by KerryPenver »

I like the compiler messages when I'm building the main table of contents. I use them to change which builds a topic gets included for, and add conditional text into topics. I keep doing this until I've resolved the issues.

However the main table of contents includes all topics.

My second table of contents includes just a few of the topics from the main TOC.
When I publish the second table of contents, it includes topics referenced but not in that table of contents if the option to do that was set

However if those additional topics themselves reference another topic that does not get included too, that is where the dead links are found by the compiler.

e.g. topic A links to topic B which links to topic C
The main TOC has all three topics so no compiler messages
The second TOC only has topic A, the compiler warnings are about the links from Topic B to Topic C

I don't want to use conditional statements because that would double the number of "builds" for each existing "build" I would need to add another "build" to indicate which table of contents I was using.
User avatar
Tim Green
Site Admin
Posts: 23189
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Compiler warnings when multiple TOCs

Unread post by Tim Green »

e.g. topic A links to topic B which links to topic C
The main TOC has all three topics so no compiler messages
The second TOC only has topic A, the compiler warnings are about the links from Topic B to Topic C
This is because if topic B is being included because of the link to it from topic A, then you will also see the messages for the links from B to C, for exactly the same reason, namely that topic B contains links that would be dead if topic C was not included.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply