adding TOCs to a TOC

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
pdenchfield
Propellus Maximus
Posts: 574
Joined: Tue Oct 03, 2006 7:56 am
Location: Seattle, WA
Contact:

adding TOCs to a TOC

Post by pdenchfield »

I have a user-guide TOC that I want to also include as part of a differently branded module guide. I dragged the UG.fltoc file from Project Explorer to the Module.fltoc file. Now the user-guide TOC is part of the module guide, which means I don't have to track those TOC updates in two separate locations.

The problem is that the front matter topics are included twice, even when I apply a conditional tag to the related TOC entries and exclude said tag in the module guide target.

Does anyone on the forum generate PDFs from TOCs that include TOCs? If so, how do you make sure the front matter is not repeated in the component TOCs?
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: adding TOCs to a TOC

Post by doc_guy »

I've never heard of including a TOC in a TOC. Is it a supported workflow? How does the code reference the second TOC?

But no, I don't have an answer to your question. Sorry. Just morbid curiosity that makes me wonder how you accomplished it.... :)
Paul Pehrson
My Blog

Image
pdenchfield
Propellus Maximus
Posts: 574
Joined: Tue Oct 03, 2006 7:56 am
Location: Seattle, WA
Contact:

Re: adding TOCs to a TOC

Post by pdenchfield »

Curiosity appreciated. :-) Here's the code referencing the second TOC:

Code: Select all

  <TocEntry
    Title="User Guide"
    Link="/Project/TOCs/UG.fltoc" />
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: adding TOCs to a TOC

Post by KevinDAmery »

An alternative way to do it would be to design the Module Guide as the "Master" TOC (i.e. include the topics for the User Guide as well as the Module Guide in it), then apply conditions to the topics that are not going to be included in the User Guide. You can then exclude the conditioned topics from the User Guide. This way you only need one TOC file and no need to muck about with inserting TOC files into one another. I'm using this method here for a slightly different purpose, and it's working well.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
alaltenburg
Sr. Propeller Head
Posts: 342
Joined: Mon Nov 03, 2008 9:33 am
Location: The heart of America

Re: adding TOCs to a TOC

Post by alaltenburg »

I learned how to do this during the Madskills courses a few months back. First you must create multiple TOC's and give them specific names so you can tell them apart.

Open the main TOC you want to use. Then, go to Project Organizer>TOC>other list

You should be able to drag the file from project organizer into your main TOC. It will have a TOC icon next to it. It's done the same way when you want the TOC to pull word or excel files.

I tried it with no problem.

HTH,
Andrea
The Moon is the first milestone on the road to the stars.

— Arthur C. Clarke
pdenchfield
Propellus Maximus
Posts: 574
Joined: Tue Oct 03, 2006 7:56 am
Location: Seattle, WA
Contact:

Re: adding TOCs to a TOC

Post by pdenchfield »

Thanks, Paul! Your suggestion works.

It would be nice if MadCap would allow the other workflow, though. It's nice to think of outlines in their most granular form and cobble together as needed down the road. :-) I will submit a feature request.
alaltenburg
Sr. Propeller Head
Posts: 342
Joined: Mon Nov 03, 2008 9:33 am
Location: The heart of America

Re: adding TOCs to a TOC

Post by alaltenburg »

I'm confused. What are you submitting a feature request for? I had no problem placing a TOC within a TOC??
The Moon is the first milestone on the road to the stars.

— Arthur C. Clarke
pdenchfield
Propellus Maximus
Posts: 574
Joined: Tue Oct 03, 2006 7:56 am
Location: Seattle, WA
Contact:

Re: adding TOCs to a TOC

Post by pdenchfield »

alaltenburg wrote:You should be able to drag the file from project organizer into your main TOC. It will have a TOC icon next to it. It's done the same way when you want the TOC to pull word or excel files.

I tried it with no problem.
Hi Andrea, did your TOCs have front matter topics in them (title, contents, etc.)? If they did, how were you able to exclude the front matter topics from the included TOCs?
alaltenburg
Sr. Propeller Head
Posts: 342
Joined: Mon Nov 03, 2008 9:33 am
Location: The heart of America

Re: adding TOCs to a TOC

Post by alaltenburg »

My topics hand heads and body, I think that is what you mean.

What are you trying to do with having multiple TOC within the same document? Maybe I can help if I knew what you were trying to do?
The Moon is the first milestone on the road to the stars.

— Arthur C. Clarke
pdenchfield
Propellus Maximus
Posts: 574
Joined: Tue Oct 03, 2006 7:56 am
Location: Seattle, WA
Contact:

Re: adding TOCs to a TOC

Post by pdenchfield »

