jimhester / knitrBootstrap

A framework to create bootstrap styled HTML reports from knitr Rmarkdown.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setting up title for the whole document in RStudio

Black-Milk opened this issue · comments

I'm able to use bootstrap knitr in Rstudio after editing my .Rprofile file properly, however I can't seem to be able to set up the document title. How do I do that? I'm able to place headers and everything else just fine. In the .Rprofile, I have have:

options(rstudio.markdownToHTML =
function(inputFile, outputFile) {
library(knitrBootstrap)
knit_bootstrap_md(input=inputFile, output=outputFile, chooser=c("boot", "code"), show_code=FALSE, show_output=FALSE)
}
)

Here's what I have for the Rmarkdown file:


---
output:
  knitrBootstrap::bootstrap_document:
    title: "Test file"
    theme: amelia
    highlight: sunburst
    theme.chooser: TRUE
    highlight.chooser: TRUE

---
A level-one header
=====

$$y=1$$

This is an R Markdown document. Markdown is a simple formatting syntax for authoring web pages     (click the **Help** toolbar button for more details on using R Markdown).

When you click the **Knit HTML** button a web page 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:

```{r, bootstrap.panel = FALSE }
library(knitr)
render_html()
summary(cars)
```

You can also embed plots, for example:

```{r fig.width=7, fig.height=6}
plot(cars)
```   

Never mind the YAML front-end didn't work with the version of knitrbootstrap I had. Though, now that I've updated everything, mathjax doesn't work!