HTMLTeX

This is a JS+CSS tool for making HTML behave and look like LaTeX.

See a live Example here.

Usage

Include the following in the head of your HTML doc:

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- MathJax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML"></script>

<!-- HTMLTeX -->
<script src="https://PeterEFrancis.com/HTMLTeX/HTMLTeX.js"></script>
<link rel="stylesheet" href="https://PeterEFrancis.com/HTMLTeX/HTMLTeX.css">

Create an element in the body of the HTML doc that you would like to make look like LaTeX. Then include this script at the bottom of the page. Make sure the first argument to the HTMLTeX constructor is your intended LaTeX element.

<script type="text/x-mathjax-config">
  new HTMLTeX(document.getElementById('LaTeX'), MathJax).render(
    // options
  );
</script>

render() can take an optional JSON with the following optional keys:

New and modified HTML Tags for use

The benefit of HTMLTeX is the easy use of new and modified HTML tags. The list below describes the possible tag attributes and their purpose.

New Tags

Modified Tags