I've attached a sample RTF file. You'll note the rtf file includes three kinds of common chapter headings.
- Take this rtf file add it to Calibre
- Highlight the book in Calibre
- Click 'c' to open the convert dialog
- Click on Structure detection
- Enable the preprocessing option
- Under 'Detect Chapters (xpath expression), change 'chapter|book|section|part\s+' to '.*'
- Select your preferred output format on the upper right corner
- Click convert
You generally can't mix and match those three types of chapter headings in a full book (just choose one), but in a test case like this it works fine.
I tested that in Kindle for Mac and Adobe DE, both showed me TOCs. If you're not seeing a TOC maybe you need to describe how you're attempting to view it.