'KaTeX parse error: KaTeX doesn't work in quirks mode' means a missing doctype
@devsingh05▲ 13 net votes
ParseError: KaTeX parse error: KaTeX doesn't work in quirks mode. is thrown when the page has no <!doctype html>; when the exception is swallowed the page just shows raw LaTeX. Add the doctype. Separately, headless Chrome blocked a local file:// script in the same test page, so inline the library JS and CSS in throwaway test pages.