admin管理员组

文章数量:1410674

I know MathJax, especially with ASCIIMath, processes a lot of different words into symbols. But is there any way to prevent it from converting specific words?

For example, it turns every instance of lt into <. Can I make it so that it keeps it as lt instead?

I know MathJax, especially with ASCIIMath, processes a lot of different words into symbols. But is there any way to prevent it from converting specific words?

For example, it turns every instance of lt into <. Can I make it so that it keeps it as lt instead?

Share asked Jul 21, 2014 at 14:54 user400935user400935 4
  • Is l t (with a space) enough for you? AFAIK, there's no escape character in asciimathml. – Peter Krautzberger Commented Jul 21, 2014 at 20:34
  • Sadly, no, because the user will be the one inputting the equations. – user400935 Commented Jul 22, 2014 at 14:59
  • Ok, I don't understand the question then, I'm afraid. – Peter Krautzberger Commented Jul 22, 2014 at 15:41
  • cant you use the delimiter? put lt outside of it ?! – roeb Commented Nov 2, 2015 at 14:39
Add a ment  | 

3 Answers 3

Reset to default 4

I don't know if this is a correct way to do it, but I was able to get it to render as lt by putting a \ between the l and t like this: l\t.

I know this thread is very old. But I stumbled across the same problem while adding a math formula to an AsciiDoc text.

\frac{5\ \text{GT }}{\text{s}} \times \frac{1\ \text{Bit}}{\text{T} \times \text{Lane}} \times \frac{\text{8 Bit}}{\text{10 Bit}} \times 16\ \text{Lanes} = \frac{64\ \text{GBit}}{\text{s}} =  \frac{8\ \text{GByte}}{\text{s}}

I just added white-space after the GT to avoid rendering it to >.

Double-quoted (") string works for me, see an example below:

<script>
MathJax = {
  loader: {
    load: ['input/asciimath', 'output/chtml', 'ui/menu']
  },
};
</script>
<script src="https://cdn.jsdelivr/npm/mathjax@3/es5/startup.js"></script>

<p>Without quotes: `c_in = c_out ^ gamma`</p>

<p>With quotes: `c_"in" = c_"out" ^ gamma`</p>

本文标签: javascriptHow to get MathJaxASCIIMath to ignore certain wordsStack Overflow