Resources / Guide

LaTeX lecture notes to accessible HTML

Turn your LaTeX lecture notes into web pages that look close to the PDF and are built to pass the YuJa Panorama accessibility check in Brightspace. Everything runs on your own computer.

Downloads

What this does

Your notes are never uploaded anywhere until you put the finished pages on Brightspace yourself. You keep writing ordinary LaTeX ($...$, align, \cref, bibliographies). After a one-time setup, converting is one double-click, and the result is one ZIP file per document, ready to upload.

The conversion is done by BookML (opens in a new tab), a free tool by Vincenzo Mantova built on LaTeXML. It runs inside a container, a sealed copy of Linux with TeX Live and everything else preinstalled, so nothing needs to be installed piece by piece. A small kit of files adds the fixes YuJa asks for.

One-time setup

You do this once per computer. It takes about half an hour, most of it waiting for downloads, and needs roughly 6 GB of free disk space.

Step 1: install the container software

Container software by operating system
SystemWhat to installNotes
Windows 10 or 11Docker Desktop (opens in a new tab)Needs administrator rights once. Restart, open Docker Desktop, and accept the terms of use.
macOSOrbStack (opens in a new tab)On a macOS version Apple no longer supports, try the legacy version.
LinuxDocker or Podman from your distributionNothing else is needed.

Optional on Windows, for faster conversions: before installing Docker Desktop, open PowerShell as administrator, run wsl --install, and restart.

Step 2: download BookML

Open PowerShell (Windows) or Terminal (macOS, Linux), paste this line, and press Enter:

docker pull ghcr.io/vlmantova/bookml:latest

This downloads about 4.6 GB and is the only step that needs a fast connection. On Linux with Podman, type podman in place of docker.

Step 3: get the kit

Download the kit and unzip it somewhere you can find it again. You will copy its contents into each notes folder you want to convert.

Preparing your notes folder

Copy everything inside the kit folder into the folder that holds your notes, next to your main .tex file (please create a back-up of your .tex file in a separate folder). You do this once per notes folder.

Contents of the kit
Kit fileWhat it is for
convert.batWindows launcher: double-click to convert
convert.commandmacOS launcher: double-click to convert
convert.shLinux launcher: run ./convert.sh in a terminal
a11y-kit/Three helper scripts the launchers call
bmluser/Styling for the HTML version
preamble.texShared preamble that works for both PDF and HTML

Your main file should load the shared preamble and nothing else before \begin{document}:

\documentclass{book}
\input{preamble}
\begin{document}
\input{chapters/chapter1}
\input{chapters/chapter2}
\end{document}

Every .tex file in the folder that contains \documentclass is converted to its own ZIP. Chapter files pulled in with \input can live in subfolders.

If you use your own preamble instead, add \usepackage{bookml/bookml} to it and expect some trial and error: packages that draw or decorate (TikZ, tcolorbox) are the usual trouble. The shared preamble shows how to load them for the PDF only.

Converting

Make sure Docker Desktop (or OrbStack) is running, then start the launcher for your system: double-click convert.bat on Windows or convert.command on macOS, or run ./convert.sh on Linux. The first time on macOS, right-click the file and choose Open so the system lets it run.

A window shows three steps as they happen:

  1. Preparing. Your notes are copied to a working folder, _build_html. In the copies only, multi-line equations (align, gather and similar) are rewritten as single equations, because the converter would otherwise turn them into tables that YuJa flags. Your own files are never changed.
  2. Converting. BookML builds the web pages. This is the slow step: allow about five minutes per hundred pages the first time. Later runs redo only the documents that changed.
  3. Repairing. Table header cells are labelled, captioned tables get a real HTML caption, and any equation still laid out as a table is marked as layout only.

When it finishes, the html-output folder holds:

The conversion itself runs with the network switched off, so nothing in your notes can leave the computer during it.

