The Useful Thread

Out of context: Reply #1004

  • Started
  • Last post
  • 1,672 Responses
  • kingsteven5

    Niche, i know... but just spent days trying to convert Microsoft Word documents containing Word equations to HTML with equations stored as LaTEX as fallback for accessibility (blind mathematicians are often fluent in TEX!)... stumbled upon this simple solution that may save someone a few days work.

    Use the command line tool Pandoc ... if you do a lot of document conversion/ reformatting of documents check it out anyway, it is a lifesaver.

    https://pandoc.org/

    use pandoc to convert docx -> tex (will convert the entire document to tex including equations)

    use pandoc to convert tex -> html (as there is no filter to convert equations out of tex so you will get error messages and pandoc will wrap offending code in span tags and $ delimiters)

    use mathjax library to render the equations as SVG and maintain the original equation as alt text.

    https://www.mathjax.org/

    • This is relevant to my problems. Thanks!ETM

View thread