View Single Post
Old 10-21-2023, 07:05 AM   #6
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,424
Karma: 107078855
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by Comfy.n View Post
I wanted to insert page breaks before each one and have an EPUB with a TOC. The problem was that I couldn't figure the Xpath expression to make Calibre detect those .docx "Chapters".
That can be fixed by a custom paragraph style for topic heading or first paragraph of a page which has EVERYTHING the same except heading level (1 or 2) and Insert Page before (with no style).
Then at start Insert Auto inline Contents/Index with settings changed (delete tabs & page numbers, set suitable paragraph & heading styles).

This is all easier in any version of LO Writer since at least 5.x (now on 7.x) than Word 2007.
Note in LO Writer only edit/save odt and do an extra save in docx for Calibre as the odt conversion isn't as good.
Never use predefined Headings in LO, make your own or you might get list formatting!

Since I got more clued on LO headings in custom paragraph styles and either insert contents, or manually add a bookmark at each start of new page/heading style and then a manual list of contents page with links to bookmarks (Copy & past auto contents to text editor and copy/paste back as KDP prefers manually done contents/index even on epub upload. Calibre doesn't care. More flexible).

So now I never edit xpath unless it's some mad mobi / azw3 / epub being converted, but even then better to edit the azw3/epub (not an option for mobi, but convert to epub, edit, convert epub to epub and page breaks appear!)

Last edited by Quoth; 10-21-2023 at 07:11 AM.
Quoth is offline   Reply With Quote