I have a sty file which defines my institution's dissertation format. I have for the most part been able to get it to work with tagging (via TexLive 2025, LuaLaTeX and tweaking code) for accessibility. Likewise, I have gone from TaggedPDF reporting errors, to the document compiling with just some warnings. Accessibility checking (via Foxit) gives "Lbl and LBody - Failed" which I narrowed down to \chapter and \section macros.
For posterity, I had to tweak the \tableofcontents macro from:
\newlength\singlespacelength
\newlength\doublespacelength
\newlength\triplespacelength
\setlength\singlespacelength{15\p@}
\setlength\doublespacelength{26\p@}
\setlength\triplespacelength{40\p@}
\newcommand\startsinglespace{\setlength\baselineskip{\singlespacelength}}
\newcommand\startdoublespace{\setlength\baselineskip{\doublespacelength}}
\def\typesetHeading#1{{\normalfont\large{#1}}}
\def\intro{\clearpage \thispagestyle{intropage}
\global\@topnum\z@ \@afterindenttrue \secdef\@chapter\@schapter }
\renewcommand\contentsname{TABLE OF CONTENTS}
\newcommand\contentsnameLC{Table of Contents}
\renewcommand\tableofcontents{%
\intro*{\typesetHeading\bf\contentsnameLC
\@mkboth{{\contentsnameLC}}{{\contentsnameLC}}}%
\startsinglespace
\@starttoc{toc}
\startdoublespace
}
to
% ... other definitions left alone
\renewcommand\tableofcontents{%
\if@openright\cleardoublepage\else\clearpage\fi
\begingroup
\startsinglespace
\centering
{\normalfont\large\bfseries \contentsnameLC}%
\@mkboth{{\contentsnameLC}}{{\contentsnameLC}}%
\par\vskip\medskipamount
\@starttoc{toc}%
\endgroup
}
Which fixed the errors. Now I am facing a tougher problem, the chapter macros. Unlike the other commands which I was able to get working, the chapter macros are a lot more coupled/complex, and I cannot tell where exactly are things breaking. I would appreciate instruction on how to begin to debug this, or working chapter macros that achieve the same thing (visually).
\def\chapter{\clearpage \thispagestyle{chappage}
\global\@topnum\z@ \@afterindenttrue \secdef\@chapter\@schapter }%\pagestyle{plain}
\def\@chapter[#1]#2{
%% Chapters are necessary, so checking secnumdepth is immaterial.
\refstepcounter{chapter}%
\ifapp
\ifnum\value{chapter}=1
\addtocontents{toc}{\vskip 1.0em %plus 1pt
\hskip -\parindent \appendicesname\hfill%
\vskip 0.25em
\rm}
\else
{}
\fi
\else
\ifnum\value{chapter}=1
% Moving away from roman numerals
% \pagenumbering{arabic}
\pagestyle{plain}
\addtocontents{toc}{\vskip 0.25em
\rm}
\fi
\fi
\ifnum \c@secnumdepth >\m@ne
\typeout{\@chapapp\space\thechapter.}
\addcontentsline{toc}{chapter}{\protect\numberline{\thechapter.}#1}%
\else
\addcontentsline{toc}{chapter}{#1}
\fi
\chaptermark{#1}%
\@makechapterhead{#2}%
% \pagestyle{reset}
}
% Chapter # is 2in from top, followed by 2 lines, followed by
% the title, 4 lines, and then the text.
\def\@makechapterhead#1{
{
% Change Chapter headings from 2in. to 1in.
%\vspace*{0.25in}
\vspace*{-0.75in}
\parindent \z@ \raggedright \reset@font
\ifnum \c@secnumdepth >\m@ne%
\center\typesetHeading{\bf\@chapapp{} \bf\thechapter}%
%\par
%\vskip 30pt
\fi
\begin{center}
% Remove Bold from Chapter Headings
%\large\boldcmd\typesetChapterTitle{#1}
\vskip -20pt
\typesetChapterTitle{#1}
%\par
\end{center}
\nobreak
%\vskip 15\p@ % Too much space between chapter title and body
}
}
\def\@schapter#1{%
\@makeschapterhead{#1}%
}
% Placement of the Chapter headings
\def\@makeschapterhead#1{
% Change heading in TOC, LOF, LOT, and Aknowledgements from 2in. to 1in.
\vspace*{-0.5in}
{
\parindent \z@ \raggedright
\reset@font
\begin{center}
\large\boldcmd\typesetChapterTitle{#1}
\par
\end{center}
\nobreak
% Reduce the spacing between the chapter heading and title
\vskip 15\p@
}
}
\rmor similar 2-letter font switches (except\em) in latex. this has not been defined in latex for decades.lualatex --versionThis is LuaHBTeX, Version 1.22.0 (TeX Live 2025) Development id: 7673 Is there some newer version? I checked for updates but found none. As for removing the tagging of the headings, that wasn't my intention, but without my change to thetableofcontentsI get a "Package tagpdf Error: The number of automatic begin (34) and end (31)". How can I properly fix thetableofcontentscommand?Lbl and LBody Failedin the Foxit checker. So I am pretty sure I need a more current LaTeX, but I have no idea how to install the development version of LaTeX? Since I think I am on the latest release.