mathjax / MathJax-node

MathJax for Node
Apache License 2.0
614 stars 97 forks source link

[Latex to svg] "\xrightarrow\text {1}" conversion error? #450

Closed lyxabymxlc closed 5 years ago

lyxabymxlc commented 5 years ago

I tried the following conversion: \xrightarrow\text {1}, get error: 'TeX parse error: Missing argument for \text' But the following formulas are all successful. \xrightarrow1 \xrightarrow{1} \xrightarrow[]{1}

My configuration is as follows: image

How do I convert Latex " \xrightarrow\text{1}"?

dpvc commented 5 years ago

How do I convert Latex " \xrightarrow\text{1}"?

This isn't valid LaTeX. You need to use

\xrightarrow{\text{1}}

The braces are necessary since without it, the effect is the same as \xrightarrow{\text}{1}, which is an error, as reported by MathJax (the\textis separated from its argument because the argument to\xrightarrowis just the single token that follows it, namely\text`).

lyxabymxlc commented 5 years ago

Okay, I see, let me fix it. I thought \text{1} was one. Thank you very much.