Hi, there have been some fixes recently (I believe it’ll fix at least the code macro issue and probably more). You should try with the LTS version, ie. XWiki 14.10.13 as of now.
From your screenshot I see that the table of contents numbering is generated but not for all pages. This could be a bug in Paged.js, the library we use to split the content into print pages, or a problem in your content. Do you reproduce the problem on smaller exports? These kind of problems are usually related to the exported content and it’s hard to investigate if we can’t reproduce. And in order to reproduce we need the content, which in your case seems to be very large. Even if we had the content, finding what exactly triggers the problem won’t be easy given its length. I would try to reduce the problem by iteratively removing content from the export (divide et impera) until you find the source of the problem.