How can I render MathJax LaTeX in HTML tags?

I’ve been recently deep diving into obsidian customisation with css and I’m trying to find the best organization to take my notes. In the process I ended up preferring highlighting my theorem definitions with the “<center>” tag with some css to it like this:

the problem with this is that I will need to write in mathematical language at some point, and to do so I’ll need latex wich doesn’t work if surrounded by <center> tags.

So is there any way I can “extend” the text formatting used by obsidian, such as links, $$ and ** to the <center> tag?

Things I have tried

I’ve tried to work the other way around by customising the math-block “$$ … $$” with a yellow background and using TeX command \textsf{}, but this way I cannot break the line and it gets cutted in the margin of the pane:

furthermore I would like to use this math block for proofs, so I prefer it having a transparent background.

I accept any suggest. Thank you

can try code below:

<div align="center">a sample: <span class="math display">Z_{c}</span></div>

in edit mode, it becomes:

a sample: Z_{c}

in view mode, it becomes:

is there anybody can make tag work in live preview mode? how to make it WYSIWYG?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.