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

[bug] KaTeX parse error: $ within math mode #2252

Closed
ghost opened this issue Jul 27, 2018 · 9 comments
Closed

[bug] KaTeX parse error: $ within math mode #2252

ghost opened this issue Jul 27, 2018 · 9 comments
Labels
bug 🐛 Issue concerns a bug. help wanted 🆘 Pull request/issue requires extra help from the community. Check these out if you're new!

Comments

@ghost
Copy link

ghost commented Jul 27, 2018

Current behavior

1st time I am using Latex with Boostnote, I hope I am doing it right.

I simply copy & paste example from the wiki: TeX-support and got the following error: KaTeX parse error: $ within math mode

katex parse error

Steps to reproduce

  1. create a new note, copy paste the example provided in the wiki
  2. observe the result

Environment

  • Version : 0.11.8
  • OS Version and name : 16.04 Ubuntu
@ghost
Copy link
Author

ghost commented Jul 27, 2018

I think the provided example is at fault? If I use $$ instead of $$$ the 1st example works. The second doesn't, though:
tex support


Edit: Ok, the 2nd example works if I use $ instead of $$

@taohonker
Copy link

I can confirm this issue.
It seems that using \[ \] for display math and \( \) for inline math works, which is in accordance with LaTeX.

@ghost
Copy link
Author

ghost commented Jul 28, 2018

@taohonker
what is the correct way to do it? Is \[ \] a workaround? How to use it? Sorry I am new to this.

@kazup01 kazup01 added bug 🐛 Issue concerns a bug. help wanted 🆘 Pull request/issue requires extra help from the community. Check these out if you're new! labels Jul 29, 2018
@taohonker
Copy link

In LaTeX, \[...\] is equivalent to $$...$$. But in anywhere else you cannot find an always-correct way. At least in Boostnote \[...\] works.

@ghost
Copy link

ghost commented Jul 29, 2018

This isn't a bug the problem is that "$$...$$" is being used for inline Katex code

Edit: I meant to say "text can't be on the same line as the katex code block"
github

@IssueHuntBot
Copy link

@BoostIO funded this issue with $30. Visit this issue on Issuehunt

@ghost
Copy link
Author

ghost commented Jul 30, 2018

then Boostnote is working fine. It's only the examples on the wiki are both incorrect / possibly outdated.

@ghost
Copy link

ghost commented Jul 31, 2018

It is outdated. That was the way it used to work before. now it is customisable. with the defaults being $...$ for inline and $$...$$ for block

You can change them to work the way they did before if you like, but i prefer the way they work now.
capture

@ghost
Copy link
Author

ghost commented Jul 31, 2018

@OnlineVagrant
ok , thank you for clarifying. 👌
I'll close the issue.

@ghost ghost closed this as completed Jul 31, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Issue concerns a bug. help wanted 🆘 Pull request/issue requires extra help from the community. Check these out if you're new!
Projects
None yet
Development

No branches or pull requests

3 participants