This project has moved and is read-only. For the latest updates, please go here.

Which tag for TOC entry?

Topics: User Forum
Jun 4, 2014 at 8:32 PM

I am creating some AML files to be used in a conceptual document.

I understand that there is a table of content entry for each AML file, but can I create TOC entries for sections within an AML?

This ties in with a larger question of exactly which modifieers are available for each tag. The section tag for example. All I'm aware of is the address tag, because it was autocreated for me.

Probably its a matter of me not knowing the proper names for things, but googling "Sandcastle section" or "Sandcastle TOC" gets me nowhere.


Jun 4, 2014 at 8:57 PM
The content layout file alone determines the TOC layout. The address attribute on section elements is for linking so that you can jump to a specific section from another topic or from within the same topic. It has no bearing on the TOC. If you use the autoOutline element within the topic's introduction, it will create links to each section within the topic intro.

There are help files for SHFB, MAML, and XML comments installed locally as well as being available online. The MAML Guide describes the various MAML elements and their attributes. See the Conceptual Content topics in the SHFB help file for general information on conceptual content.

In this particular case, section is one element that doesn't have a separate topic in the MAML guide. It's covered in more general terms in the comments in each of the examples under the Topic File topic. I probably should add a few more topics for some of the common block elements such as section.

Jun 4, 2014 at 9:01 PM
Thanks Eric,

So the only way to get more TOC entries is to break things up into smaller files?

Jun 5, 2014 at 2:39 AM
Yes, that is the only way short of writing a plug-in to modify the TOC. It would have to search the topics for section elements with address attributes and add them to the intermediate TOC file with the section title. Even then I'm not sure how well it would work. It certainly wouldn't work for MS Help Viewer output since the TOC is built off of the metadata in each topic so no sub-section support there. It would probably work for website output. Help 1 and Help 2 I'm not sure, it might but it might not.

Marked as answer by marcp on 6/5/2014 at 8:49 AM