Why does joplin keep messing my equations

Operating system

Linux

Joplin version

3.3.12

What issue do you have?

I write down my equations in the correct format and then it messes it all up, it's not the first time it happens.

It separates the equations from the $ and it inserts a bunch of \. it inserted the <sup tag as well. Then i have to fix all the equations.

Screenshots

Joplin is based on markdown, and backslash is used as an escape character in markdown.

If you have text that contains a backslash (and you want ensure that the backslash is rendered when looking at the rendered markdown preview), there sometimes needs to be another backslash to escape it.

For example $In\frac may be rendered as: $Infrac

But $In\\frac will be rendered as $In\frac

So, it will look odd in the markdown editor view, but should look correct in the rendered view.

If seeing the extra backslashes in the editing view makes you feel icky (as it does for me as well xD) you can put the equations in inline code by surrounding them with backticks:

`$In\frac`

Alternately, a code block could be used (three backticks above and below the text)

Text that's formatted as code (inline code or code block) will be displayed exactly as is, with no extra escape characters needed.

1 Like

Writing it as code displays exactly as it is but I want it to be displayed as the equation form and not be changed by joplin. Example:

All my equations were correct like that then joplin changed it all.

gotcha- is there any particular action in joplin that seems to trigger this happening?

I tested entering an equation here and then doing things such as switching between the markdown and rich text editor, and making changes to the note in the rich text editor and it didn't seem to mess with the equation formatting at all

Yes, i think i figured out what triggers it. It seems to happen when i have the $ on different lines, between the equation. Example:

$
equation
$

Then i make changes to my tables using the rich text editor. I guess i will just write the equations in the same line instead of separating it.

Try doing two dollar signs instead:

$$
Equation
$$

Yes, that's another alternative. I was using singular dollar signs because i wanted certain equations to not be centered

I replicated this issue and cause on the same OS and Joplin version. In the meantime, instead of using the problematic Rich Text editor, you can keep dollar signs in place how you want by using Markdown plugins for table management:

2 Likes

Rather than trying to use $...$ to align the equations to the left as inline text, you could align them within a $$...$$ block using LaTeX's built in flalign environment to align everything flush with the left.

There's a post that goes into more detail here

1 Like