From zack.weinberg at sv.cmu.edu  Tue Dec  6 21:34:07 2011
From: zack.weinberg at sv.cmu.edu (Zack Weinberg)
Date: Tue, 6 Dec 2011 12:34:07 -0800
Subject: [Rd] Graphics device hook to manipulate plotmath
Message-ID: <CAKCAbMgWwATvOZZW=mAJSenaDBAQaJuBuj35KDqimAgw68Qj6w@mail.gmail.com>

Is there a hook that allows a graphics device to apply transformations
to plotmath expressions *before* they are rendered?  If there isn't
one yet, would it be feasible to add one?

The motivation for this hook is graphic devices that feed into
something that already has support for math layout, such as the
tikzDevice package (which has TeX downstream). Given

    text(x, y, expression(alpha+beta+gamma+delta))

it would be ideal (in terms of output quality) if tikzDevice could
process that as if

   text(x, y, "$\\alpha+\\beta+\\gamma+\\delta$")

had been written instead.  This would also be easier to *implement*,
from the device side, than a back-conversion from Adobe-Symbol glyph
requests to TeX math symbol macros.

(Users of tikzDevice can of course write all their TeX math
expressions directly, but this may be a great deal of conversion work,
and is also inconvenient for someone tweaking their plots in one of
the interactive graphics devices before saving them permanently.)

Thanks in advance,
zw

p.s. I am not subscribed to this list, please cc: me on replies.



[Rd] Graphics device hook to manipulate plotmath
Zack Weinberg