As we're sharing pipelines:
- I write in Markdown files using VS Code and a custom syntax highlighter
- A custom C# tool stitches it together (with YAML metadata)
- It generates reports on chapters, dialogue, character presence etc
- It uses custom code to generate an EPUB (v2)
- It uses custom code to generate a DOCX (validated)
- It uses custom code to generate a PDF (print or with interactive links)
Works great and gives perfect results in seconds (beats Vellum, which I quite like). The only drawback is the yak shaving involved in my totally stand-alone solution leads to more time tinkering than writing.