The thing is: LaTeX might try hard to look like a declarative language for structured documents, but it is not. It is a set of TeX macros. And TeX is a type setting system.<p>There is no good reason to put the accessibility into the type setting. Instead, use a declarative (e.g., any markup) language, translate that a) to (LaTeX) and b) to accessibility annotations and then combine the two results. Problem solved.<p>Unfortunately you will either lose a lot of expressiveness along the way or you have to find a <i>very</i> sophisticated markup language.
An answer, particularly in the sciences, is to also distribute the source *.tex files, which being plain text with markup, can be handled just fine by things like emacspeak, or accessibility tooling for other sensible editors.<p>This comes up a bit around the blind accessibility issue for mathematics, which is why I suspect it's bubbling up this week on HN.
Even though LaTeX is still not very close to producing perfectly accessible PDF documents, there is some recent work towards this goal.<p>- <a href="https://ctan.org/pkg/tagpdf" rel="nofollow">https://ctan.org/pkg/tagpdf</a><p>- <a href="https://ctan.org/pkg/accessibility" rel="nofollow">https://ctan.org/pkg/accessibility</a><p>I am using the former for some personal documents and found that it improves text selection and copying on Apple devices. (This could be related to how PDFKit handles text.)<p>Edit: formatting.
Converting LaTeX to HTML may be a route to making it accessible. I'm working on this project: <a href="https://github.com/arxiv-vanity/engrafo" rel="nofollow">https://github.com/arxiv-vanity/engrafo</a><p>It's 80% of the way there, but with 80% more work it could be a pretty complete implementation.<p>It powers this: <a href="https://www.arxiv-vanity.com/" rel="nofollow">https://www.arxiv-vanity.com/</a>
If you want accessibility, it would be better to convert your content to XML and run the LaTeX through MathJax first, using accessibility extensions (<a href="https://mathjax.github.io/MathJax-a11y/docs/" rel="nofollow">https://mathjax.github.io/MathJax-a11y/docs/</a>). Then use a third-party converter such as PrinceXML to generate the PDF from the XML.
One pattern I like to use is to write my documents using markdown which can be compiled into pdf via latex with a template of my choosing. It is also capable of compiling to other formats which may be more accessible such as plain text, html and docx.<p><a href="https://pandoc.org/" rel="nofollow">https://pandoc.org/</a><p>[edit to add link to pandoc]
The "accessibility" LaTeX package maintainer is looking for help in this area: <a href="https://github.com/AndyClifton/accessibility/issues/42" rel="nofollow">https://github.com/AndyClifton/accessibility/issues/42</a>
Ross Moore did a presentation about accessibility and PDF at the 2020 TUG online conference.<p><a href="https://youtu.be/VF9Ubax_HIY" rel="nofollow">https://youtu.be/VF9Ubax_HIY</a>
The author writes:<p>"Did I mention that both Word and LibreOffice generate tagged PDFs?"<p>But then the simple solution is this: Convert your LaTeX to Word or LibreOffice. Then generate the PDF.<p>Absurdly the easiest way to convert LaTeX to Word/LibreOffice is by creating a PDF first (<a href="https://tex.stackexchange.com/questions/111886/how-to-convert-a-scientific-manuscript-from-latex-to-word-using-pandoc" rel="nofollow">https://tex.stackexchange.com/questions/111886/how-to-conver...</a>), import that into Word/LibreOffice and then create your PDF/A from that.
Why must the PDF encapsulate all requirements? My understanding of accessibility requirements it that you must have <i>a</i> version that is amenable to automatic speech, not that all versions must be.
1. Needs (2016) in the title.<p>2. Even by 2016, pdfTeX had been largely superseded by LuaTeX.<p>3. The author bizzarely links to "the mess" of the literate source of TeX the program as a WEB file rather than as a typeset document.<p>4. AIUI, the source code of the TeX engine has nothing/very little to do with adding tags to PDFs, which it is the job for LaTeX packages. Admittedly, understanding and writing their source code is a rarer skill than reading the literate source of TeX.
>Take your average computer science graduate from the last ten years. Do you think anyone would be remotely able to understand what is going on there?<p>Yes, you literally read the literate program of TeX and understand what's going on: <a href="http://brokestream.com/tex.pdf" rel="nofollow">http://brokestream.com/tex.pdf</a><p>I had never learned Pascal but I've managed to edit and compile TeX successfully, and it was easier than trying to understand any of my own non-literate programs.<p>>My point being that if we wouldn’t rely on TeX itself and use ANT (or whatever alternative) which is written in the quite elegant OCaml, than hacking it would be at least possible for mere mortals. Although I have to admit, despite being in love with OCaml since my PhD days, it’s also a quite niche language. But imagine if the whole thing was written in Python, or at least C.<p>Imagine if software engineers were actual engineers instead of glorified script kiddies.<p>>I wish someone would design a new space shuttle because while it's a neat project I only understand MKS units and it's too much effort to use a calculator for converting between them and Imperial units.
I had a realization a while back, that in my opinion LaTeX isnt really needed anymore. Pretty much anything you can do with LaTeX, you can do with HTML. Want a PDF? Most browsers will print to PDF now, or you can use a library like this:<p><a href="https://github.com/dompdf/dompdf" rel="nofollow">https://github.com/dompdf/dompdf</a><p>Need a page break? Here you go:<p><a href="https://developer.mozilla.org/Web/CSS/break-after" rel="nofollow">https://developer.mozilla.org/Web/CSS/break-after</a><p>Im not sure what you would do about TikZ and stuff like this, but I have seen some pretty wild stuff in CSS, so surely its possible:<p><a href="https://pattle.github.io/simpsons-in-css" rel="nofollow">https://pattle.github.io/simpsons-in-css</a>