Math rendering display mode
lgtout opened this issue · 4 comments
Hi. How do you handle display mode for math rendering with Katex?
<section class="math">\Delta p \Delta x \geq {h \over 4 \pi}</section>
See: http://mnml.herokuapp.com/typesetting-mathematics-on-your-ghost-blog-with-tex-mnml-and-katex/
Thanks. So, I already tried some variation of that.
But then I noticed that, in katex.hbs, katex.render
is called without passing in the optional configuration parameter { displayMode: true }
.
See this for behavior of render
. The gist of it is that the default value of displayMode
is false
, which causes Katex to use math mode i.e. inline mode.
I haven't dug deep into Katex or mnml, but is it possible that mnml is rendering in math mode, but displaying it on a separate line, such it looks like it's display mode, but it's not?
Ah, good point. I’d forgotten to set the displayMode
, and it was doing exactly what you said (rendering pseudo-display math.)
I have updated the KaTeX partial accordingly. Thanks!
Awesome! You're welcome.