Automatically create TOC from in-book TOC
Automatically create TOC from in-book TOC
(Forgive the lack of use of proper terms)
I use Atlantis for the export to EPUB ability, works great. When I create my TOCs I do it by hand, bookmarking each chapter, typing up the entry in the front pages, and then linking to the preferred bookmarks. I then of course bookmark the TOC page as TOC.
Perhaps there is a way to do this and I'm just not aware, but assuming there isn't -
I think it'd be very helpful (especially in the case when chapter headers are images) if when exporting to EPUB Atlantis would find the section bookmarked as TOC (as it already does) and then create the toc.ncx based on that. Each new link in the page identified as the TOC would be imported into the toc.ncx until a page break is seen. I realize you can use headings to do this but (unless I'm missing something, which is quite possible) there are problems when the line you're linking to isn't what should be seen as the line in the TOC (like a dedication page that has no heading such as "DEDICATION", just the dedication itself. You can make it an h1/h2 etc but then the toc.ncx doesn't say "Dedication" it says whatever the text does of the dedication you made the h1/h2 etc)
Again, I apologize if there is a way to do this and I'm just missing it.
Thanks,
Steve
I use Atlantis for the export to EPUB ability, works great. When I create my TOCs I do it by hand, bookmarking each chapter, typing up the entry in the front pages, and then linking to the preferred bookmarks. I then of course bookmark the TOC page as TOC.
Perhaps there is a way to do this and I'm just not aware, but assuming there isn't -
I think it'd be very helpful (especially in the case when chapter headers are images) if when exporting to EPUB Atlantis would find the section bookmarked as TOC (as it already does) and then create the toc.ncx based on that. Each new link in the page identified as the TOC would be imported into the toc.ncx until a page break is seen. I realize you can use headings to do this but (unless I'm missing something, which is quite possible) there are problems when the line you're linking to isn't what should be seen as the line in the TOC (like a dedication page that has no heading such as "DEDICATION", just the dedication itself. You can make it an h1/h2 etc but then the toc.ncx doesn't say "Dedication" it says whatever the text does of the dedication you made the h1/h2 etc)
Again, I apologize if there is a way to do this and I'm just missing it.
Thanks,
Steve
Hi Steve,
I think that you are mistaking “headers” with “headings”. “Headers” and “Footers” are placed at the top and bottom of the pages in printed books. The EPUB format is a “reflowable” format, and as such does not support “Headers” and “Footers”. So you will never find “Headers” or “Footers” in EPUB eBooks. On the other hand, EPUB eBooks can (and often) include “headings”. “Headings” are the titles that authors place to cap the important paragraphs or parts of their books.
This said, Atlantis has an automatic TOC-building feature.
The menu command is “Insert | Table Of Contents…”
There is a dedicated toolbar button. If it isn’t already on your toolbars, you can place it this way:
1. Click “Tools | Toolbars…”
2. In the “Toolbars” dialog, choose “Insert” from the “Categories” drop-down.
3. Click within the available commands/buttons, and type “T” (without the quotes). You should get this:

4. Use the arrow buttons in the middle of the dialog to add the “Table Of Contents” button/command to your toolbars.
5. OK out of the “Toolbars” dialog.
You can now use this toolbar button to insert TOCs in your documents.
But there is an important caveat. Atlantis will use any “Heading”-type style present in your document to build the automatic TOC. In other words, you should associate each paragraph that you want Atlantis to automatically include in the document TOC with a “Heading 1”, or “Heading 2” or “Heading 3” style. All paragraphs associated with other styles will be ignored.
“REMBRANDT BIOGRAPHY.RTF” (the document attached to this message) is meant as a demo document illustrating the creation and use of a TOC in an Atlantis document. What’s more, it is a demo document illustrating the creation and use of a TOC in an Atlantis document meant for EPUB conversion. As such, it has some peculiarities:
a) As I explained above, the paragraphs that the author wanted automatically included in the TOC are associated with a “Heading 1” style.
b) The “Front Cover”, “Title Page”, “Table Of Contents” paragraphs are associated with the “Heading 1” style. They were also associated with the “Strikeout” attribute (“Format | Font…” dialog). This was done so that they would automatically be included in the navigation pane of the eReaders. What’s more, they are not included in the automatic TOC created by Atlantis in the EPUB main text because they are located before the TOC itself. Atlantis builds the document TOCs from the “Heading”-type styles it finds after the TOC insertion point. If there are “Heading”-style paragraphs placed before the automatic TOC, they won’t be included in the TOC.
c) The “Notes” heading in the source document was also associated with the “Heading 1” style and the “Strikeout” attribute. This was done so that it would be present in the navigation pane of the eReaders, but not within the text of the EPUB document itself. But this “Notes” heading has an additional characteristic. It was added to the source document only after Atlantis had build the document automatic TOC. In this way, Atlantis did not include it in the document TOC. But, being associated with a “Heading 1” style and the “Strikeout” attribute, this “Notes” heading is visible in the navigation pane of the eReaders. On the other hand, the author made sure it was visible neither in the document TOC (by adding it to the document after the automatic TOC was built), nor in the EPUB document main text itself (by associating it with the strikeout attribute):

