Link at end but Tagging @dmoonfire and also seeing if other #Pandoc experts have a solution. In one of my templates, link at end, I'm trying to make a version that will generate/add page numbers when I convert with Pandoc using this template. For some reason, Microsoft Word won't let me add page numbers to the template itself. Has anyone done this with templates? Made it so page numbers are added upon conversion? Literary agents and publishers don't like plain text files, and they need things in Shun Manuscript format, some agents and publishers want page numbers so I wanna just add it to a template and never have to think about it again. This is my template. https://github.com/rkingett/writertools/blob/main/Pandoc%20templates/PandocReferenceWithHeadingsCreatingNewPages.docx
writertools/Pandoc templates/PandocReferenceWithHeadingsCreatingNewPages.docx at main · rkingett/writertools

A repository that will hold various tools and templates for writers. - rkingett/writertools

GitHub

@WeirdWriter Do you use a shell script or make/just/build file for creating your books?

There is an obscene way of syncing styles in Word and Libreoffice documents. The docx file is a zip archive, so I usually created a template.docx file that had the actual style I wanted based on the style names that Pandoc generates. Then I extract things like the style (word/styles.xml) or header (word/header1.xml) from the template and update that file in the resulting file after Pandoc generates it.

It is graceless and kind of a heavy stick, but it's a technique I've used since the 2000s but it keeps working.

I could look into doing it properly, if you want too. :D

@dmoonfire I'm on Windows, so no shell scripts, and I never could figure out Make files, so I just use Pandoc for everything but tell Powershell to sort the files before Pandoc does it's thing. I can work with styles in MS Word, so was hoping you knew of something proper? I don't use LibreOffice as much because it's not as screen reader friendly as Microsoft Word is for track changes, comments, things editors and agents use often. I tried to get them to just use plain text files and have them make comments inline, etc. But the industry standard is Word. Ugh, so I'd rather just have everything in one template I can use if needed. Not sure why everyone is so scared of text files, especially in publishing, but it's frustrating!
@WeirdWriter Let me see what I can do.
Thank you! I'd use Pandoc's --page_numbers command but everyone wants it at the top, in the header and that command ads them to footers. Thank you again! @dmoonfire
@dmoonfire But yes if you could try for something proper that would be epic!

@WeirdWriter Looking at my old notes, I see that I was adding page numbers into the template-story.docx with Word and the resulting Pandoc generated file has the page numbers. I don't have the old templates, but I grab someone's template and got it working.

Maybe Word is inserting page numbers differently?

@WeirdWriter That is assuming you can use Word's numbers in the template file's header instead of using pandoc's page_number.

Sadly, the template functionality of Pandoc isn't as robust as the other formats.

@WeirdWriter I also noticed Libreoffice has two "insert page numbers" now, so I'm thinking maybe Word is doing the same? There is insert page number which does formatting for the entire footer and there is "insert field" and then choosing page number which sticks it where you want.