I started using the awesome knitr
package, and whilst I love the idea of using tikz
graphics, it's not always very practical (time consuming). Thus, I end up switching back and forth between the good old pdf
device, and tikz
. Mathematical expressions are generally not handled in the same way in both devices; I find it much preferable to use LaTeX syntax in tikz
, but it becomes hard to read in pdf
, and vice-versa.
Have there been attempts at providing a framework to seamlessly switch from one notation to another? Something like a translate(x, from="plotmath", to="tex", ams=TRUE, ...)
function, that could be hooked internally with knitr
to the device in use. How would one go about doing it?