as-com / wp-katex

Integrates the fast KaTeX LaTeX typesetter with WordPress
https://andrewsun.com/projects/wp-katex/
GNU General Public License v2.0
9 stars 5 forks source link

\displaystyle command lets the equation in math mode #11

Closed i3vi3 closed 7 years ago

i3vi3 commented 7 years ago

If we write a command like

[latex]\displaystyle \sum_{i=1}^n[/latex]

I think it should displayed in inline mode but the rendering itself is like display mode (e.g. with "i=1" just below \sum.) In fact, this is the usage of \displaystyle and the original KaTeX also behaves like this.

The current \displaystyle in wp-katex seems to be equivalent to adding display="true to [latex], but this is not a standard behavior.

I love this plug-in so much and would be very glad if you could fix this issue.

as-com commented 7 years ago

This is intended behavior, but you can work around this by putting a space before the \displaystyle at the beginning of the equation. For example:

[latex] \displaystyle whatever[/latex]
i3vi3 commented 7 years ago

Thank you very much for your comment. It works as I intended :)