Sample HTML file: produced with lwarp, with mathematical formulae displayed with MathJax, and xymatrix commutative diagrams displayed with XyJax-v3

1 Context and instructions: using Lwarp to compile latex to HTML, so that xymatrix diagrams are displayed with Xy-Jax

This HTML file (that you are reading) was produced with the lwarp.sty package, available with TeXLive. 1 In particular the preamble contains:

\documentclass[a4paper,12pt]{article}
\usepackage[mathjax]{lwarp}

The version of the software was:

pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022) (preloaded format=pdflatex)
lwarpmk: lwarpmk: v0.910   Automated make for the LaTeX Lwarp package.

The source latex file can be found here: Sample_Lwarp_Xy-jax.tex or here Sample_Lwarp_Xy-jax-split.tex, depending whether you are seeing the “stand-alone” version of this webpage, or the “split” version of this webpage.

This HTML file also makes use of the following configuration script, so that Xy-pic diagrams, particularly xymatrix commmutative diagrams, can be displayed by using Xy-Jax-v3. (Or at least a good sample of them: there seem to be some compatibility issues.)

This script file has minimal additions (two in total) in the original Lwarp MathJax emulation code, that is automatically created by lwarp v0.902), namely:

(Two lines were added to the script above, as shown, in order that browsers can find Xy-Jaxv3.)

This modification was produced under items 5 and 6 of the licence https://www.ctan.org/license/lppl1.3 (The LATEX Project Public License 1.3).
Credit is due to instructions in: https://github.com/sonoisa/XyJax-v3 (the official Xy-Jaxv3 documentation) and in "40.11 lwarp_mathjax.txt" of the official Lwarp documentation.

If using XY-pic diagrams displayed with XyJax-v3, insert the following in the preamble of your latex file:

 \usepackage[all]{xy}
 \MathJaxFilename{lwarp-with-Xy-jax_v3.txt}

Compile .tex to .html using:

  • 1. pdflatex Sample_Lwarp_Xy-jax.tex (possibly twice) : creates Sample_Lwarp_Xy-jax.pdf (usual pdf file, that can also be shared) and Sample_Lwarp_Xy-jax_html.tex. (And some other aux files.)

  • 2. lwarpmk html : converts Sample_Lwarp_Xy-jax_html.tex to Sample_Lwarp_Xy-jax_html.html. And then creates Sample_Lwarp_Xy-jax.html (possibly split into different HTML files if such option is chosen).

  •   Note: Use lwarpmk html1 to force a recompile.

  •   Note: In case of error, with lwarpmk html, use lwarpmk pdftohtml to create HTML file.

  •   Note: When using bibtex files, then the following is required:

    • • bibtex Sample_Lwarp_Xy-jax_html.aux

    • pdflatex Sample_Lwarp_Xy-jax_html.tex

  • The following steps are only needed once (any time tikz figures change). Only needed with tikz.

  • 3. lwarpmk limages : If there are images done with tikz, tikz-cd, etc.

  • 4. Repeat 2 (now using lwarpmk html1) and 3 (to finish creating the images).

1 See also https://people.bath.ac.uk/feb/lwarp/lwarp-intro.html, for a quick introduction on how to use Lwarp, and without which this explanation that you are reading would not have been written.

  • Note. It is advisable to use a recent version of TexLive.

Warnings:

  • • The usage of XyJax-v3 software with lwarp is experimental.

  • • Not all accessibility features of commutative diagrams displayed with XyJax-v3 work.
    Among the accessibility features that seem to work well are:

    • 1. View original latex source.

    • 2. Zoom maths expression.