File size: 1,393 Bytes
b27bfb3 | 1 2 3 4 5 | {"type": "session", "harness": "opencode", "id": "doc-0011", "name": "Markdown math with KaTeX and MathJax"}
{"type": "message", "message": {"role": "system", "content": "You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing code, identify bugs, security issues, and performance problems. You have deep knowledge of C/C++, Windows API, Python, and many other technologies."}}
{"type": "message", "message": {"role": "user", "content": "How to use math in Markdown"}}
{"type": "message", "message": {"role": "assistant", "content": "KaTeX and MathJax render LaTeX math in web browsers within Markdown.\n\nKaTeX: fast client-side rendering. Delimiters: single dollars for inline, double dollars for display, or backslash-paren/backslash-bracket.\n\nMathJax: full LaTeX support, slower but more complete. Version 3 is modular.\n\nGitHub Flavored Markdown renders LaTeX math natively since 2022.\n\nJupyter notebooks support LaTeX math in Markdown cells.\n\nConfiguration examples:\n- KaTeX auto-render extension for web pages\n- MathJax config object for delimiters\n- Hugo, MkDocs, Docusaurus plugins for static sites\n\nBoth support: Greek, operators, matrices, aligned, cases, fractions, roots, subscripts, superscripts."}}
|