ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* trick
@ 2008-12-11 12:07 Hans Hagen
  0 siblings, 0 replies; only message in thread
From: Hans Hagen @ 2008-12-11 12:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Aditya Mahajan

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-11 12:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-11 12:07 trick Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).