[pdftex] making pdf document accessible using LaTeX

James Quirk jjq at galcit.caltech.edu
Tue Nov 13 18:06:27 CET 2007


> By the way, I have been pointed to a developing NISO standard for
> accessible maths, that would be similar to this with MathML, if I
> understood well. A variation of Design Science's MathPlayer would have
> been able to read aloud such a PDF, including the maths read not as ASCII
> source, but as real maths.
I've not looked at the NISO standard, but I've spent a fair
amount of time messing around with, Sable, the markup
language shipped with the Festival text-to-speech (TTS) processor.
And the big advantage it has over Adobe's built-in TTS approach
is that it is possible to add cues that control the speech.
For example, a PRON tag allows the pronunciation of a word
to be given explicitly, as in:

   <PRON SUB="toe maa toe">tomato</PRON>

and a SAYAS tag can be used to control the context of a number:

   As a test of marked-up numbers. Here we have  
   a year <SAYAS MODE="date">1998</SAYAS>, 
   an ordinal <SAYAS MODE="ordinal">1998</SAYAS>, 
   a cardinal <SAYAS MODE="cardinal">1998</SAYAS>, 
   a literal <SAYAS MODE="literal">1998</SAYAS>, 
   and phone number <SAYAS MODE="phone">1998</SAYAS>.

For details see, http://www.cstr.ed.ac.uk/projects/sable_spec2.html .

Now since festival can produce WAV files it would be fairly easy
to construct a test PDF to show the difference such embelishments
make compared to the built-in TTS (I've put it on my TODO list). 
I guess you could liken them to the changing of fonts and other 
typesetting tweaks that we take for granted in TeX. 
> Is anyone here aware of some work with pdftex (or luatex!) in this
> direction?
Not personally. But it's worth noting that as an alternative to embedding 
a WAV file, it's possible to embed a Sable file in a PDF document and then 
use a JavaScript-powered button to export the file and have it be 
processed by Festival.  Since the same approach could be used for other 
third-party systems, there's plenty of scope for exploring what could be 
done regarding accessible mathematics. Here I'm using accessible in it's 
broadest sense e.g. you could have the result of some symbolic computation 
and have it tied to the MAPLE/MATHEMATICA source, and at a click of a 
button the interested reader could retread the reported work. Obviously, 
document security then comes into play as do Adobe's rules for launching 
attachments, see:


> While on this topic, I read here a while ago about the possibility to
> have some kind of tooltip window with typeset material in it showing
> while passing the pointer over an activated zone. This is typically a
> feature that would change mere links into a useful thing for latex cross
> references (show the bibitem when pointing a bibcte, e.g., or the
> equation content for an eqref, or theorem statement, section title,
> etc.)
Given the flexibility of PDF's /Widget annotations, there is
no end to what could be done in this direction.  For instance, 
it would be possible to have external links be directed through
a pop-up annotation that explains why the external link
is being accessed. The popup would also serve as a safeguard
should the external link ever go missing. 

Life get's a bit tough when building nested /Widget's as is explained 
in the technote:


but the machinations can all be automated, and with the
arrival of luatex life will get considerably easier.

Incidentally, buried in the nested-widgets note is example 18.11 from the 
TeXbook where each element is a /Widget that can be toggled on and off. To 
see it, activate the listing at the bottom of column one and then go to 
bookmark number 5. The period that ends the equation activates a second 
listing that shows how the primary listing is annotated. Note that owing 
to a bug in AR8, the nested-widgets document needs to be read with AR7.

As it stands the example is not much use. But the approach would allow for 
walk through equations to be constructed where the author explains to the 
reader (or listener) the various terms and what they mean. For instance, 
putting my fluids hat on, I could imagine dissecting the Navier-Stokes 
equations pointing out the various stress terms.

> Same question here: has someone developed something so that I can simply
> plug a package and have all my crossrefs (at the possible price of some
> more markup required) turned into a tooltip preview of the target?
The techniques used in the nested-widget note would allow you 
to do what you want, and much more. The fly in the ointment, however, 
is that the programming buy in makes it impractical for mainstream use. 
For that reason, I'm in the process of creating a Luatex extension
that will lower the barrier.

> That would make PDF (and pdflatex) quite a user friendly system for the
> scientist!
Here I would like to draw attention to:

    "Mathematics rediscovers the scientific method"

I think it's fair to say we are in a transitional phase where many 
Mathematicans and Scientists are beginning to worry about "reproducible 
research" and the like. But there is not much understanding of just what 
can be done in that direction using today's technologies (albeit with much 
programming effort). Many scientists are also hostile to the document
revolution. See, for instance:

   Scientists Don't Want New Careers in Desktop Publishing

which to be fair to the author does raise some valid concerns
with the way publishers are utilizing electronic media.
Now in not too distant future, say 10-20 years, one can imagine having 
true electronic paper with pen input. Throw in the appropriate software 
and one would have a truly "user friendly system" for authoring 
self-substantiating, scientific documents. Such documents could be made 
"accessible" in more than one way. In addition to TTS for the visually 
impaired, one could imagine documents with walkthrough threads that 
explain the material to the interested reader who might
not have the background to read the paper on his/her own. 
Such documents, for example, could be used as a means of attracting 
bright kids into niche technical fields.

Anyhow the purpose of this extended message is to point out that with 
the arrival of Luatex, and the improved programming model it offers,
there is plenty of opportunity to think outside the traditional
TeX box (if you pardon the pun) regarding the creation of
rich-featured technical documents. And I'm wondering where is
the best place to discuss such matters? 

>  Thierry      
> _______________________________________________
> pdftex mailing list
> pdftex at tug.org
> http://tug.org/mailman/listinfo/pdftex

More information about the pdftex mailing list