Putting the TOC into a separate HTML file as opposed to in the main HTML file shouldn't make any difference.
A little explanantion of TOCs seems to be in order:
There are two kind of TOCs: Inline and external
An inline TOC is part of the contents of the book, typically at the beginning of the book. When you have a TOC in either the main html file or a separate html file this is what is created.
An external TOC is a TOC that is present in the metadata of the books and is accessed via special controls on the reader, for example to TOC button in the calibre ebook viewer.
I suspect it is an external TOC that you want to create for your readers.
The problem with external TOCs is that different formats have differing levels of support for them. EPUB has the best support, MOBI the worst. LRF only supports external TOCs with one level (i.e. no nested TOCS).
In calibre the interface for generating external TOCS is the same for EPUB and MOBI (though in the case of MOBI it wont really be an external TOC but an inline toc at the end of the book). The interface for LRF is different (for legacy reasons).
For EPUB and MOBI you typically use the Levelx TOC option, where x is 1 through 3, or if you have a simple book where you just want the chapter titles to be in the TOC, calibre should create it automatically provided it is detecting your chapters correctly (you may have to tweak this by changing the chapter detection XPath expression. The User Manual has a nice explanantion on how to do this).
For LRF I would suggest first creating EPUB and then using that as input to the LRF, inwhic case the previously created external TOC will be automatically used.
|