R Sweave Computer Modern font usage -


i've installed r packages extrafont , fontcm. tried plot data computer modern font in sweave:

<<test,fig=true,echo=false>>= plot(na, family="cm roman") @ 

but fails error:

> grdevices::pdf.options(usedingbats = false); utils::sweave('test.rnw', encoding='utf-8') writing file test.tex processing code chunks options ...  1 : echo keep.source term verbatim (test.rnw:76)  2 : keep.source term verbatim pdf  (label = test, test.rnw:80)  error:  chunk 2 (label = test)  error in axis(side = side, @ = at, labels = labels, ...) :    invalid font type in addition: warning messages: 1: in axis(side = side, @ = at, labels = labels, ...) :   font family 'cm roman' not found in postscript font database 2: in axis(side = side, @ = at, labels = labels, ...) :   font family 'cm roman' not found in postscript font database 3: in axis(side = side, @ = at, labels = labels, ...) :   font family 'cm roman' not found in postscript font database 4: in axis(side = side, @ = at, labels = labels, ...) :   font family 'cm roman' not found in postscript font database 5: in axis(side = side, @ = at, labels = labels, ...) :   font family 'cm roman' not found in postscript font database 6: in axis(side = side, @ = at, labels = labels, ...) :   font family 'cm roman' not found in postscript font database 7: in axis(side = side, @ = at, labels = labels, ...) :   font family 'cm roman' not found in postscript font database error in rle(filenames) : 'x' must atomic vector calls: <anonymous> -> <anonymous> -> rweavetrystop execution halted 

loadfonts(device="postscript") shows fonts already registered postscriptfonts()

how can use sweave?

are sure using right name? try , see if results informative:

> names(postscriptfonts() )  [1] "serif"                "sans"                 "mono"                 "avantgarde"            [5] "bookman"              "courier"              "helvetica"            "helvetica-narrow"      [9] "newcenturyschoolbook" "palatino"             "times"                "urwgothic"            [13] "urwbookman"           "nimbusmon"            "nimbussan"            "urwhelvetica"         [17] "nimbussancond"        "centurysch"           "urwpalladio"          "nimbusrom"            [21] "urwtimes"             "computermodern"       "computermodernitalic" "japan1"               [25] "japan1heimin"         "japan1gothicbbb"      "japan1ryumin"         "korea1"               [29] "korea1deb"            "cns1"                 "gb1"                  

on review see pdf.options involved , may need examine:

 > names( pdffonts() ) 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -