Accessible LaTeX with AI Support
If you have a large number of existing .tex files, it’s possible to use AI to produce a revised version of the .tex files so that they can be compiled in an accessible PDF format.
AI-remediated LaTeX still requires a manual review for content accuracy and for accessibility.
Sample Workflow
Provide the selected GenAI tool (with the following documents/reference materials):
Your existing .tex file(s)
A sample .tex file with the desired format
Text from a relevant .tex formatting guide, such as
LaTeX Tagging Project: Usage instructions for \DocumentMetadata and MathML tagging
Prompt the AI to create an updated version of your .tex file(s).
Review the output and review for accuracy and to correct any errors.
In some cases, the file may not compile correctly after being updated. Prompt the AI to review the updated LaTeX to correct identified errors.
Sample Prompt
This sample prompt was used to update a .tex file for use in Overleaf with LuaLaTeX. The prompt needed will vary based on your specific tools selected, use case, and complexity of LaTeX content.
I have a LaTeX document that needs to be reformatted for accessibility compliance
(PDF/UA-2) in Overleaf using LuaLaTeX and TeX Live 2025.
Use [REFERENCE_FILE_NAME.tex] as the model for proper accessibility formatting and [Reference Guide text.txt] to reference guidelines.
Review the LaTeX file [MY_FILE_NAME.tex] and:
1. Add proper DocumentMetadata with PDF/UA-2, MathML, and language tagging
2. Replace manual formatting (\centerline, \vskip, etc.) with semantic structure
(\title, \maketitle, \section, \subsection)
3. Configure hyperref with complete PDF metadata
4. Ensure all mathematical expressions use proper environments for MathML accessibility
5. Add \pdfbookmark for the title
6. Maintain all mathematical content and custom commands unchanged
If you encounter any LaTeX errors during formatting, identify and correct them.
Provide:
- A complete corrected .tex file ready to compile
- A summary of the key accessibility changes made
- A summary of any corrected LaTeX errors
- Any compilation notes (compiler settings, required packages)