- Join over
**1.5M+ people** - Join over
**100K+ communities** - Free
**without limits** - Create
**your own community**

- Jan 03 2016 02:45@kevinbarabash banned @acx01b

my current renderMathInElement is :

```
renderMathInElement(latexElementID,
{delimiters: [ // mind the order of delimiters(!?)
{left: "$", right: "$", display: true},
{left: "$", right: "$", display: false},
{left: "\\[", right: "\\]", display: true},
{left: "\\(", right: "\\)", display: false},
]}
);
```

[

\begin{bmatrix}

a & b \

c & d

\end{bmatrix}

]

\begin{bmatrix}

a & b \

c & d

\end{bmatrix}

]

I have no problem to display the matrix,

but add '% my comment' will be problem

Heya, quick question to devs familiar with KaTeX: if one wanted to convert KaTeX output into another markup than HTML, would it be best to work from the HTML generated (with all the <span>s), or would it be better to use some other internal structure of KaTeX? If the latter, is there a good place to start looking? And for the former, is there a good place to get an overview of all the different classes and styles that KaTeX might apply?

@lazingor There another option, which is to use the KaTeX's MathML output instead of it's HTML output.

Browser support for MathML is limited, for now, to Firefox and Safari. The Chromium browsers will support it later this year. So yes, if you need it now and you need positioning information, then MathML is not sufficient.

I only offer the MathML option because manipulation of the KaTeX HTML sounds like a daunting task and the KaTeX/KaTeX#376 is now over four years old.

KaTeX seems to have a really weird side effect on scroll-into-view behavior -- can anyone help explain? https://stackoverflow.com/questions/60202460/why-does-running-katex-change-my-pages-scroll-element-into-view-behavior

anyone live?

Hey @sobanmomin Better to just ask your question right away instead of waiting for someone to respond. Don't ask to ask, just ask

what am I doing wrong ?

@nidupb Does it look correct here in Gitter? $\%_{acquis} = \frac{I}{V_{prem}+I}$ https://gitlab.com/gitlab-org/gitter/webapp/-/blob/develop/docs/messages.md#katex-math-formulas

Perhaps it's the renderer you are using

Hey, so this might be a long shot, but I'm working on a plotting package in Julia, and I wanted to use KaTeX to typeset math, and extract glyph positions, scales and offsets. Is there a way I can do that through the KaTeX API?

exist the webpage support functions for v0.7.1 ?

Hi @chrilves

@KibikaJ forgot to mention - what I do is render a different version of the page when prinitng. So you could just print one div if you want. It is a cumbersome mechanism if you only want a quick conversion of something small to PDF. It works fine if you want a PDF version of maths to upload and publish.

@freemaths could you be kind enough to give me your code to enable me make some progress. my email: jwkibika2013@gmail.com , thanks in advance.

@KibikaJ my development is all in React so might not be helpful. The key parts are: if (this.state.print) {

setTimeout(()=>{

window.print()

this.setState({print:false})

},2000)

} and if (this.state.print) return <div ref={r=>{this.maths=r}}>

{this.state.title&&<h5><Maths auto={true}>{this.state.title}</Maths></h5>}

<Maths width={this.state.width} auto={true}>{this.state.maths}</Maths>

</div> My maths class just renders my maths using Katex. I found the timeout was required to give the print page time to render.

setTimeout(()=>{

window.print()

this.setState({print:false})

},2000)

} and if (this.state.print) return <div ref={r=>{this.maths=r}}>

{this.state.title&&<h5><Maths auto={true}>{this.state.title}</Maths></h5>}

<Maths width={this.state.width} auto={true}>{this.state.maths}</Maths>

</div> My maths class just renders my maths using Katex. I found the timeout was required to give the print page time to render.

@freemaths I will attempt to mimic the code in JavaScript