HTH.
Cheers,
Robert.
I think that you are mistaking “headers” with “headings”. “Headers” and “Footers” are placed at the top and bottom of the pages in printed books. The EPUB format is a “reflowable” format, and as such does not support “Headers” and “Footers”. So you will never find “Headers” or “Footers” in EPUB eBooks. On the other hand, EPUB eBooks can (and often) include “headings”. “Headings” are the titles that authors place to cap the important paragraphs or parts of their books.
This said, Atlantis has an automatic TOC-building feature.
The menu command is “Insert | Table Of Contents…”
There is a dedicated toolbar button. If it isn’t already on your toolbars, you can place it this way:
1. Click “Tools | Toolbars…”
2. In the “Toolbars” dialog, choose “Insert” from the “Categories” drop-down.
3. Click within the available commands/buttons, and type “T” (without the quotes). You should get this:

4. Use the arrow buttons in the middle of the dialog to add the “Table Of Contents” button/command to your toolbars.
5. OK out of the “Toolbars” dialog.
You can now use this toolbar button to insert TOCs in your documents.
But there is an important caveat. Atlantis will use any “Heading”-type style present in your document to build the automatic TOC. In other words, you should associate each paragraph that you want Atlantis to automatically include in the document TOC with a “Heading 1”, or “Heading 2” or “Heading 3” style. All paragraphs associated with other styles will be ignored.
“REMBRANDT BIOGRAPHY.RTF” (the document attached to this message) is meant as a demo document illustrating the creation and use of a TOC in an Atlantis document. What’s more, it is a demo document illustrating the creation and use of a TOC in an Atlantis document meant for EPUB conversion. As such, it has some peculiarities:
a) As I explained above, the paragraphs that the author wanted automatically included in the TOC are associated with a “Heading 1” style.
b) The “Front Cover”, “Title Page”, “Table Of Contents” paragraphs are associated with the “Heading 1” style. They were also associated with the “Strikeout” attribute (“Format | Font…” dialog). This was done so that they would automatically be included in the navigation pane of the eReaders. What’s more, they are not included in the automatic TOC created by Atlantis in the EPUB main text because they are located before the TOC itself. Atlantis builds the document TOCs from the “Heading”-type styles it finds after the TOC insertion point. If there are “Heading”-style paragraphs placed before the automatic TOC, they won’t be included in the TOC.
c) The “Notes” heading in the source document was also associated with the “Heading 1” style and the “Strikeout” attribute. This was done so that it would be present in the navigation pane of the eReaders, but not within the text of the EPUB document itself. But this “Notes” heading has an additional characteristic. It was added to the source document only after Atlantis had build the document automatic TOC. In this way, Atlantis did not include it in the document TOC. But, being associated with a “Heading 1” style and the “Strikeout” attribute, this “Notes” heading is visible in the navigation pane of the eReaders. On the other hand, the author made sure it was visible neither in the document TOC (by adding it to the document after the automatic TOC was built), nor in the EPUB document main text itself (by associating it with the strikeout attribute):

