X Close

Digital Education team blog

Home

Ideas and reflections from UCL's Digital Education team

Menu

Once more: Accessible documents from LaTeX

By Jim R Tyson, on 7 March 2021

This is blog outlines some changes to the advice I gave previously on how to produce accessible documents using LaTeX. The changes concern the production of PDFs for use digitally, and conversion from LaTeX to HTML.

ISD general guidance on producing accessible materials on its Accessibility Fundamentals pages still holds.

In that previous blog entry, I included as an aim to ‘get as close as possible to producing ‘tagged PDF’ or PDF/UA documents using LaTeX’. This is not currently doable. I replace it with the aim to ‘get as close as possible to producing reasonable accessible documents using LaTeX’. Given the long standing difficulties meeting accessibility requirements from LaTeX source in PDF the advice must be to produce HTML documents when accessibility is required.

In particular, I do not now recommend using the LaTeX package accessibility.sty to create tagged documents. Development of the package has been halted and the author no longer supports its use. If you are interested in the effort to produce tagged PDF from LaTeX source, then you should read this article from the TeX Usergroup newsletter, Tugboat. The author of the package mentioned in the article himself believes it is not yet ready for use in production. But, he writes, “with the tagpdf package it is already possible for adventurous users with a bit of knowledge in TEX programming to tag quite large documents”. I am not adventurous or knowledgeable enough to rise to that challenge.

With respect to mathematical content, I had previously recommended Pandoc which can convert to HTML with machine readable mathematical content. I have since looked more closely at this issue and I now prefer to use tex4ht which has some useful features, including the ability to include the LaTeX code for mathematical content in a page. It is also the package recommended by TUG. There is good documentation on the TUG website. However, tex4ht does not produce Microsoft Word documents from LaTeX, and so Pandoc is still the best tool if that is required. And Pandoc does still do the job if you don’t need extra features.

In the light of these and other issues, I have made the switch completely to using RMarkdown. This allows me to mix lightweight mark up, LaTeX mathematical code and HTML in one document. Using HTML to insert graphics allows me to include alt text which is not otherwise possible.

There is still to my knowledge no solution for presentations made with Beamer or similar packages. Whereas I previously suggested using the package pdfcomment to annotate images on slides made with LaTeX, I do not now since I have discovered that the comments are not well understood by screenreader software.

The current situation means that we can do very little to support colleagues with accessibility issues in LaTeX workflows and especially with respect to presentations and providing alternative text for images, beyond the advice we have already provided.

Leave a Reply