I'm trying to create a new RMarkdown report that conforms to my organization's brand standards. As such, I've had to try and learn how to change the font within RMarkdown. I've had luck with the body text using the LaTex package fontspec. However, the Title, Author, & Date aren't changing.
Does anyone have a solution for this? Or at least an idea?
This is an R Markdown document. Markdown is a simple formatting >syntax for authoring HTML, PDF, and MS Word documents. For >more details on using R Markdown see http://rmarkdown.rstudio.com.
<
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
summary(cars)
Including Plots
You can also embed plots, for example:
plot(pressure)
Note that the echo = FALSE parameter was added to the code >chunk to prevent printing of the R code that generated the plot.
From looking at the default Rmd latex template (got there by way of LaTeX options from the R Markdown docs, it looks like title, author, etc. are explicitly defined separately (sorry, I'm sure my terminology is wrong— I'm not much of a latex whiz), so is it possible you'd have to override their fonts separately as well?
@mara, Do you know if there is a way to see the LaTex code behind the RMarkdown document that I'm currently working with. I accidentally broke my document when I was trying to get the header to include my logo and now I can either choose to use a logo or the right font because of a missing $
Using the settings button next to the Knit button (), go to "Output Options...". Under the "Advanced" tab, check "Keep text source file used to produce PDF". Then, next time you knit the document, it will leave a .tex file (starting with the same name as your .Rmd file). That should have the raw LaTex.
I figured it out! I had an _ in my logo filename and xelatex was reading it in as a mathematical symbol. After changing the filename to not use an _ it worked perfectly!