HTH.
Cheers,
Robert.
Nope, I know the difference between headers/footers and headings. I've just never learned not to post on forums or write emails within an hour of waking up 
I understand the insert-TOC feature of Atlantis and that it's based on headings. Typically I create my TOC by hand as mentioned, and link to the chapter headings I have bookmarked throughout. Those chapter headings are also set as headings (h1/h2 whatever applies) so that they will automatically be pulled into the navigation pane of the ereaders. When those headings aren't what I want to appear in the navigation pane though it requires the extra steps of loading the EPUB in Sigil to edit them.
I did a quick test to use the insert->TOC feature when my chapter headings are images and the feature pulls those images to use in the TOC (not sure what I expected it to do to be honest). My suggestion above was that there be an option when you're saving to EPUB that tells Atlantis to find the section bookmarked TOC. Then pull each line that links to somewhere in the book (up until the next page break, which would signal end of TOC) and insert it in the toc.ncx (which is used by the 'navigation pane' in the ereaders.) This would make Atlantis automatically create the toc.ncx based on the text of the TOC that's in the book as opposed to just pulling whatever the headings are (which doesn't work when the chapter headings are images).
Thanks
Steve
I understand the insert-TOC feature of Atlantis and that it's based on headings. Typically I create my TOC by hand as mentioned, and link to the chapter headings I have bookmarked throughout. Those chapter headings are also set as headings (h1/h2 whatever applies) so that they will automatically be pulled into the navigation pane of the ereaders. When those headings aren't what I want to appear in the navigation pane though it requires the extra steps of loading the EPUB in Sigil to edit them.
I did a quick test to use the insert->TOC feature when my chapter headings are images and the feature pulls those images to use in the TOC (not sure what I expected it to do to be honest). My suggestion above was that there be an option when you're saving to EPUB that tells Atlantis to find the section bookmarked TOC. Then pull each line that links to somewhere in the book (up until the next page break, which would signal end of TOC) and insert it in the toc.ncx (which is used by the 'navigation pane' in the ereaders.) This would make Atlantis automatically create the toc.ncx based on the text of the TOC that's in the book as opposed to just pulling whatever the headings are (which doesn't work when the chapter headings are images).
Thanks
Steve
I do not think that it is a good idea to create "manual TOCs".
First, please click the below links:
Heading-less chapters
Heading-less chapters (2)
Then please see attached sample documents.
"Image headings (1).rtf" contains three chapters. Each chapter has a proper "text" heading associated with the "Heading 1" style. Each heading is then followed by an "image heading" (a "Normal" paragraph containing an image).
Now let's format all the "Heading 1" paragraphs in this document with strikeout (see attached "Image headings (2).rtf").
Then insert a TOC before the first heading through the "Insert | Table of Contents..." menu command (see attached "Image headings (3).rtf").
Now let's save this document as eBook (see attached "Image headings (3).epub"). The TOC includes text, not images. But this text does not appear within the book text itself.
First, please click the below links:
Heading-less chapters
Heading-less chapters (2)
Then please see attached sample documents.
"Image headings (1).rtf" contains three chapters. Each chapter has a proper "text" heading associated with the "Heading 1" style. Each heading is then followed by an "image heading" (a "Normal" paragraph containing an image).
Now let's format all the "Heading 1" paragraphs in this document with strikeout (see attached "Image headings (2).rtf").
Then insert a TOC before the first heading through the "Insert | Table of Contents..." menu command (see attached "Image headings (3).rtf").
Now let's save this document as eBook (see attached "Image headings (3).epub"). The TOC includes text, not images. But this text does not appear within the book text itself.
- Attachments
-
- Image headings (3).epub
- (106.05 KiB) Downloaded 1285 times
-
- Image headings (3).rtf
- (219.78 KiB) Downloaded 975 times
-
- Image headings (2).rtf
- (217.62 KiB) Downloaded 959 times
-
- Image headings (1).rtf
- (212.37 KiB) Downloaded 1005 times
I find absolutely no problems with creating TOCs manually and am a little uncertain why it would be suggested it is a bad idea without any supporting reasoning.
I can use the strikeout method to get around some of the issues I had. My only problem with the strikeout method is that while formatting the document there's going to be text in the document that would be later removed when saved as an EPUB so the formatting I'm seeing at times won't entirely be representative of what I'm going to see when the EPUB is created (since all those words will automatically be removed in the EPUB version).
Not a big deal though I still believe my suggestion would be a good addition.
I can use the strikeout method to get around some of the issues I had. My only problem with the strikeout method is that while formatting the document there's going to be text in the document that would be later removed when saved as an EPUB so the formatting I'm seeing at times won't entirely be representative of what I'm going to see when the EPUB is created (since all those words will automatically be removed in the EPUB version).
Not a big deal though I still believe my suggestion would be a good addition.
Hi Steve,there are problems when the line you're linking to isn't what should be seen as the line in the TOC (like a dedication page that has no heading such as "DEDICATION", just the dedication itself. You can make it an h1/h2 etc but then the toc.ncx doesn't say "Dedication" it says whatever the text does of the dedication you made the h1/h2 etc)
If you have a dedication page that has no heading such as “DEDICATION”, you can perfectly insert “DEDICATION” as a “strikeout” “Heading 1” (or “Heading 2”) paragraph before the dedication itself. This “DEDICATION” caption will automatically be included as a “ncx” item when you save your source document as EPUB in Atlantis. If you do not want Atlantis to include the “strikeout” “DEDICATION” string as an item in the TOC of the main text of the source document or of the corresponding EPUB file, simply remove (delete) the “DEDICATION” string (item) from the automatic TOC created by Atlantis. In this way, it won’t be included in the main text of either the source document or the corresponding EPUB file. But it will be present in the “ncx” table.
Now regarding your problem with “images as headings”, could you please attach a sample source document to this forum thread illustrating such “images as headings” and the corresponding EPUB file as you tweaked it so that it would include the desired “ncx” table?
Alternatively, you could send both the source document and the corresponding EPUB file as attachment to support@AtlantisWordProcessor.com.
Thanks in advance.
I have tested this.
Let’s suppose that I use images as Heading-style chapter headings within the main text of the source document, and create a TOC.
Atlantis picks up these images and includes them as regular items in the TOC located within the source document.
These images are subsequently included as “headings” in the main body of text of the corresponding EPUB file, and in the TOC placed within the same EPUB body of text. But they are not included in its “ncx” table.
Now let’s suppose that I use images as Heading-style chapter headings within the main text of the source document, and associate them with the strikeout attribute, then create a TOC.
Atlantis picks up these images and includes them as regular items in the TOC located within the source document.
But these images are subsequently excluded from the main body of text of the corresponding EPUB file, and they are not included in its “ncx” table, which would be the case if they were strings of text instead of images.
So if you want your images as Heading-style chapter headings to figure in the “ncx” table of the corresponding EPUB file, you have currently no other solution than to tweak the “ncx” table yourself manually. There is no automatic procedure that would allow you to include these “images as Heading-style chapter headings” in the EPUB “ncx” table.
Let’s suppose that I use images as Heading-style chapter headings within the main text of the source document, and create a TOC.
Atlantis picks up these images and includes them as regular items in the TOC located within the source document.
These images are subsequently included as “headings” in the main body of text of the corresponding EPUB file, and in the TOC placed within the same EPUB body of text. But they are not included in its “ncx” table.
Now let’s suppose that I use images as Heading-style chapter headings within the main text of the source document, and associate them with the strikeout attribute, then create a TOC.
Atlantis picks up these images and includes them as regular items in the TOC located within the source document.
But these images are subsequently excluded from the main body of text of the corresponding EPUB file, and they are not included in its “ncx” table, which would be the case if they were strings of text instead of images.
So if you want your images as Heading-style chapter headings to figure in the “ncx” table of the corresponding EPUB file, you have currently no other solution than to tweak the “ncx” table yourself manually. There is no automatic procedure that would allow you to include these “images as Heading-style chapter headings” in the EPUB “ncx” table.
Modifying raw RTF code in a plain text editor is not a good idea. It is because there are chances that you might make a wrong change to the code (even if you are an RTF expert) that would never be made by a program.oldghost wrote:I find absolutely no problems with creating TOCs manually and am a little uncertain why it would be suggested it is a bad idea without any supporting reasoning.
The same regarding manual TOCs. There are chances that you might create a bookmark with a wrong name, link to a wrong bookmark, misspell a TOC item, or just forget to update a TOC item. There is no point in creating anything manually if the same thing can be created automatically.
Admin:
Yah, I don't consider "because you might link to the wrong bookmark" as a real reason not to do it manually. Any competent person should have no problem manually creating a TOC and if they do link to the wrong place it's a 20 second fix. I appreciate your input but doing it this way hasn't caused me any problems yet and my review of the EPUB after is meticulous enough that if I did mess up I'd discover it.
Robert:
I may've misread what you were saying but assuming I didn't - If I have an image as the heading for the chapter headings (let's use Chapter 1 as an example) - On a line before the image heading for chapter 1 I just type "Chapter 1" and set heading 1 to strike through and apply that style to the "Chapter 1" text I put in before the image. Then when Atlantis creates the EPUB it will auto-remove that and place "Chapter 1" in the NCX and point to that HTML. I tested it before posting this and it works with no need to edit the EPUB manually.
Yah, I don't consider "because you might link to the wrong bookmark" as a real reason not to do it manually. Any competent person should have no problem manually creating a TOC and if they do link to the wrong place it's a 20 second fix. I appreciate your input but doing it this way hasn't caused me any problems yet and my review of the EPUB after is meticulous enough that if I did mess up I'd discover it.
Robert:
I may've misread what you were saying but assuming I didn't - If I have an image as the heading for the chapter headings (let's use Chapter 1 as an example) - On a line before the image heading for chapter 1 I just type "Chapter 1" and set heading 1 to strike through and apply that style to the "Chapter 1" text I put in before the image. Then when Atlantis creates the EPUB it will auto-remove that and place "Chapter 1" in the NCX and point to that HTML. I tested it before posting this and it works with no need to edit the EPUB manually.
All the same I could spell the heading wrong and then the automatic TOC creation would get it wrong too, then I'd have two places to fix it in. The logic that I shouldn't do it the way I know works fine because "I could do type something wrong" is faulty.
And calling it more complex is a bit of an exaggeration. By that rationale, having to type a heading prior to the actual heading, create a style with strike through, and apply it to a word or phrase that will be removed from the final version is more complex than what I do.
Overall the point of my thread was simply to suggest a feature I thought would be beneficial to a lot of people, apparently it's not considered that (or even really mentioned in most of the posts) so that's that.
And calling it more complex is a bit of an exaggeration. By that rationale, having to type a heading prior to the actual heading, create a style with strike through, and apply it to a word or phrase that will be removed from the final version is more complex than what I do.
Overall the point of my thread was simply to suggest a feature I thought would be beneficial to a lot of people, apparently it's not considered that (or even really mentioned in most of the posts) so that's that.
Steve,
Sorry I misunderstood your post. I am afraid we’ve been talking at cross purposes all along.
I thought (it seems wrongly) that you wanted to have images picked up, and at the same time
– converted to TOC items in the source document,
– converted to TOC items within the main body of the corresponding EPUB file,
– converted to TOC items within the “ncx” table of the corresponding EPUB file.
As I now understand this, you want the text strings of your chapter headings to be
– included in the “ncx” table,
– but excluded from the main body of text of the EPUB file.
As Admin and I tried to explain, you will achieve this by associating the text strings of your chapter headings with a Heading-type style and the “strikeout” attribute. This is amply demonstrated in “REMBRANDT BIOGRAPHY.RTF” which I forgot to attach to my previous message. I am attaching it to the present message.
Now note that Atlantis will automatically pick up the text strings of your chapter headings with a Heading-type style and the “strikeout” attribute when it creates a TOC automatically. If you don’t want these “strikeout” strings to be included in the TOC of the source document, and later within the internal TOC of the EPUB file, you need to remove them manually from the TOC automatically created by Atlantis in the source document.
Finally, a personal note. I have had to create TOCs for documents that included dozens and dozens of chapter headings and sub-headings, and sub-sub-headings. If you are careful to associate these headings with appropriate hierarchical Heading-type styles, Atlantis will automatically create a perfect TOC for the document. It would be hell if you had to create such TOCs manually.
HTH.
Cheers,
Robert
Sorry I misunderstood your post. I am afraid we’ve been talking at cross purposes all along.
I thought (it seems wrongly) that you wanted to have images picked up, and at the same time
– converted to TOC items in the source document,
– converted to TOC items within the main body of the corresponding EPUB file,
– converted to TOC items within the “ncx” table of the corresponding EPUB file.
As I now understand this, you want the text strings of your chapter headings to be
– included in the “ncx” table,
– but excluded from the main body of text of the EPUB file.
As Admin and I tried to explain, you will achieve this by associating the text strings of your chapter headings with a Heading-type style and the “strikeout” attribute. This is amply demonstrated in “REMBRANDT BIOGRAPHY.RTF” which I forgot to attach to my previous message. I am attaching it to the present message.
Now note that Atlantis will automatically pick up the text strings of your chapter headings with a Heading-type style and the “strikeout” attribute when it creates a TOC automatically. If you don’t want these “strikeout” strings to be included in the TOC of the source document, and later within the internal TOC of the EPUB file, you need to remove them manually from the TOC automatically created by Atlantis in the source document.
Finally, a personal note. I have had to create TOCs for documents that included dozens and dozens of chapter headings and sub-headings, and sub-sub-headings. If you are careful to associate these headings with appropriate hierarchical Heading-type styles, Atlantis will automatically create a perfect TOC for the document. It would be hell if you had to create such TOCs manually.
HTH.
Cheers,
Robert
- Attachments
-
- REMBRANDT BIOGRAPHY.RTF
- (44.22 KiB) Downloaded 1053 times