Did you try an agentic harness already? (They let the LLMs add a self-verification loop, with tests, renders and validators, and self-iterate until they get it correct.)
It wasn’t clear from your posts what exactly you were doing with the LLMs, but if you were using just the bare chatbots (like “Claude” instead of “Claude Code”, for example, or ChatGPT instead of Codex), a harness can help a lot for this specific use case. Your choice of harness (and the instructions you give it) can matter more than your choice of model or provider for something like this.
A bare chatbot usually can’t see and check its own output. A harness can render the finished .docx, write tests and scripts to validate that the output matches the spec, and use a vision model to do a visual pass. Most importantly, it can do all of that autonomously, in one long cycle of iterative test-driven development, and then report back to you after a few minutes (or hours), and only after it’s reasonably confident about its results — because the deterministic tests against your on-disk render verified it in code, not just because it’s pulling more nonsense out of its training. A harness still isn’t a perfect system, but for the purposes of software development, it is a big improvement over the bare chatbots.
Anyway, whether you WANT to keep at it is entirely up to you. Let me know if you want a free 1-week guest pass to Claude Code (along with a sample prompt). I’m happy to chat if you want to discuss it more, or send me a sample, but otherwise, just use one of the non-AI tools?
I mean, of course you’re free to do that if you want. You just don’t necessarily need to. I guarantee you this problem has been looked at and tackled by many people already… their existing work could be a good starting place, rather than trying to do this from scratch?
There are existing open-source Shunn exporters made for this specific use case already, including the Obsidian exporters mentioned back in post #22.
Did you ever try those? Do they not work…? Do they not fit the bill for some reason? (Or do you maybe just not want to use Obsidian?)
There’s also an existing Pandoc template for Shunn outputs: GitHub - prosegrinder/pandoc-templates: An opinionated set of Pandoc templates and scripts for converting markdown to DOCX manuscripts that adhere to William Shunn's Proper Manuscript Format guidelines using Pandoc. · GitHub
Or a simple standalone Python script if you prefer: md2shunn
Any of those should get you close to the goalpost, if not 100% of the way there. They should make the final LibreOffice cleanup easier, if nothing else? Worth a shot.
Of course… if you were really just venting about how difficult some FOSS software can be, well then… I entirely agree, and apologize for the word vomit of unsolicited advice 