Not sure what causes the problem without seeing your codes, the result of the KaTeX module seems work as expected.
```katex
\mathcal I := { X\subset E : \text{the vectors in $X$ are linearly independent} }.
```
```katex
\{\text{this should have braces!}\}
```
{{< katex >}}
{A}_B C_{D}
{{< /katex >}}