<!--#include virtual="/header.html"-->
<title>Multiple TeX Distributions - MacTeX - TeX Users Group</title>
-</head>
<body>
<!--#include virtual="./style.html"-->

<table width=100%>
<tr>
<td>

<td><A HREF="./mainpage2026.html">
<img align="left" border=0 src="./images/mactexlogoX5.png">
</td>
<td align='center'>
 
</td>
<td><A HREF="https://tug.org">
    <img valign="top" align="right" border=0 alt="logonavy"
    SRC="images/logonavy.jpg" WIDTH="80"></A>
</td>
</tr>
</table>
<hr>

<BR>
<DIV ALIGN='center'>
<FONT SIZE="+2"><B>The LaTeX Tagging Project</B></FONT>
<BR>
<!-- <HR WIDTH="43%"> -->
</DIV>
<BR>
<BR>

<h3>About Tagging</h3>

<p> As a retired professor from the University of Oregon, I find the tasks required of current faculty almost impossible to imagine, from teaching remotely to handling  large classes to mentoring graduate students to finding time for research to worrying about tagging documents for the web. The information in this section is particularly scary because it seems to require that
all documents given to students and available on the internet must by law satisfy a "tagging standard", 
which however is murky and often incomprehensible. On the other hand, all of us know of colleagues with disabilities who manage to thrive, and would be happy to provide web documents for these colleagues if the process is easy.  So while this first section is disturbing, the  news for mathematicians in later sections is much happier.

 
<p> According to Google AI, PDF tagging creates a hidden, structured, HTML-like tree within a PDF file to define content hierarchy (headings, paragraphs, tables, images) for accessibility and screen readers. Essential for Section 508 compliance, tags ensure proper reading order and allow assistive technology to navigate documents. 

<p> To put it more directly, a tagged document can be read to blind users by appropriate software programs, and used by others with various disabilities. Universities and governments are starting to require that all pdf documents on the web be tagged. 

<p> Google AI recommends using the "Autotag Document" tool in Adobe Acrobat Pro for quick, foundational, though often imperfect structures, and adds that "Manual Tagging" using the Tags pane
and Reading Order tool in Adobe Acrobat Pro can help define heading levels and add alternative text for images. Ultimately, it states, manual review is crucial for 100 percent accuracy.''

<p> However, we do not intend to use Adobe Acrobat Pro. Instead we'll tag with LaTeX, which works
exactly the same on Macs, Windows, Linux, and other machines.
<br>  
<br>

<h3>History and the LaTeX Team</h3>


<p>The tagging project in mathematics is under the direction of the LaTeX Team, and it pays to know how that team came to be.

<p> The input language for Donald Knuth's original TeX program was extremely primitive, but Knuth added a macro facility which allowed users to create more powerful commands by stringing together these primitive inputs. In particular, Knuth wrote a set of macros for his books on The Art of Computer Programming called "Plain TeX". When a TeX user claims to typeset using ordinary TeX, they are using the Plain TeX macros.

<p> Later Leslie Lamport wrote a more comprehensive set of macros called "LaTeX". So LaTeX is just ordinary TeX with Lamport's macros rather than Knuth's. Version 2.09 of LaTeX was released in 1985. Still later, Michael Spivak wrote a set of macros for mathematicians called "AMSTeX". There arose a desire to combine LaTeX and AMSTeX into a single set of macros, but that proved to be impossible due to certain limitations in LaTeX.

<p>By that time a young Frank Mittelbach had come from Germany to Stanford to work on TeX, and at a TUG  meeting in 1989 at Stanford, Lamport turned over development of LaTeX to him. Mittelbach then formed a very small team to develop it further. This team released LaTeX2e in 1994, and that version made it possible to combine LaTeX and AMSTeX into a single system.

<p>So LaTeX has been under the development of Mittelbach and a small but varying team for the last 35 years.

<h3>References</h3>

<p> The status of the LaTeX tagging project is approximately as follows. The key additions
to the kernel are done. Now it is necessary to look at all important packages and modify them
so they support tagging. Many important packages have already been analyzed, but a long
list of additional packages must still be modified.


<p> Below are two recent places to learn about the LaTeX tagging project.
The first is in the most recent issue
of Tugboat, the journal of TUG. This is volume 46 (2025),
No 3, where a long article titled LaTeX News fills pages
347 - 352. A link to this particular journal is at <a href="https://tug.org/TUGboat/Contents/contents46-3.html"><b>https://tug.org/TUGboat/Contents/contents46-3.html</b></a>
and the article is pretty far down this page in the section with black heading named "LaTeX", with article titled "LaTeX News". 

