The preprocess option found the chapters just fine. Just to be clear, when I tell you to enable preprocess, you need to check the box next to 'preprocess input file to possibly improve structure detection'.
All the numeric chapter headings were wrapped in <h2> tags by the preprocess function (except the first one which use the letter 'I' instead of a '1').
With the default settings your file WILL be split into a single file per chapter - this requires that you haven't changed the global defaults.
The default setting for 'insert page breaks before' should be:
Code:
//*[name()='h1' or name()='h2']
This is the default setting - if you see something different it means you must have changed it in the global preferences.
If you've gone and changed that then you won't get the document split into multiple flows at the correct points.
TOC creation will not happen automatically (with the default settings) with these types of chapter headings, but that's trivial to fix. All of these chapter headings are numeric - that can be represented using regular expressions with \d+
So change the default TOC xpath from this:
Code:
//*[((name()='div' or name()='h2') and re:test(., 'chapter|book|section|part\s+', 'i')) or @class = 'chapter']
To this:
Code:
//*[((name()='h1' or name()='h2') and re:test(., '\d+', 'i')) or @class = 'chapter']
If you can't figure out how to fix the xpath, preprocessing did work anyway. All you would need to do is open this document up in Sigil and then save it, and you would automatically get a TOC, since Sigil autogenerates a TOC based on heading tags, and preprocess successfully inserted them.