Perkin, I don't even know you, but I LOVE YOU!!!!
I have been at the seemingly impossible task of introducing basic TOC metadata into an ePub for well over a week now. I've pulled out lots of hair, but no TOC.
Then the magic words: "switch to code view." It might be that I'm a bit slow, but it never dawned on me that the h-tags need to be typed in code view. This is also partly because you can type "normal" text in either view and it doesn't matter. I had <h2> and </h2> characters everywhere
but in the right place!
Anyway, thanks a million Perkin for taking the time to write it out so clearly for people like me!