Class Notes

MR
Jan 2026

A collection of sample class notes converted from LaTeX to HTML.

Conversion Workflow: LaTeX to HTML

Overview

This workflow uses LaTeXML and latexmk to convert LaTeX documents into responsive, styled HTML pages with mathematical equations, proofs, and a toggle for LaTeX.css styling.

Prerequisites

Step-by-Step Process

  1. Convert LaTeX to HTML with LaTeXML

    The main.py script runs LaTeXML with HTML5 format to convert your .tex file:

    latexmlc --format=html5 --includestyles --destination='html_out/filename/index.html' 'tex_src/filename.tex'

    This generates semantically correct HTML with MathML equations and proper document structure.

  2. Build PDF with latexmk

    Simultaneously, PDFs are generated for reference:

    latexmk -auxdir=build/filename -outdir=html_out/filename -pdflua -silent 'tex_src/filename.tex'
  3. Post-Process HTML

    The main.py script performs these transformations on the generated HTML:

    • QED Symbol Replacement — Converts LaTeX QED (∎) to an accessible HTML version with aria-labels
    • Proof Element Enhancement — Adds CSS classes to proof environments for styling
    • Resource Injection — Injects custom resources into the document head:
      • LaTeX.css stylesheet (optional, toggleable)
      • css/custom.css — custom styling for proofs and layout
      • js/custom.js — toggle button for LaTeX.css
      • MathJax 4 for advanced equation rendering
  4. Generate Index Page

    The create_main_index.py script auto-discovers all converted documents and generates this index page with links and PDF references.

Usage

Convert one or more LaTeX files:

python3 main.py tex_src/equivalence.tex tex_src/Lp.tex

View the conversion steps without executing (dry-run):

python3 main.py -n tex_src/equivalence.tex

Regenerate the index page:

python3 create_main_index.py

Preview locally with HTTPS:

python3 https_server.py  # Serves at https://kn-mb-2411.local:4444

Key Features

Links to Class Notes