# Mathjax renders badly

**URL:** <https://forums.ankiweb.net/t/mathjax-renders-badly/29329>\
**Category:** Help\
**Created:** [April 13, 2023, 4:07am UTC](https://forums.ankiweb.net/t/mathjax-renders-badly/29329 "2023-04-13T04:07:20Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [April 17, 2023, 2:50am UTC](https://forums.ankiweb.net/t/mathjax-renders-badly/29329/7 "2023-04-17T02:50:43Z")

</div>

You are calling JavaScript in your card template to define custom MathJax macros. Calling getComponents() more than once causes MathJax to get confused, so as described in the link above, you must add a check to only call it once.

---

_[View the full topic](https://forums.ankiweb.net/t/mathjax-renders-badly/29329)._
