Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

TOC in a book

Explorer ,
Jun 21, 2011 Jun 21, 2011

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.

TOPICS
Structured
904
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 21, 2011 Jun 21, 2011

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 21, 2011 Jun 21, 2011

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jun 21, 2011 Jun 21, 2011

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 21, 2011 Jun 21, 2011

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jun 21, 2011 Jun 21, 2011

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 21, 2011 Jun 21, 2011
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines