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

Fixes the nthRoots latexFunctions template string. #3427

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

aitee
Copy link

@aitee aitee commented Mar 19, 2025

The $ was misplaced from the brace it was intended to be associated with.

When this template was selected, and attempted to be rendered in KaTeX, the following error was occurring:
katex.mjs:147 Uncaught (in promise) ParseError: KaTeX parse error: Can't use function '$' in math mode<…>
 
For my own understanding, where do these template strings come from? Are they standard representations within the math community? Or are some of them more LaTeX centric? I'd be curious to know if there is a good resource for these conventions (like the y in nthRoots).

Thanks!

aitee added 2 commits March 19, 2025 23:45
The $ was misplaced from the brace it was intended to be associated with.
Future: could add more functions, but kept it narrow for now.
Copy link
Owner

@josdejong josdejong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this issue and adding a test for it!

I made one inline comment, can you have a look at that?

@aitee aitee requested a review from josdejong March 20, 2025 19:02
Copy link
Owner

@josdejong josdejong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates!

@josdejong
Copy link
Owner

I see the linter complains:

/home/runner/work/mathjs/mathjs/test/unit-tests/expression/node/FunctionNode.test.js
Error:   523:1  error  Trailing spaces not allowed         no-trailing-spaces
Error:   523:1  error  More than 1 blank line not allowed  no-multiple-empty-lines

✖ 2 problems (2 errors, 0 warnings)
  2 errors and 0 warnings potentially fixable with the `--fix` option.```
Can you run `npm run format` please?

@aitee
Copy link
Author

aitee commented Mar 24, 2025

I think it is good to go?

@aitee aitee requested a review from josdejong March 24, 2025 20:46
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

Successfully merging this pull request may close these issues.

2 participants