Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOF error with overrightarrow & superior/inferior #532

Closed
jbg77 opened this issue Sep 15, 2016 · 6 comments
Closed

EOF error with overrightarrow & superior/inferior #532

jbg77 opened this issue Sep 15, 2016 · 6 comments

Comments

@jbg77
Copy link

jbg77 commented Sep 15, 2016

Hello,

I have an error with parsing to string, the overrightarrow & superior/inferior don't work:

Exception while invoking method 'createPDF' ParseError: KaTeX parse error: Expected 'EOF', got '\overrightarrow' at position 15: \overrightarrow̲{grad}V=\frac{
    at new ParseError (/bundle/bundle/programs/server/npm/node_modules/katex/src/ParseError.js:29:16)
    at Parser.expect (/bundle/bundle/programs/server/npm/node_modules/katex/src/Parser.js:76:15)
    at Parser.parseInput (/bundle/bundle/programs/server/npm/node_modules/katex/src/Parser.js:116:10)
    at Parser.parse (/bundle/bundle/programs/server/npm/node_modules/katex/src/Parser.js:105:22)
    at parseTree (/bundle/bundle/programs/server/npm/node_modules/katex/src/parseTree.js:14:19)
    at Object.renderToString (/bundle/bundle/programs/server/npm/node_modules/katex/katex.js:52:16)
Exception while invoking method 'createPDF' ParseError: KaTeX parse error: Expected 'EOF', got '&' at position 30: V}{\partial r}&̲lt;0
    at new ParseError (/bundle/bundle/programs/server/npm/node_modules/katex/src/ParseError.js:29:16)
    at Parser.expect (/bundle/bundle/programs/server/npm/node_modules/katex/src/Parser.js:76:15)
    at Parser.parseInput (/bundle/bundle/programs/server/npm/node_modules/katex/src/Parser.js:116:10)
    at Parser.parse (/bundle/bundle/programs/server/npm/node_modules/katex/src/Parser.js:105:22)
    at parseTree (/bundle/bundle/programs/server/npm/node_modules/katex/src/parseTree.js:14:19)
    at Object.renderToString (/bundle/bundle/programs/server/npm/node_modules/katex/katex.js:52:16)

How can I fix it ?

Thank in advance

@jbg77 jbg77 changed the title EOF error with overrightarrow EOF error with overrightarrow & superior/inferior Sep 15, 2016
@kevinbarabash
Copy link
Member

@jbg77 we don't support \overrightarrow. Can you post the rest of the TeX code that you're trying to parse?

@kevinbarabash
Copy link
Member

@jbg77 you might be interested in #524.

@jbg77
Copy link
Author

jbg77 commented Sep 17, 2016

I will look that

The code is simply \frac{\partial V}{\partial r} < 0
And what about the support of char like: é, è etc
Thank you by the way :)

Edit: same problem with &̲nbsp;and ' ' (space), and it's why < or > doesn't work, because they are html entities

@gagern
Copy link
Collaborator

gagern commented Sep 20, 2016

If your input to KaTeX contains HTML entities, you have to either change the way you obtain that input so that they don't get escaped or you read them from the DOM after they have been handled. Or you have to add a string rewrite step of your own to undo the html entity escaping. This is essentially outside the core of KaTeX, but depends on the glue you use to feed KaTeX its input.

@kevinbarabash
Copy link
Member

Support for é, è, etc is on master. For < and > use \lt and \gt. @jbg77 in the title of this issue you mentioned superior/inferior, are you referring to \sup and \inf?

@kevinbarabash
Copy link
Member

Support for \overrightarrow was added in v0.8.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants