# Display equations? #434

Closed
opened this Issue Apr 18, 2018 · 7 comments

Projects
None yet
3 participants

• Linux

### Application

• Desktop

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

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

### cossio commented Apr 18, 2018

 For some reason, \begin{aligned} \sum_i \end{aligned} renders as a proper display equation.
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?

### 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 commented Apr 20, 2018 • edited

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

### cossio commented Apr 20, 2018 • edited

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

### laurent22 commented Apr 23, 2018 • edited

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