r - Changing font in PDF produced by rmarkdown -


i producing reports using rmarkdown. when knitting pdf

--- title: "untitled" output: pdf_document --- 

i specify font used in creating pdf. official documentation (see section "latex options) says can this. enter image description here however, i've never used latex , fail understand how such selection can made in yaml options @ top of .rmd document used rmarkdown package.

question: how change font in pdf produced rmarkdown?

sessioninfo() r version 3.1.0 (2014-04-10) platform: x86_64-w64-mingw32/x64 (64-bit)

locale: [1] lc_collate=english_united states.1252  lc_ctype=english_united states.1252    [3] lc_monetary=english_united states.1252 lc_numeric=c                           [5] lc_time=english_united states.1252      attached base packages: [1] grid      stats     graphics  grdevices utils     datasets  methods   base       other attached packages: [1] ggplot2_1.0.0 rodbc_1.3-10  knitr_1.6     dplyr_0.2 

i've never used latex , don't want @ mom

the indentation in yaml options meaningful. instructions point out "note these options not appear underneath output section rather appear @ top level along title, author, etc.)". so,

--- output:   pdf_document:     latex_engine: xelatex     sansfont: calibri light --- 

will produce unused argument error, while

--- output:   pdf_document:     latex_engine: xelatex sansfont: calibri light --- 

will job. in addition, latex commands inserted after yaml seem override it:

--- output:   pdf_document:     latex_engine: xelatex     sansfont: calibri light --- \fontsize{12}{22} \fontseries{b} \selectfont 

produces pdf default font, not calibri, however, font option passed fine.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -