title_body: How do you create and add a .apnx file to a Kindle book to display real page numbers?
upvoted_answer: KindleGen supports both NCX pagelists and ADE page-maps. I.e., you'll have to add a pagelist/page-map and you'll also have to add page target markers in the (X)HTML files.
  
  Note that the official Amazon tools won't generate APNX files. However, KindleUnpack can generate them from a mobi file generated by KindleGen.
  
  You could also generate KFX files with the unofficial KFX plugin. When transferred to an eInk device, the firmware will automatically generate the APNX files.