Just as a codicil... I heard of pandoc only courtesy of this thread and have tried it.
I write my university syllabi in highly modular XeLaTeX code with oodles of packages and commands defined by me. As the university has lately been making noises about verifying accessibility and I don’t have access to Acrobat nor wish to acquire it on my dime, a conversion method of whatever type was timely. I ran my latest syllabus through pandoc and though I’ve not had time to do thorough testing, the results were excellent as far as I can tell at first glance with only minor issues which may be due to how I have things set up. Flip side is that make4ht, which I also leaned of here, didn’t run successfully; it choked on some csname issue... which I’ll look into at end of term. FWIW.... Karljürgen Sent from my iPhone > On Mar 13, 2019, at 9:15 AM, Mojca Miklavec ... > > I just want to say that pandoc uses its own parser for TeX, so I > wouldn't expect it to work well for anything but relatively trivial > TeX syntax (I would expect user-defined macros to mostly fail), and > it's also a bit non-trivial to figure out how to modify it and build > it. I have absolutely no idea to what extent packages are supported > and how.