Is there a way to use greek letters within ERT in Lyx?
An example of code that fails (as TeX ERT code) follows. With no greek letters, much the same code works just fine but is not nearly as pretty. In R command line I would sandwich the print(...) command in
Code: Select all
cairo_pdf(file="ksat.pdf")print(...)dev.off()
and get a nice PDF.
Bad code
Code: Select all
require("lattice")ksat <- data.frame( cbind( c(2.5, 7.5, 17.5), c(15,10,0), c(2.5,4,0), c(17.5,14,0)))names(ksat) <- c("depth", "Ψg", "Ψp", "Ψt")print(xyplot(-depth~Ψg+Ψp+Ψt,type="b",data=ksat,pch=plotchars,col=plotcolors,panel = function(...){x_off <- 0.0pos_adj <-c(-0.1,1.2)text_col <- "darkolivegreen"panel.abline(h=-2.5, col="grey")panel.text("A @ -2.5 cm", x=x_off, y=-2.5, adj=pos_adj,col=text_col)panel.text("Ks=10cm/hr", x=x_off, y=-5, adj=pos_adj,col=text_col)panel.abline(h=-7.5, col="grey")panel.text("B @ -7.5 cm", x=x_off, y=-7.5, adj=pos_adj,col=text_col)panel.text("Ks=5cm/hr", x=x_off, y=-12, adj=pos_adj,col=text_col)panel.abline(h=-17.5, col="grey")panel.text("C @ -17.5", x=x_off, y=-17.5, adj=pos_adj,col=text_col)panel.xyplot(...)},key=list(text=list(names(ksat)[2:4]),points=list(pch=plotchars, col=plotcolors),x=0.6,y=0.2,corner=c(0,0))))