The next trick is dedicated to Aditya ...

% engine=luatex

\unprotect

\def\Hack#1#2%
{\pdfliteral{/Span << /ActualText <\ctxlua{pdf.hexify(\!!bs\detokenize{#1}\!!es)}> >> BDC}#2\pdfliteral{EMC}}

\protect

\def\Formula#1{\Hack{#1}{$#1$}}

\startTEXpage[offset=3pt]
    test \Formula{e + a = mc^2 + \alpha} test
    \blank[2*big]
    \Formula{e + a = mc^2 + \alpha}
    \blank[2*big]
    $e + a = mc^2 + \alpha$
\stopTEXpage

\stoptext

try to cut and paste the math ... (only acrobat and actually acrobat is a bit bugged in this respect but the idea is there)


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to