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

Unknown function parsing #33

Open
stefnotch opened this issue Aug 9, 2021 · 0 comments
Open

Unknown function parsing #33

stefnotch opened this issue Aug 9, 2021 · 0 comments
Labels
enhancement New feature or request upstream Upstream issue

Comments

@stefnotch
Copy link
Owner

We have to wait for the next compute-engine version https://cortexjs.io/docs/compute-engine/#(ParseLatexOptions%3Atype)

Compute-engine: parser should recognize unknown functions (like silly())
so, basically

  1. check if its a known token
  2. if not, check if brackets come right after it x()
  3. if there are brackets, its a function
  4. otherwise, split the letters and treat them as individual stuff

From Gitter

@stefnotch you can provide a parse function for xrightarrow that would parse for valid functions in the "above" argument.
Arno Gourdol
@arnog
12:16
For recursive functions, you have two options I can think of: use the parseUnknownToken option in the LatexSyntax parser to recognize foo as a function token.
The second option would be for the definition of the := operator to create a scope (using ce.pushScope()) with a custom definition for the foo symbol. This gives you more flexibility (such as defining a domain, an argument list, etc...) in defining the symbol.

This was referenced Aug 10, 2021
@stefnotch stefnotch added enhancement New feature or request upstream Upstream issue labels Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request upstream Upstream issue
Projects
None yet
Development

No branches or pull requests

1 participant