[R] Latex (computer modern) fonts, pdfcairo etc. {was ... GNUplot}

Martin Maechler maechler at stat.math.ethz.ch
Mon Mar 3 16:32:17 CET 2008


>>>>> "BDR" == Prof Brian Ripley <ripley at stats.ox.ac.uk>
>>>>>     on Mon, 3 Mar 2008 14:16:15 +0000 (GMT) writes:

[............]

    BDR> In a later message Louise mentioned the desire to use TeX fonts for 
    BDR> annotation, to match a LaTeX document.  Paul Murrell has pointed out his 
    BDR> and my article in R-News 2006-2 about how to do this.

    BDR> Louise almost mentioned the 'the gnuplot cvs which have pdfcairo support'. 
    BDR> Well, R too has development versions, and I was able to do

    >> par(family="cmr10")
    >> plot(1:10)

    BDR> in R-devel and get annotations in Computer Modern on screen, or

    >> cairo_pdf()
    >> par(family="cmr10")
    >> plot(1:10)

    BDR> and get this on a PDF file.

    BDR> To do so you would need /usr/share/fonts/mathml/cmr10.ttf installed, at 
    BDR> least on F8 (part of the mathml-fonts RPM).

Aha, thank you!

I found that in Ubuntu / Debian the package you need is called
  latex-xft-fonts
{i.e. in a shell you install via
      sudo apt-get install latex-xft-fonts 
}

Martin



More information about the R-help mailing list