[XeTeX] potential new feature: \XeTeXgenerateactualtext

Jonathan Kew jfkthame at gmail.com
Thu Feb 25 11:03:23 CET 2016


On 24/2/16 23:31, Will Robertson 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.
>
> 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?
>

The xdvipdfmx patch does not have any effect on \special{} handling; the 
implementation of \XeTeXgenerateactualtext doesn't put traditional 
"special"s in the output, it uses a new DVI opcode to provide the 
text+glyphs for each word.

I'd guess it has always been possible, in principle, to attach 
ActualText to math at the macro level, using \specials{}s to write the 
necessary PDF code directly. But I confess I haven't really looked into 
what this would involve.... perhaps there are obstacles that make it 
impractical.

JK


More information about the XeTeX mailing list