[XeTeX] potential new feature: \XeTeXgenerateactualtext

Ross Moore ross.moore at mq.edu.au
Thu Feb 25 02:05:45 CET 2016

Hi Will, Jonathan, and others

> On Feb 25, 2016, at 10:31 AM, Will Robertson <will at wspr.io> wrote:
> On 24 Feb 2016, at 2:20 AM, Jonathan Kew <jfkthame at gmail.com> wrote:
>> For a document that wants some other kind of "ActualText", there's going to need to be pretty detailed markup in the source, I think. (E.g. each word, or similar unit, will need to be tagged to provide the desired ActualText that goes with it.) At that point, I wonder if turning off \XeTeXgenerateactualtext and just doing it "manually" with macros that generate \special{}s would be the most reasonable way forward.

You have to be *very* careful with /ActualText, since it must be done using PDFdoc encoding, 
as it becomes part of the page contents stream.
Any errors will corrupt the PDF file completely — but that’s true of other things as well.
Heiko’s  \pdfstringdef  in the hyperref package is very good for handling this...

> This sounds interesting for maths, where there is a chance we could automatically insert \special{}s at the glyph and/or the equation level — has this always been possible in XeTeX or does this require the newest patch for xdvipdfmx you just released?

 … but doing the math-characters correctly, without interfering with spacings, 
is highly non-trivial.

Look at some of my papers associated with TUG conferences, to see various
options that can be used to make mathematics more accessible in PDFs; i.e.,
papers numbered as 5, 6, 7 on this page: 

Although these were done using pdfTeX, some of these things should be able
to be implemented for XeTeX + xdvipdfmx  also.

> Cheers,
> Will



More information about the XeTeX mailing list