[texhax] making pdf document accessible using LaTeX

William Adams will.adams at frycomm.com
Mon Nov 12 16:52:03 CET 2007


On Nov 12, 2007, at 9:41 AM, Martin Heller wrote:

> You could provide an alternative text in pdf as well. I don't
> know if screen readers can pick it up, though.
>
> \documentclass[12pt]{article}
> \usepackage[latin1]{inputenc}
> \usepackage[T1]{fontenc}
>
> \begin{document}
> The Pythagorean Theorem is
> \pdfliteral direct {%
>    /Span << /ActualText (a\ squared\ plus b\ squared\ equals\ c\
> squared) >> BDC
> }%
> $a^2+b^2=c^2$
> \pdfliteral direct {%
>    EMC
> }
> \end{document}

I just tried that in Mac OS X 10.4 (still trying to find the time to  
install Leopard) and it works properly w/ Adobe Acrobat 8.

It does create some strange text selection-highlighting issues (you  
can't highlight ^2 + b^2 = c^2 in the .pdf), but when you copy and  
paste the above typeset sample document you get:

The Pythagorean Theorem is a squared plus b squared equals c squared
1

(which argues that the page number should have ``Page number''  
prefixed to it as actual text)

Do you mind if I forward your post to the bookpeople mailing list? It  
automatically disguises e-mail addresses so it won't result in more  
spam.

Neat! Thanks!

William

-- 
William Adams
senior graphic designer
Fry Communications




More information about the texhax mailing list