Parse error dollar in math mode #3509
Replies: 2 comments 2 replies
-
There isn't currently an API for rendering a bunch of text with multiple math expressions like that (see #604). The intent is to call There is code for doing roughly this in |
Beta Was this translation helpful? Give feedback.
-
I am using Flutter library flutter_markdown_latext wich is built upon flutter_math_fork. This library uses single-dollar for "inline" mode, and double-dollar for "block". I am not sure what "math mode" is, but I have exact same exception with text line starting with '$' When I write it "inline", with text surrounding, I don't have any exception and it is rendered properly, Thank you! |
Beta Was this translation helpful? Give feedback.
-
Hello, I am pretty new to the KaTeX and the whole LaTeX concept itself. However, using your library I am trying to render such
string to HTML:
Given, $f(x)=\log x,g(x)=\sin x and h(x)=\cos x$. Below we show the graph of $f\left(h\left(x\right)\right)$, and we can check the predictions in part (d). From the graph we see that the domain of this function is $\left\{x \in \mathbb{R}, \frac{(4 n-1) \pi}{2}<x<\frac{(4 n+1) \pi}{2}, n \in \mathbb{Z}\right\}$ and the range is $\{y \in \mathbb{R}, y \leq 0\}$.
options I am using during the render op:
throwOnError: true, output: 'html', strict: 'ignore', trust: true, displayMode: true,
I was using this live katex preview site -> https://sixthform.info/katex/examples/demo.html in order to determine whether the string I am trying to parse is any good. Now, I know it uses a bit older version (13.2) but at least it rendered.
after using your function
renderToString(aboveString, aboveOptions)
I am getting this error ->KaTeX parse error: Can't use function '$' in math mode at position 8: Given $̲f(x)=\log x g(x…
Same happens if I use double dollar sign. I found somewhere in the internet that it could be replaced by that ->
\[...\]
. Funny thing is that If I escape above equations with said brackets, the first one seems to be fine and the error rises when the parser reaches any consecutive formula...I started worrying about my mental health after few days of trying to solve this one 😄 . Any help and more importantly explanation would be very welcome guys
Beta Was this translation helpful? Give feedback.
All reactions