<p> The other useful source is a video talk given by Mittelbach at the
TUG conference last summer. Videos of the talks are at
<a href="https://tug.org/tug2025/"><b>https://tug.org/tug2025/</b></a>
Unfortunately, these videos contain the full conference rather than individual talks only,
so a little searching is needed to find the video you should watch,

<p> Find the videos for Day 1, Friday, Part 1. In this video, go to 1:39:00, which is the start
of Frank Mittelbach's talk. In this talk, Mittelbach shows us a piece of pdf containing standard
mathematical elements. Then he asks us to close our eyes and listen to this talk read from
an untagged pdf, and then from a pdf tagged by Adobe Acrobat, and finally from a pdf tagged
by the LaTeX project. The first two examples are awful; for instance, matrix entries are often
read in random order. But the LaTeX project samples are much better. Mittelbach explains
briefly how the system works, and why its results are better.

        

<h3>Adding Tagging to a LaTeX Document</h3>

<p> Finally, we come to the heart of the matter. Tagging produced by the LaTeX project has
the following goals:
<ul>
<p><li> Tagging is done automatically with no user intervention
<p><li> The output document visible on the web looks exactly the same as the original document
<p><li> The tagged pdf document is only a little larger than the original untagged document
</ul>
<p> A document to be tagged can be processed by pdflatex or by lualatex, but not by xelatex. That is
because xelatex does not produce output in a form required by the tagging project.
<p> To add tagging to a latex document, it is only necessary to add one line to the source.
This line must be at the very beginning of the source, even before \documentclass. The
required line is
<pre>
     \DocumentMetadata{tagging=on}
</pre>

<h3>Illustrations</h3>

<p> Earlier we stated that tagging can be done with no human intervention. That is not quite true,
although many users will probably skip the additional step that is technically required. The problem
comes from illustrations.

<p> Below is typical code for an illustration from a LaTeX document. The  illustration can be
in several formats: pdf, png, jpg, eps, etc. The surrounding code often looks like this:
<pre>
   \begin{figure}[htbp] %  figure placement: here, top, bottom, or page
      \centering
      \includegraphics[width=3in]{diagram1.pdf} 
      \caption{Space Time Diagram}
      \label{fig:example}
   \end{figure}
</pre>

<p> The key line for us is "caption", which adds a name to the illustration. Many authors omit
this entirely, so illustrations stand alone with no caption. If an illustration in a tagged document
has a caption, then that caption is spoken when the document is read aloud, but as we will 
see, that situation is not ideal. If an illustration has no caption, then the tagging project speaks it
by just giving the name of the illustration, perhaps "diagram1 pdf". This caption is 
not printed in the visual document; it is just spoken as a substitute for a bad situation. In this
case, the tagging software will flag the illustration with a warning.

<p> But the ideal situation is to add another element to the illustration code of the form
<pre>
     alt={This is alternative text},
</pre>
This element can be added to the previous code fragment in addition to "\caption" or
even when there is no "\caption". It is not shown in the visual document, but instead
is spoken when the entire document is read to a blind user. Harvard's "Digital Accessibility" page
says
<ul>
<li> Keep it short, usually 1 or 2 sentences. Don't overthink it.
<li> No need to say "image of" or "picture of"
<li> end alt sentence with a period
</ul>

<p> All of the sources warn that long alt phrases can annoy a user listening to the document. So I add
a personal piece of advice, to be used temporarily as we get used to tagging. If you do not know
a disabled user of your web pages, ignore alt in illustrations and just accept the default. If you go
to the trouble of adding alt text, you are probably doing it wrong, and you don't have a user who will complain. But if you run into a student who is actively using the tagging, then use that opportunity
to add alt phrases and find out from that user what works and what doesn't.

<BR>
<hr>
<table valign='bottom' align="left">
<tr><td valign='bottom'>
<br>
<font COLOR="#887700">
<i><b>Happy TeXing on macOS </i>!</b> 
</font>
</td></tr></table>

<table valign='bottom' align="right">
<tr><td valign='bottom'>
<br>
<a href='./donate.html'>
<b><i>Donate</i></b></a>    
</td></tr></table>
<br clear='all'>



</body>
</html>