Skip to main content

Getting Started with PreTeXt

Section What PreTeXt Does Automatically

Because you mark up content by what it is rather than how it should look, the generated HTML carries enough structure to be navigated and read by assistive technology with no extra work from you.

Subsection Structural Accessibility

The HTML PreTeXt generates targets WCAG 2.1 Level AA. You get, by default:
  • Proper heading hierarchy. Chapters, sections, and named blocks (definitions, theorems, examples) map to appropriate HTML heading levels, so screen reader users can jump directly to the section they need.
  • ARIA landmarks and skip-navigation. Screen readers get a structural overview of every page, and keyboard users can bypass the navigation sidebar.
  • Keyboard navigation. The table of contents, knowl popups, and native exercise types are all reachable and operable without a mouse.
  • Sufficient color contrast and responsive layout. Default themes meet the 4.5:1 contrast ratio for body text, and the HTML reflows gracefully for screen magnification or mobile use.

Subsection Accessible Mathematics

Every equation you write inside an <m> or <md> tag is rendered with MathJax, which simultaneously produces MathML, a structured, machine-readable form of the math. Screen readers that support MathML (JAWS with MathPlayer, NVDA with MathCAT, VoiceOver on recent macOS and iOS) can navigate equations structurally: term by term, into numerators and exponents, at whatever level of detail the reader needs.
Any reader, including sighted readers with low vision, can also right-click any equation to zoom, copy the source, or change the rendering mode.

Try it.

In any built HTML output, right-click an equation and choose Accessibility β†’ Explorer β†’ Activate. The page reloads and the arrow keys now walk you through the equation’s structure.

Subsection Multiple Output Formats, One Source

A student who needs a specific format is not getting a second-class version of your text; every format is generated from the same semantic source.
Format Who benefits
HTML Screen reader users, keyboard-only users, mobile readers
PDF Students who prefer or require print
EPUB Students using e-readers or read-aloud on tablets
Braille (Nemeth) Blind students; tactile readers of mathematics
The Braille output is particularly significant. Most math textbooks cannot be Brailled without a specialist transcriber, which creates long wait times and high costs for blind students. PreTeXt uses the liblouis library and Nemeth Code to generate Braille from the same source. An instructor who writes a PreTeXt book automatically produces a format that disability services can send directly to an embosser.