Copy link to clipboard
Copied
Hi there,
I have structured documents and I declared my book and my chapter element in the edd as top level elements. So far my book looks fine. Now I want to insert a TOC in the book. What is the best way to do that? Can I use the TOC that I can create over the FrameMaker menu and do I have to declare the TOC element in my EDD as well? I don't want to write a script or something like that.
Thanks.
Greetings.
Copy link to clipboard
Copied
There are probably several different ways to add a TOC to a structured book, but this is the simplest to my knowledge.
As in an unstructured book, you add a standard TOC from the FrameMaker menu (Add > Table of Contents). Note that the table of contents is text; it is not structured. Generally, there is no need to have a structured TOC. I am guessing that most people enclose the TOC content with an element; however, it is not necessary.
If you DO want to have a TOC element, you need to declare it in the EDD as a container with only TEXT content. You also need to edit your root book element to show where the TOC element is to be.
If you DO NOT want to have a TOC element, you need to edit your root book element to allow TEXT content, along with the other elements it contains.
Copy link to clipboard
Copied
Hi,
thanks so far. I get a step closer. I created a TOC element in my EDD. When I now Add the TOC from the menu it is in my book as book component. How do I tell my book, that this is the Element "TOC" I specified in my EDD or how to I wrap this in my TOC element so it will not destroy my structure?
Greetings.
Copy link to clipboard
Copied
Dokuteam,
While possible, wrapping an entire flow in a single element can cause unpredictable results with formatting. Is there a reason that you want your TOC to be structured at all? Normally, TOCs (and other generatable files) remain unstructured, even in a book that is otherwise fully structured.
Russ
Copy link to clipboard
Copied
Hi Russ,
well, I don't need the TOC itself to be structured, but when I insert the TOC the book (which is structured) has a broken structure, because the TOC element is insert as a book component.
What I do wrong? I think it is a really simple think, but I don't get it.
Sorry, I'm really new with FrameMaker.
Copy link to clipboard
Copied
Dokuteam,
It's very simple actually, you just have to do the last thing that Van said:
"If you DO NOT want to have a TOC element, you need to edit your root book element to allow TEXT content, along with the other elements it contains."
What he meant is that in your EDD, you now have some element that serves as the highest-level element in the book. In the general rule for that element, add "<TEXT>", as if it were an element that is allowed to contain text. Naturally, you can't type any text into your book structure tree, but this is a trick that will allow an unstructured file to live in your book while maintaining a valid book structure.
Note that a book structure tree only updates when you do a book update. If you follow all these steps, you'll need to do a book update afterwards to refresh that tree.
Russ
Copy link to clipboard
Copied
Thanks Russ, thanks Van,
It works!!!! Awesome! I defined the top level element as mixedcontent in my dtd (xml schema) and imported it in my edd so I have the rule that it can contain text, as you said.
Thank you very much.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more