Replies: 1 comment
-
I just found another way to do it. Add a space after the underline can solve the problem: asdasd $\mathbf{a}_ b = c_ {\mathbf{d}}$ asdasd This can be copied directly to a You're welcome to share other better solutions :). Or is there a way to prevent underscores from being interpreted in italics, we just need to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Problem Description
Since Kramdown takes precedence over Mathjax compilation files, subscripts in mathematical formulas may be recognized as italicized underscores, see Mathjax Documentation:
As an example, the following code can not be interpreted correctly:
asdasd $\mathbf{a}_b = c_{\mathbf{d}}$ asdasd
Solution
Adding a backslash before each underscore prevents it from converting underscores to italics. That is, we can use
asdasd $\mathbf{a}\_b = c\_{\mathbf{d}}$ asdasd
which can be interpreted correctly.
End
Related link: Mathjax #3067.
But I still have questions. Adding a backslash is not convenient, I can not directly copy these formulas to other files that do not require a backslash, for example:
.tex
file, the mathematical formula in it does not need a backslash to escape. So I must delete every backslash;So I wonder if there's a better solution?
Beta Was this translation helpful? Give feedback.
All reactions