how to center latex formulas and mermaid diagrams?

Hi! I installed the katex and mermaid plugs, but I’d like the resulting rendered formulas and diagrams to be centered. Do you have any suggestion on how to achieve that? Thanks!

For the katex plug you can add

config.set {
  katex = {
    displayMode = true
  }
}

to you config, although this script is probably the more ergonomic approach compared to the katex plug.

Don’t know about mermaid tho.