In my original approach, I have two TOCs: TOC1 and TOC2.

* TOC1 contains just user-guide topics for a product that is sold as WhizzBang and SlicedBread. (Made-up product names.) The desired output for this TOC is the WhizzBang User Guide.
* TOC2 contains system requirements, deployment instructions, and other information, as well as the aforementioned user-guide topics. The desired output for this TOC is the SlicedBread End-to-End Guide.

I added TOC1 to TOC2, thinking that I would much rather track any TOC changes in one place rather than two. So if I decide to reposition the "Saving Widgets" topic in the TOC hierarchy, I only have to reposition it once, in TOC1. This approach would work great for WebHelp but not PDF. The inclusion of front matter topics in the TOCs (like a title page, preface, or contents page) doesn't make sense when duplicated. I tagged the TOC1 (user-guide) front matter topics for exclusion but they were included anyway, resulting in a second set of front matter topics just before the user-guide portion of the SlicedBread End-to-End Guide. (I tried tagging the TOC entries and I also tried making unique front matter topics and tagging them. They were still included. when the tagged topics/entries were in TOC1, which was dragged to TOC2.)

Paul suggests that my approach may not be supported by MadCap and that I could reverse my tagging (include all topics in a huge "master" TOC and tag the NON-user-guide topics for exclusion). My quick test confirms that Paul's approach works while mine does not.

Managing TOCs at a granular level is much preferable to putting them all in a "master" TOC. I'm eager to hear more ideas for this approach. Thanks!

**EDIT: Managing TOCs at a granular level is much preferable to putting ALL the topics in a "master" TOC and tagging sets of topics for exclusion.
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: adding TOCs to a TOC

Post by wclass »

pdenchfield wrote:In my original approach, I have two TOCs: TOC1 and TOC2. ...
I have often included TOCs in TOCs - I assume it is supported (else how did I know to try it?).

What I would do in this case is have 3 TOCs - Whizzbang front matter, SlicedBread front matter (or whatever), and then a third TOC with the bulk of the general topics that end up being included in both of the other topics. You can include a TOC at any point - does not have to be at the beginning or end.

Some times I want to print or generate just a small section of a help project - by keeping the major functions in separate TOCs I can do this easily, and just include all the TOCs when I want to generate the main online help.
Margaret Hassall - Melbourne
pdenchfield
Propellus Maximus
Posts: 574
Joined: Tue Oct 03, 2006 7:56 am
Location: Seattle, WA
Contact:

Re: adding TOCs to a TOC

Post by pdenchfield »

Thanks - I'll try this setup next week when I have more time ...

UG-noFM (topics only: UG – but no front matter)
FrontMatter (topics only: front matter – but no UG)*
UG (TOCs only: FrontMatter at top, then UG-noFM)
MG (topics and TOCs: FrontMatter TOC at top, then MG topics, then UG-noFM TOC)

* The FrontMatter topics must be set up to take deliverable-specific information (such as titles) from the target.
pdenchfield
Propellus Maximus
Posts: 574
Joined: Tue Oct 03, 2006 7:56 am
Location: Seattle, WA
Contact:

Re: adding TOCs to a TOC

Post by pdenchfield »

The approach suggested by wclass works like a dream - except when I include a TOC in a TOC book entry as shown near the bottom of the code excerpt below, from the MG.fltoc file. Problems that occur when I move the included TOC into a TOC book entry are the following:
- The TOC book entry is listed at the top of the PDF output, as well as the heading for the other included TOC (first entry, x-FrontMatter.fltoc)
- The page in the output that corresponds to the TOC book entry restarts the page numbering even though I didn't set any page layout (but subsequent topics retain the continued paging)

These problems occur regardless of whether the book entry is linked to a topic. If I move the included TOC out of the book entry, the problems go away.

Any ideas for fixes or workarounds?

Code: Select all

  <TocEntry
    Title="x-FrontMatter"
    Link="/Project/TOCs/x-FrontMatter.fltoc" />
  <TocEntry
    Title="Introduction"
    Link="/Content/intro.htm"
    StartChapter="true"
    PageNumberReset="reset"
    PageNumberFormat="decimal"
    PageLayout="/Content/Resources/PageLayouts/DefaultPageNumbers.flpgl"
    PageNumber="1"
    StartSection="false" />
  <TocEntry
    Title="Hardware and Software Requirements"
    Link="/Content/reqs-hwsw.htm"
    conditions="Manuals.RF-ModuleManual" />
// many more toc entries
  <TocEntry
    Title="User Guide">
    <TocEntry
      Title="UG"
      Link="/Project/TOCs/UG.fltoc" />
  </TocEntry>
Post Reply