From ae90d3ed14e962ed1827674612f0528e258073ce Mon Sep 17 00:00:00 2001 From: sorata Date: Sun, 12 Jan 2025 13:18:00 +0530 Subject: [PATCH] Explain Customising MathJax (#324) * use mathjax to render equation * explain how to customise mathjax --- src/math.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/math.md b/src/math.md index 6fae6d50..6c93aa1d 100644 --- a/src/math.md +++ b/src/math.md @@ -25,12 +25,13 @@ To try it out: \(\sqrt{x}\) -4. If you click the Cards… button, you’ll see a preview of how the +4. Click the **Cards...** button. You’ll see a preview of how the equation will appear when the card is reviewed. + \\[\sqrt{x}\\] Anki’s MathJax support expects content in TeX format. If you’re not familiar with TeX formatting, please see [this cheatsheet](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference). -Please note that point 2 does not apply in Anki - Anki uses `\(` and +Please note that point 1 does not apply in Anki - Anki uses `\(` and `\)` for inline equations, and `\[` and `\]` for display equations. If you want to use newlines in a MathJax expression, please use @@ -42,7 +43,23 @@ equations. Please see the 'chemical equations' section and the following sections for more information: -It is possible to [customize some settings](https://faqs.ankiweb.net/customizing-mathjax.html). +### Customize MathJax + +Anki's bundled MathJax support is loaded before card content, so if you wish to customise MathJax you'll have to do so in a specific way. An example is provided here. + +```javascript + +``` + +Note that Anki has special logic for cloze deletions that might not work if you change the standard delimiters for MathJax equations. ## LaTeX