How to write math with HTML like it were MathJax

39 views
Skip to first unread message

alfonso.b...@gmail.com

unread,
Dec 5, 2017, 1:10:16 PM12/5/17
to MathJax Users
Hi everybody,

I've noticed that when I write math most of the symbols that I need can be expressed with simple HTML. However, I style like how MathJax styles the math. However, I guess that all what MathJax does is to apply some font, some size, some style and probably that could be done with HTML and CSS.

What CSS properties can I use to make my HTML math look like MathJax?



PS: Notice that I've asked in StackOverflow because I didn't know about the existance of this group.
https://stackoverflow.com/questions/47659859/how-to-write-math-with-html-like-it-were-mathjax

Peter Krautzberger

unread,
Dec 6, 2017, 3:50:55 AM12/6/17
to mathja...@googlegroups.com
Hi Alfonso,

Thanks for referencing your stackoverflow post.

> I've noticed that when I write math most of the symbols that I need can be expressed with simple HTML. 
> However, I guess that all what MathJax does is to apply some font, some size, some style and probably that could be done with HTML and CSS.

Depending on the content, there's a lot more going on (e.g., baseline alignments, stretchy constructions, tables) but for simple constructions HTML templating can suffice. In fact, MathJax's own layout continues to become simpler as CSS improves over the years.

> What CSS properties can I use to make my HTML math look like MathJax?

That depends a lot on what your HTML looks like and what kind of content you expect to handle yourself. MathJax's internal format is based on MathML to represent layout structure and this structure is apparent in the output as well.

For very simple constructions, I suppose you're mainly look to specify a webfont to match MathJax's; you can just use the same declarations MathJax uses.

If your question is not about HTML/CSS authoring but reducing client-side rendering, you can of course just run MathJax on the server (e.g., using mathjax-node).

Regards,
Peter.


--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages