Boostnote: [bug] KaTeX parse error: $ within math mode

Created on 27 Jul 2018  路  9Comments  路  Source: BoostIO/Boostnote

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
bug help wanted

Most helpful comment

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

All 9 comments

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 $$

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

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

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

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

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

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

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NonlinearFruit picture NonlinearFruit  路  3Comments

luong-komorebi picture luong-komorebi  路  3Comments

Ocanamat picture Ocanamat  路  3Comments

npeeples picture npeeples  路  3Comments

dtgay picture dtgay  路  3Comments