joplin icon indicating copy to clipboard operation
joplin copied to clipboard

KaTeX parse error

Open pantiandashi opened this issue 1 year ago • 3 comments

Environment

Joplin version: 2.9.1 Platform: Linux OS specifics: manjaro 5.15

Steps to reproduce

When you write the below text in the note:

  1. $\colorbox {aqua}{$\color{red}{f=ma}$}$

It gives below error: KaTeX parse error: Unexpected end of input in a macro argument, expected '}' at end of input: …olorbox {aqua}{ \color{red}{f=ma} KaTeX parse error: Expected 'EOF', got '}' at position 1: }̲

Describe what you expected to happen

https://katex.org/,Type an expression: 1

Logfile

pantiandashi avatar Aug 05 '22 11:08 pantiandashi

$\colorbox{aqua}{\color{red}{f=ma}}$ should work fine.

SeptemberHX avatar Aug 06 '22 05:08 SeptemberHX

'$$' replace '$',it's OK:

$$
\fcolorbox{red} {aqua}{\color{red}{$F=ma$}
$$

some differences between "text" and "math mode with $" 2

pantiandashi avatar Aug 07 '22 08:08 pantiandashi

Escaping the $s fixes it for me:

$\colorbox {aqua}{\$\color{red}{f=ma}\$}$

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

github-actions[bot] avatar Sep 08 '22 16:09 github-actions[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, feel free to create a new issue with up-to-date information.

github-actions[bot] avatar Sep 15 '22 16:09 github-actions[bot]

Would seem a common cause of a "KaTex parse issue". Perhaps some flag, that if there is a EOF error, perhaps it is not KaTex at all. Turning off the "Math Expressions" worked for me in my situation. Thank you for posting above.

l-arnold avatar Oct 17 '23 12:10 l-arnold