Uploading to Brightspace

  1. Go to Course Admin → Manage Files → New Folder and create a folder for the document.
  2. Upload the ZIP from html-output into that folder and select Unzip.
  3. Go to Content → Add Module and create a module for the lecture.
  4. Choose Upload/Create → Add from Manage Files and select index.html.
  5. Open the page and check its YuJa Panorama score. Fix what it reports in the LaTeX source, convert again, and replace the files.

Passing the checker is not the whole of accessibility. Compare the result with your institution's accessibility policy, and if you can, listen to one section with a screen reader.

Writing LaTeX that converts cleanly

The kit repairs what can be repaired automatically. These habits take care of the rest; the report file tells you where they were missed.

Habits for LaTeX that converts cleanly
WhatDo thisWhy
Figures\includegraphics[alt={Graph of the error against step size}]{fig1}Every image needs alternative text
TikZ picturesPut \bmlDescription{...} directly after \end{tikzpicture}, with no space betweenSame requirement; TikZ pictures become images
TablesPut every tabular inside a table environment with a \caption, and give it a header rowCheckers require a caption and header cells
Table layoutAvoid merged cells and nested tablesScreen readers cannot follow them
Numbered multi-line equationsUse at most one \label per align blockA block with several labels cannot be merged into one equation and stays a table
SpacingAvoid \vspace, \hspace and manual line breaksThey fight the page structure; use the CSS files in bmluser for special spacing
ColourDo not rely on colour alone, and avoid light colours for textText needs a contrast of at least 4.5 to 1
PreambleKeep one shared preamble for all your documentsA macro that misbehaves in HTML is then fixed in one place

A numbered align block gets one equation number in the HTML where the PDF has one per line. Cross-references stay correct within each version. More examples are in the BookML manual (opens in a new tab).

Optional helpers

Handwritten notes to LaTeX. Gemini or Copilot can transcribe a scan with the prompt below. Check the result line by line, since these tools still invent content. pix2text (opens in a new tab) is a more literal alternative.

Convert the attached file to LaTeX code. The handwritten title is the LaTeX
section name. Put definitions, theorems, and examples in appropriate amsthm
environments. Include no preamble so I can insert it into my master file.
Edit sentences and flow, but preserve all math. Ignore tables, diagrams, and
figures.

Descriptions for complex figures. Texas A&M publishes a Gemini tool (opens in a new tab) for long image descriptions.

Troubleshooting and updating

Common problems and fixes
SymptomWhat to do
“Docker is installed but not running”Open Docker Desktop or OrbStack, wait until it reports that it is running, and start the launcher again
“The a11y-kit folder is missing”Copy the whole kit into the notes folder, not only the launcher
A document is listed under NOT CONVERTEDLaTeX stopped with an error. Check that the PDF compiles on its own, then look at the log files in _build_html
Results look stale or odd after many changesDelete the _build_html folder and convert again; this forces a full rebuild
The window closes or nothing happens on WindowsMove the notes to a folder on the computer itself; network drives cannot be used
YuJa still flags somethingRead accessibility-report.txt first; it names the document and the kind of problem

The two working folders, _build_html and html-output, can be deleted at any time. Neither needs to be backed up.

Updating BookML

The downloaded copy of BookML never updates by itself. To update, run the download line from the setup again:

docker pull ghcr.io/vlmantova/bookml:latest

After an update, delete _build_html, convert one document, and check it in YuJa before converting the rest.

Disclaimer

The a11y-kit was originally written in Python. Since I can't guarantee that the required Python packages are installed on your machine, and because Perl already comes with the BookML Docker image, I asked Claude to translate my Python scripts into Perl. That way, you don't need to install anything beyond the container software.

Although I carefully reviewed Claude's output to make sure there wasn't any obvious funny business, I'm an amateur programmer whose coding skills probably peaked more than a decade ago. The workflow works well for my needs, but there are likely still a few bugs hiding somewhere. Please make sure to back up your files before trying it out.

Bug reports, feedback, suggestions, and improvements are all very welcome. Hopefully, this toolkit can save others some time and frustration.

Guide last updated November 25, 2026. Questions or improvements: ttdang@purdue.edu.