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

Display equations? #434

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

Display equations? #434

cossio opened this issue Apr 18, 2018 · 7 comments
Labels
bug It's a bug

Comments

@cossio
Copy link

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
Copy link
Author

cossio commented Apr 18, 2018

For some reason,

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

renders as a proper display equation.

@laurent22
Copy link
Owner

Is this one a valid notation anyway?

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

@laurent22 laurent22 added the bug It's a bug label Apr 19, 2018
@cossio
Copy link
Author

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
Copy link

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
Copy link
Author

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
Copy link
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
Copy link
Author

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

@lock lock bot locked and limited conversation to collaborators Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug It's a bug
Projects
None yet
Development

No branches or pull requests

3 participants