title_body: How easy is it to add a table of contents to an epub book? Some text editors (e.g. MS Word, or Atlassian Confluence Wiki editor) make it trivial to add a table of contents to a text that was properly formatted (e.g. has headings/chapter titles), by merely doing a single "insert table of contents" operation, as opposed to manually creating all the links - and the TOC can be easily refreshed as the text structure changes.
  
  Is there such a capability for EPUB books?
  
  
  Is there a TOC concept in the format specification itself?
  If so, does at least one popular EPUB editing software support that concept, including refreshing TOC to reflect text structure changes?
upvoted_answer: Both Sigil and Calibre can edit or create a TOC for .epub books.
  
  In Sigil, once you have opened your ebook, press Ctrl+T
  , and you will open a window where you can generate the TOC from the various h1, h2, h3 (and so on) tags, you can manually select how deep to go in the header hierarchy.
  
  Inside Calibre, select the ebook, press K, and you will get another window that will let you do something similar, but you have some more options if compared to Sigil, in example you can generate entries not only from html headings but also from single files inside the .epub, rearranging the list and the hierarchy, and so on. It's simplier to do it than to explain it.