11

I want to learn the correct way of writing a tagged math book.

Is my current structure sufficient? If not, how can I improve this skeleton?

What packages must I sacrifice in the name of tagging?

In my actual practise, I have a source file like this:

\DocumentMetadata{ pdfstandard = UA-2 ,tagging = on ,lang = en } \documentclass[letterpaper]{book} \usepackage{preamble} \title{Jasper's Book} \author{Jasper} \date{\today} % \includeonly{chapter_4} \begin{document} \frontmatter \input{half-title} \maketitle \input{copyright} \input{dedication} \input{epigraph} \include{preface} \include{notation} \include{acknowledgements} \tableofcontents \listoftables \listoffigures \mainmatter \part{Blah} \include{chapter_1} \include{chapter_2} \include{chapter_4} \part{Blah blah} \include{chapter_5} \include{chapter_6} \include{chapter_7} \part{Blah blah, blah} \include{chapter_8} \include{chapter_9} \include{chapter_10} \include{chapter_11} \part{Blah blah, blah. Blah.} \include{chapter_12} \appendix \include{appendix_1} \include{appendix_2} \include{appendix_3} \backmatter \printbibliography \printindex \end{document} 

It expands to something like this:

\DocumentMetadata{ pdfstandard = UA-2 ,tagging = on ,lang = en } \documentclass[letterpaper]{book} \makeatletter \PassOptionsToPackage{ backend=biber ,style=alphabetic ,sorting=nyt }{biblatex} \PassOptionsToPackage{colorlinks = true}{hyperref} \RequirePackage{ mathtools ,amsthm ,unicode-math ,siunitx ,microtype ,tikz ,booktabs ,tabularx ,enumext ,extarrows ,unicode-math ,subcaption ,nicematrix ,extarrows ,biblatex ,makeidx ,old-arrows ,xpatch ,hyperref } \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} \setmainfont{Libertinus Serif} \setsansfont{Libertinus Sans} \setmonofont{Libertinus Mono} \setmathfont{Libertinus Math} \addbibresource{bibliography.bib} \makeindex \makeatother \title{Jasper's Book} \author{Jasper} \date{\today} % \includeonly{chapter_4} \begin{document} \frontmatter % half-title \clearpage \thispagestyle{empty} \par\vspace*{.35\textheight}{% \centering Jasper's Book \par } \clearpage \thispagestyle{empty} \maketitle % copyright \clearpage \thispagestyle{empty} \par\vspace*{.35\textheight}{% \copyright~2025 Jasper. This work may not be reproduced, distributed, or transmitted in any form or by any means without the prior written permission of the author. } % dedication \clearpage \thispagestyle{empty} \par\vspace*{.35\textheight}{% This book is deticated to the existence of peanut butter. } % epigraph \clearpage \thispagestyle{empty} \par\vspace*{.35\textheight}{% ``I hate Mondays'' ---Garfield } \chapter*{Preface} This book is meant for people who are interested in reading it. \chapter*{Notation} This book is full of notation, which we will not explain. \chapter*{Acknowledgements} \addcontentsline{toc}{chapter}{Acknowledgements} This work was typeset using \TeX{}, the typesetting system created by Donald~E.~Knuth, along with various extensions and packages developed by the \TeX{} community. I am grateful to the vibrant \TeX{} Stack Exchange community for their ongoing support and resources. \par \vspace{2em} \hfill\textit{Jasper} \tableofcontents \listoftables \listoffigures \mainmatter \part{Part 1} \chapter{Chapter 1} \chapter{Chapter 2} \chapter{Chapter 3} \part{Part 2} \chapter{Chapter 4} \chapter{Chapter 5} \chapter{Chapter 6} \appendix \chapter{Appendix 1} \chapter{Appendix 2} \chapter{Appendix 3} \backmatter \printbibliography \printindex \end{document} 
16
  • 4
    You should check latex3.github.io/tagging-project/tagging-status/full. A lot of those packages are not currently compatible with tagging Commented Aug 17 at 21:46
  • 4
    You're loading unicode-math and extarrows twice in your extended example. And if you load mathtools you don't have to explicitly load amsmath. Commented Aug 17 at 21:49
  • 2
    No, by incompatible I mean either they just error when the tagging code is loaded or they produce wrong PDF structures Commented Aug 17 at 21:51
  • 2
    unicode-math loads fontspec automatically. subcaption loads caption. but I don't see where you load biblatex twice - @DavidCarlisle? Commented Aug 17 at 23:07
  • 3
    Give it a go, and see what VeraPDF complains about. The incompatible packages that mbert linked to are because it isn't yet possible to account for every situation, or some command from that package doesn't work right (look through the linked issues). But if you're not using that command or you can introduce the appropriate tagging commands, then you can fix it. I've made great progress with UA-1 (with a lot of help here), and the main thing holding me back for UA-2 is media9. Commented Aug 18 at 1:53

1 Answer 1

16

As David Carlisle said, this is under active development, so much of it is in a great amount of flux. But there are some guidelines I can share.

  1. As a consequence of "active development", make sure everything is updated: you definitely need 2025, and then How do I update my TeX distribution?. Make sure you're using LuaLaTeX.
  2. I think the current first command is now at
\DocumentMetadata{ pdfstandard = UA-2 ,tagging = on ,lang = en ,tagging-setup={math/setup=mathml-SE}} } 
  1. If your document must be approved by Blackboard Ally, then tagging-setup currently also needs the key math/alt/use. Unfortunately, this makes your document less accessible in Adobe Reader.
  2. The LaTeX team has been using VeraPDF to verify pdfs. It has a command line tool that is quite useful. I've also found PDFix useful - it's not quite a comprehensive as VeraPDF, but it has a better GUI to locate problems. There's also PAC, but it's Windows only, has a bug regarding tabular, and can only handle up to UA-1 (which means you need to remove the math/setup key and specify pdfversion=1.7).
  3. https://latex3.github.io/tagging-project/tagging-status/full shows the known tagging status of packages and classes. Do not use anything labeled "no support". If you can switch to "compatible", do so. If you have something under the other categories, see what VeraPDF says. You can also check on the issues for a particular package or class and see if someone helpful has already solved your problem.
  4. texdoc tagpdf will provide some help. See also https://latex3.github.io/tagging-project/documentation/prototype-usage-instructions.html. Your images will need alt text, and your tables will need to specify their headers.

I've gotten a 1000 page Calculus book to be UA-2 as well as a 400 page Linear Algebra book. So it's definitely doable, and things are getting better day by day.

4
  • 2
    Thank you, this is very helpful. I will leave the question open for now though, in case anyone else has any more input. I may at some point ask an elaborated question (or more) about specifics, should they arise. Commented Aug 18 at 2:36
  • What is the problem with media9 and ua-2? Commented Aug 18 at 6:35
  • 1
    @UlrikeFischer this, I guess github.com/latex3/tagging-project/issues/868 Commented Aug 18 at 10:03
  • I was misremembering. UA-2 is ok. It's A-4F I'm still trying to figure out. Commented Aug 18 at 13:08

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.