TUGboat, Volume 40 (2019), No. 2

157

Accessibility in the LATEX kernel —experiments in Tagged PDF
Chris Rowley, Ulrike Fischer, Frank Mittelbach

3Abstract
This is a brief summary of a talk given by the firstauthor at the TUG’19 conference, together with somereferences for further reading and viewing.
1

Introduction

Accessibility requirements for PDF documents aredescribed in two standards: PDF/UA and the more
recent PDF2.0. One of the major features they mandate is that the PDF must be properly tagged, so weare investigating how LATEX can be adapted to easily
produce tagged PDF.
The main purpose of this talk was to introduce
the experimental package tagpdf by the second author. But we start with a quick “bullet points introduction” to the structure of a PDF file and what ismeant by “Tagged PDF”.
2The slides for the talk contain examples of thetype of code used in a PDF file for defining the objects
related to structure and tagging.

PDF in bullets

The first thing to understand about PDF is: In a
PDF file (almost) everything is . . . PDF Objects!
Here are two examples of important object types
that we always find in a PDF file:• many objects are Dictionaries, which are simply
key-value (property) lists• other objects are Streams: Text Streams are an
important part of each Page Object
Some important particular objects are:
• Resource Objects: containing, for example, fontand encoding information• Page Objects: containing information about apage• Navigation Objects: these enable quick accessto all the important objects within the PDF file.
For Tagged PDF, in addition to Page Objects andtheir Text Streams, the following are required:• a Structure Tree Object, whose nodes are PDF
Objects (surprise?), with:– a root node
– structure element nodes: each of these is a Dictionary Object containing references to its parent, siblings and child nodes– leaf nodes: each containing additional references,each of which is to:– a page, plus
– a “marked part” of that page’s Text Stream

Philosophy

We believe that the production of documents that
exploit the large range of functionality that can nowadays be incorporated into PDF is very important andis fundamental to what LATEX, as a document processing system, is all about!
We also believe that the production system must
pay close attention to the actual, detailed contentsof the input LATEX file: these details must not beignored as they contain everything that the systemknows about the author’s intentions.
We are therefore certain that we first need toadapt and enhance the LATEX kernel to better support all these new ideas. Furthermore we must go
on to help package developers and maintainers inexploiting the new possibilities.
We are currently working primarily on getting
right the low-level basic coding so that we can buildon top of this to add necessary features into theLATEX system. We do not want to add lots of new
stuff on top of the current LATEX, or to produce aparallel system that will most likely conflict badly
with standard LATEX processing.
4Current work

Development has started on the experimental package tagpdf. Its purposes are summarised here:• allow experimenters to identify problems theyfind with tagging, and to discover the support
needed for other accessibility requirements;• develop a code basis for the support of tagging
in the LATEX kernel.
Please note that, being experimental, it needs experimenters to use it, of at least these types:• authors and users of documents:– What is truly needed in an accessible document?
• package maintainers/developers:– What is needed for a package to produce accessible output?
– How can the LATEX Team help ease the conversion of all packages?
The current (preliminary) version of the tagpdf packages provides low-level mark-up commands to support tagging. For example, commands to:• add structure element nodes to the structuretree• add ”marked content” tags to the content stream

Accessibility in the LATEX kernel — experiments in Tagged PDF

158

TUGboat, Volume 40 (2019), No. 2• add to the structure tree nodes all the necessary
pointers to the marked content associated witha given node
The package also supports other aspects of accessibility, such as setting up links appropriately, and the
input of essential document meta-data. It is well
documented with descriptions of how to use it andof how to provide us with feedback. Please do!
The documentation contains more backgroundinformation about accessibility and tagging, withdescriptions of how PDF works and what makes aPDF file accessible. It also lists some currently known
problems and how we plan to solve them.
5Coming soon, we hope!

We of course hope to get many ideas from all you experimenters, but meanwhile we are looking in detailat how the LATEX kernel can better support tagging
and other aspects of accessibility. We are also looking at whether the various TEX engines need any
enhancements to better support the production offull-featured PDF.
In the TEX community, Ross Moore and others
in TUG’s Accessibility Working Group have done considerable work on many of these problems, including
the complex subject of how to represent formulas,etc., in accessible PDF. We are therefore actively
exchanging ideas with them and we are pleased tothank TUG and DANTE e.V. for their current support of this work.
We are of course also very interested in collaboration with other organisations, individuals andcompanies who have engineering expertise in thisarea (from both the TEX perspective and the PDFperspective) and we intend to actively pursue suchcontacts.
As part of their program to position PDF asa prime source of accessible information in “valueadded documents”, the expert engineers at the “homeof PDF”, Adobe, are showing a high level of interestin the use of LATEX to produce accessible PDF. Thisgives a clear indication of the importance of LATEX
for the production of PDF documents and we are
therefore planning to collaborate closely with them.

Chris Rowley, Ulrike Fischer, Frank Mittelbach

References
The tagpdf package This is available at:https://github.com/u-fischer/tagpdf andhttps://ctan.org/pkg/tagpdf.
PDF Standards PDF/UA (PDF/Universal Accessibility) is the informal name for ISO 14289.
On July 28, 2017, ISO 32000-2:2017 (PDF 2.0)
was published. See:
https://www.iso.org/standard/64599.html
andhttps://www.iso.org/standard/63534.html
More on PDF Lots of information is available at:https://en.wikipedia.org/wiki/PDF
Moore on PDF Ross Moore has published manytalks and articles, see:https://maths.mq.edu.au/~ross/TaggedPDF
Videos of both his talk and this one at TUG
2019 can be seen at:
http://science.mq.edu.au/~ross/TaggedPDF/TUG2019-movies
Slides for this talk These are available at:https://latex-project.org/publications/indexbyyear/2019/
TUG’s Accessibility Working Group
More information and a fuller bibliography on
Accessibility is available at:https://tug.org/twg/accessibility/ Chris Rowley
LATEX3 Team
chris.rowley (at) latex-project
dot org
https://www.latex-project.org
 Ulrike Fischer
LATEX3 Teamfischer (at) troubleshooting-tex
dot dehttps://www.latex-project.org
 Frank Mittelbach
LATEX3 Teamfrank.mittelbach (at)latex-project dot org
https://www.latex-project.org