Issues with generating ebook html table of contents

Hi,

I’ve just been struggling to get a manual table of contents to work when compiling an ebook.

I got it working eventually, but I thought I’d mention this if anyone else has any thoughts on it.

I have a project with several short stories in separate folders, each with chapters titled: ‘Chapter One’, ‘Chapter Two’ etc.

I created a page for my ToC and linked each text link to the correct chapter for my first story.

Whatever I did, when I compiled to Kindle I couldn’t get the links to show up in the ToC page, they just came out as blank gaps between my Front and Back Matter pages.

After an hour or so, I discovered that the solution was to rename any duplicate chapter titles to unique names (‘01 - Chapter One’ , 02 - Chapter One’) for each of the different stories.

Is this the correct behaviour for Scrivener compiling? Is it working as it should? Surely I can have duplicate text file names in my project without causing link errors?

Also, in the Compile settings, where I have to type the title of my Table of Contents - surely it would be better just to be able to browse for the correct file? When things weren’t going right and my ToC wasn’t being output, I was getting confused as to what the ‘Table of contents Title’ was alluding to - was it the Text file title or the title within the page?

Anyway, apart from a few stumbles I’m really enjoying V3! Many thanks!

Ian

Hi,

The title serves two purposes - it will be the title of the automatically-generated ToC page or, if you have a document of that title, then it will use that. That’s why it is a text field.

You should be able to have duplicate title entries, though, so I’m not sure why you are seeing this behaviour. Could you please send us the project (or a sample project) with the Compile format in it so that we can see what’s going on?

Thanks and all the best,
Keith

Hi Keith,

thanks for your reply.I understand the requirement for an auto-generated ToC title, but if you could consider some future approach that would save the setting (as with the front/back matter), that would be immensely appreciated! :smiley:

[url]https://forum.literatureandlatte.com/t/how-do-i-save-all-compile-settings-for-multiple-books-in-a-single-project-surely-i-dont-have-to-re-do-them-each-time/38632/1]

I’ve had a quick look at my project and if I change all the first chapter titles to ‘Chapter One’, then when I compile, that link just disappears from my manual ToC:


(I did edit the link to make sure it still pointed to the correct file)

I’d be happy to send the project over if it would help - shall I just send it to support?

Many thanks,
Ian

I’m not quite sure what you mean about the ToC title, because that is saved, just like front matter/back matter.

And yes, please send the project to support and reference this thread, for either Ioa or myself to look at. I just tested and had no problems with duplicate chapter titles in either epub or Kindle.

All the best,
Keith

Hi Keith, I’ve sent my project over now - hopefully it’s just something I’m missing and not a problem with the software. :slight_smile:

I was referring to the ToC location not being saved with the compile format preset as is the location of the Front and Back Matter but not the ToC.

One of my projects is a book series, and I have multiple books with unique ToC that I need to compile.
I thought I would be able to save a Compile Format Preset for each individual book within the project and save all the data I needed for next time I needed to compile it:

I was worried about the possibility of errors when some of data (ToC, as well as ‘Title’ and ‘Abbreviated Title’ in the meta tab of the compile settings) isn’t saved to the ‘compile format preset’.

As I explain in my forum post here, with help I was able to save most of the settings I needed in the end:

There were only those 3 things that I was worried about, but I’ll just have to try and keep them on my mental checklist each time I compile a different book in my project.

I was suggesting that perhaps the Table of Contents tab could act in some way similar to how the Front and Back Matter works. So, instead of typing the name of the title, we could select our ToC page from a dropdown. This could then be saved with the ‘Compile Format Preset’ as the Front/Back Matter locations are.

Perhaps there could be an ‘automatically generate ToC’ checkbox that would have the ‘ToC title’ text box next to it as default and a dropdown greyed out:

If I unchecked ‘automatically generate ToC’ , the text box would be greyed out and the dropdown to select my own ToC page would become available. That way my selection could be saved with the compile format preset the same way as the Front/Back matter options are:

Obviously, just thinking off the top of my head - I’m sure there are many knock-on effects that I can’t foresee! :wink:

I feel like I’m getting past the first transition hurdles now, and am loving the new features in vsn 3. :slight_smile:

Many thanks,
Ian

hi chaps

this option is not showing in my version of Scrivener to remove front and back matter from ToC when using ‘generate HTML table of contents’ - there is only really that option and a few other but no manual one to choose the folders.

Basically, I don’t want my ToC to include Front and Back matter. Any ideas?

thanks
Sam