On 15/02/2011 4:55 PM, Julia Jacobson wrote:

> Hello R users,

>

> Using R, Sweave and the cmsyase.afm font it is possible to write LaTeX

> documents including R figures with text in the Computer Modern Fonts:

This is very unlikely to have anything to do with Sweave, it's a

graphics system problem. You might want to read the article

Paul Murrell and Brian Ripley (2006) Non-standard fonts in PostScript

and PDF graphics. R News, 6(2):41–47.

http://cran.r-project.org/doc/Rnews/Rnews_2006-2.pdffor information. It looks as though you did everything it recommends,

except embedding the fonts: maybe you need to do that.

Duncan Murdoch

>

> \documentclass{article}

> \usepackage{Sweave}

> \begin{document}

> <<echo = false, results = hide>>=

> CM<- Type1Font("CM",

> c(file.path("C:/texlive/2009/texmf-dist/fonts/afm/public/cm-lgc",

> c("fcmr8a.afm", "fcmb8a.afm", "fcmri8a.afm", "fcmbi8a.afm")),

> "./cmsyase.afm"))

> pdfFonts(CM = CM)

> postscriptFonts(CM = CM)

> pdf.options(family = "CM", pointsize = 11)

> ps.options(family = "CM", pointsize = 11)

> @

> <<fig = true, echo = false, include = true>>=

> x<- c(1,2,3)

> y<- c(1,2,1)

> plot(y~x, xlab = "1 - 3 units") # The "-" sign here is

> @ # missing in the PDF file!

> \end{document}

>

> First of all, Sweave doesn't seem to hand on the width of the "-" sign

> on to LaTex, like the warning is indicating.

> Moreover, the font of the text in the graphics looks different from the

> Computer Modern fonts LaTeX is using.

>

> Thanks in advance for your answers,

> Julia

>

> ______________________________________________

>

[hidden email] mailing list

>

https://stat.ethz.ch/mailman/listinfo/r-help> PLEASE do read the posting guide

http://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.

______________________________________________

[hidden email] mailing list

https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide

http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.