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.
Unfortunately you will either lose a lot of expressiveness along the way or you have to find a very sophisticated markup language.
Something like:
\pdftag{blah}
Common packages could then generate these tags, and very few modifications of TeX source would be needed.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.
If you want maths for the blind you need to convert to something like s-expressions, which emacspeak and read perfectly.
I read more than one or two IT papers which donated variable types by using a different font between A and A and that difference was essential for reasonable understanding the papers.
Then the notation is overloaded.
Brackets are not even necessary enclosing something or are not necessary well balanced.
"Bar" based brackets and bars used for non bracket purpose are not necessary differentiate by noon visual clues. Etc.
It's already often confusing for people which can read the formula so I'm not surprised that really annoying for people which can't normally read the formula.
A super simple example is that [a;b[ is that "German"/(EU?) still to write an range with inclusive start and exclusive end. In the US [a;b) is used instead. But let's be honest something like rangeIE(a, b) or similar (Latex range_{ie}) is much better for a screen reader I thing and that's a trivial example not one of the really bad ones.
I think all formula should be written in a way which represents semantics not visuals and then be compiler to a classical visual representation (maybe using some additional non-semantic style annotation block).
Personally I think that latex should produce pdf documents with better mappings so that copy-paste and latex-paragraphs are preserved, even if obviously it will still get messed up in complex layouts
- https://ctan.org/pkg/accessibility
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.)
Edit: formatting.
It's 80% of the way there, but with 80% more work it could be a pretty complete implementation.
It powers this: https://www.arxiv-vanity.com/
[edit to add link to pandoc]
"Did I mention that both Word and LibreOffice generate tagged PDFs?"
But then the simple solution is this: Convert your LaTeX to Word or LibreOffice. Then generate the PDF.
Absurdly the easiest way to convert LaTeX to Word/LibreOffice is by creating a PDF first (https://tex.stackexchange.com/questions/111886/how-to-conver...), import that into Word/LibreOffice and then create your PDF/A from that.
Also, a lot of people don't consider accessibility when generating PDFs. If LaTeX produced accessible PDFs, the PDFs would be tagged automatically without the author even thinking about it. Of course, it might still not be perfect, but it would be a lot better than the status quo.
2. Even by 2016, pdfTeX had been largely superseded by LuaTeX.
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.
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.
Is that true? My experience was that pdftex is by far the most used one, but while thinking about it, I noticed I have zero data to back that up.
Yes, you literally read the literate program of TeX and understand what's going on: http://brokestream.com/tex.pdf
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.
>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.
Imagine if software engineers were actual engineers instead of glorified script kiddies.
>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 don't really agree with Knuth's version of literate programming, but one can hardly fault the TeX source for being unreadable.
Maybe you shouldn't need to be an engineer to write a document with some formulas inside?
What's at stake here is the difficulty of editing the source code of LaTeX, which would be necessary in order to make the resulting pdf files more compatible with screen readers for the visually impaired.
Aren't formulas easy to insert in plain text?
The problem with maths notation is that it was invented by sighted people for sighted people as a short hand for very complex ideas, which at the time weren't fully understood.
If you want to type equations use s-expressions, the clarity you get from saying what you mean is astonishing.
(define integral
(lambda (function)
;; Implementation of Risch algorithm left
;; as an exercise to the motivated reader.
))
(define definite-integral
(lambda (lower-bound upper-bound function)
(let ((anti-derivative (integral function)))
(- (anti-derivative upper-bound)
(anti-derivative lower-bound)))))
Hey look, you don't need the dummy variable explicitly any more. It's almost like it's a relic from a time before people understood what function application actually was.If you want the implicit mess (and incredible power) of higher maths, be prepared to deal with the the mess of typography. Which is why you need TeX, or worse.
Maybe to edit such a complex program that you're using to convert your equations to some other pretty format you should.
Revisit this comment in 5 years.
MathType supports TeX input. MathJax accepts TeX input. The technology is already there, there's just very little mindshare because no one cares about accessibility.
https://github.com/dompdf/dompdf
Need a page break? Here you go:
https://developer.mozilla.org/Web/CSS/break-after
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:
Am I correct in assuming that you are not working in academia/on research? In that case, I would argue that from your point of view latex was never needed. On the other hand, if you are working on math/cs/physics research latex is indispensable...
A LaTeX-generated PDF does not render correctly at all for a blind user.
I also tried from/to HTML and the result is just bad. HTML isn't suited at all to write scientific documents with proper formatting.
Also I still need to do some things directly in latex and include them with inline latex in markdown.
So no HTML+CSS isn't suited for this at all.
At least for now where scientific papers are still DIN A4 real paper based/targeting.
Maybe it's time to change that. People read papers a lot in 24" Monitors, tablets, laptops and e-book readers for all of this the current formatting sucks.
The learning curve is pretty high though. If you're not a web developer already, there are better options out there.
LaTeX still does a better job out of the box, which goes a long way for my understanding of its typical use cases (resumes or long form reports).
In Pandoc, what you would do is you would use a general Latex plugin, and then TikZ supports PNG or SVG output by 'standalone' (https://tex.stackexchange.com/questions/51757/how-can-i-use-...), and you can either save that to a file & use as an image or you can inline them.
This uses Latex at compile-time, but considering the extent to which TikZ is a graphics DSL, I wonder how hard it would be to implement a TikZ->SVG compiler as a standalone tool in a different language? (Or make it available in a variant like Mathjax? Like https://github.com/kisonecat/tikzjax except without running an entire TeX engine in the user's browser.)
Static site generators like Sphinx, Hugo, and Jekyll have support for MathJax which allows for inline equations in Markdown/RsT docs. See a Sphinx example here [1].
[1]: https://www.pflotran.org/documentation/theory_guide/mode_th....