Welcome to Codidact Meta!
Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.
Post History
The trigger in this case is surrounding text with either $latex$ or \(latex\) for inline math $$latex$$ or \[latex\] for "display math" (centered and on a new line) The MathJax parser is sma...
Answer
#2: Post edited
- The trigger in this case is surrounding text with either
- - `$latex$` or `\(latex\)` for inline math
- `$$latex$` or `\[latex\]` for "display math" (centered and on a new line)- The MathJax parser is smart enough to ignore `$` when there is only one on the line, which can make it seem inconsistent if you don't know how it works, but it's fairly intuitive if you do know.
- However, there are problems due to other formatting that we do. According to the [CommonMark Specification](https://spec.commonmark.org/0.30/#backslash-escapes) which we follow, "Any ASCII punctuation character may be backslash-escaped". This includes \$, which is problematic in that it means that we have to escape the escape character:
- If you want to type a literal `$`, it needs to be escaped as `\$` so that the MathJax parser ignores it. If you want to type `\$`, however, it needs to be escaped as `\\$` so that the CommonMark parser ignores it.
- -----
- In regards to help documentation, MathJax is not enabled on every community, so having help documentation on communities that do not have it enabled would be confusing (that being said, the inconsistency between communities can also be quite confusing). For communities that *do* have MathJax enabled, there should be documentation. Take a look at [Math's help](https://math.codidact.com/help/formatting) for instance.
- If you find a community with MathJax but without that help section, please raise an issue.
- The trigger in this case is surrounding text with either
- - `$latex$` or `\(latex\)` for inline math
- - `$$latex$$` or `\[latex\]` for "display math" (centered and on a new line)
- The MathJax parser is smart enough to ignore `$` when there is only one on the line, which can make it seem inconsistent if you don't know how it works, but it's fairly intuitive if you do know.
- However, there are problems due to other formatting that we do. According to the [CommonMark Specification](https://spec.commonmark.org/0.30/#backslash-escapes) which we follow, "Any ASCII punctuation character may be backslash-escaped". This includes \$, which is problematic in that it means that we have to escape the escape character:
- If you want to type a literal `$`, it needs to be escaped as `\$` so that the MathJax parser ignores it. If you want to type `\$`, however, it needs to be escaped as `\\$` so that the CommonMark parser ignores it.
- -----
- In regards to help documentation, MathJax is not enabled on every community, so having help documentation on communities that do not have it enabled would be confusing (that being said, the inconsistency between communities can also be quite confusing). For communities that *do* have MathJax enabled, there should be documentation. Take a look at [Math's help](https://math.codidact.com/help/formatting) for instance.
- If you find a community with MathJax but without that help section, please raise an issue.
#1: Initial revision
The trigger in this case is surrounding text with either - `$latex$` or `\(latex\)` for inline math - `$$latex$` or `\[latex\]` for "display math" (centered and on a new line) The MathJax parser is smart enough to ignore `$` when there is only one on the line, which can make it seem inconsistent if you don't know how it works, but it's fairly intuitive if you do know. However, there are problems due to other formatting that we do. According to the [CommonMark Specification](https://spec.commonmark.org/0.30/#backslash-escapes) which we follow, "Any ASCII punctuation character may be backslash-escaped". This includes \$, which is problematic in that it means that we have to escape the escape character: If you want to type a literal `$`, it needs to be escaped as `\$` so that the MathJax parser ignores it. If you want to type `\$`, however, it needs to be escaped as `\\$` so that the CommonMark parser ignores it. ----- In regards to help documentation, MathJax is not enabled on every community, so having help documentation on communities that do not have it enabled would be confusing (that being said, the inconsistency between communities can also be quite confusing). For communities that *do* have MathJax enabled, there should be documentation. Take a look at [Math's help](https://math.codidact.com/help/formatting) for instance. If you find a community with MathJax but without that help section, please raise an issue.