Thank you Kovid. Before I continue, I want to thank you for your brilliant product Calibre. I have recently started using it and find its Look & Feel intuitive, its range of actions extensive and its capabilities powerful. It has only minor bugs, due no doubt, to its rapid evolution. Thank you for sharing this product with the world at large.
Now, regarding point 3 in your post:
Please read post #9 in my previous thread:
https://www.mobileread.com/forums/sh...d.php?t=351746
I repeated this method for the current book - ie putting ## prefixes before the chapter like so
## Chapter 4 Pottery in the Middle Ages
but instead of the expected:
<h2 id="chapter-4-pottery-in-the-middle-ages" class="calibre1">CHAPTER 4 Pottery in the Middle Ages</h2>
I got:
<li class="calibre3"><span>CHAPTER</span> 4 Pottery in the Middle Ages</li>
so for the current book, for unknown reasons, the program failed to translate the ## prefix into the h2 tags.
This post is also relevant:
https://www.mobileread.com/forums/sh...d.php?t=351898
But I will follow your advice to convert text to epub and then epub to azw3 and see if it fixes the problem.