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

Display equations? #434

Closed
cossio opened this Issue Apr 18, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@cossio

cossio commented Apr 18, 2018

Operating system

  • Linux

Application

  • Desktop

Both $$ \sum_i f(x)$$ and $\sum_i f(x)$ render as inline equations:

image

What can I do to get a proper display equation (for example, the index in the sum should be below the sum), like this:

image

@cossio

This comment has been minimized.

cossio commented Apr 18, 2018

For some reason,

$$
\begin{aligned}
\sum_i
\end{aligned}
$$

renders as a proper display equation.

@laurent22

This comment has been minimized.

Owner

laurent22 commented Apr 19, 2018

Is this one a valid notation anyway?

Or should both inline and block notations be changed to this one?

@laurent22 laurent22 added the bug label Apr 19, 2018

@cossio

This comment has been minimized.

cossio commented Apr 19, 2018

@laurent22 Both are valid notations. The first one is commonly used when the equation is in the same line as the text, so it is more "compressed".

Maybe the issue is that Katex is not seeing both dollar signs together in $$ ... $$? Perhaps for some reason the parser is only capturing one of the dollar signs and therefore interpreting it as an inline equation?

@luriomer

This comment has been minimized.

luriomer commented Apr 20, 2018

Since joplin relies on katex with this one, I don't think this is a bug in joplin itself.

@cossio

This comment has been minimized.

cossio commented Apr 20, 2018

@luriomer Katex renders display equations without problems in other applications. Could it be a problem in the way the text is sent to katex?

@laurent22

This comment has been minimized.

Owner

laurent22 commented Apr 23, 2018

It probably renders the markdown too frequently. It's fine when it's just text to HTML, but the Katex formula is slower to render so it's causing an issue. I will add something to make it render less frequently when Katex is used.

@cossio, I'm not completely familiar with Katex notation but if, in the background (i.e. it won't be visible), we wrap all Katex blocks in \begin{aligned} \end{aligned} would it fix the issue? Could this cause any problem if the user wants a different alignment?

@cossio

This comment has been minimized.

cossio commented Apr 23, 2018

@laurent22 I suspect hard-coding \begin{aligned} and \end{aligned} can lead to troubles. I only mentioned it as an example to perhaps help diagnose the problem

@laurent22 laurent22 closed this in e534414 May 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment