# [Rd] Graphics device hook to manipulate plotmath

From: Zack Weinberg <zack.weinberg_at_sv.cmu.edu>
Date: Tue, 06 Dec 2011 12:34:07 -0800

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.)

zw

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

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 07 Dec 2011 - 08:44:43 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 12 Dec 2011 - 13:50:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.