Questions tagged [bookdown]

bookdown is an R package for authors to write books and long-form articles using R Markdown

The bookdown package is an R package for authors to write books and long-form articles using R Markdown. For more information, see https://bookdown.org.

1019 questions
4
votes
1 answer

Using {.tabset} with bookdown::bs4_book()

I'm creating a {bookdown} project using the new bookdown::bs4_book() output. However, when I try to add tabs to a chapter using {.tabset} as described here, the tabs are not generated. Instead, the document is rendered in the normal linear…
Jake Thompson
  • 2,591
  • 1
  • 16
  • 32
4
votes
0 answers

Producing html and pdf from a bookdown

I currently have a few bookdown projects which are hosted as Github.io projects. Across these projects I use custom defined css styling for chunks, which allow for code folding boxes and coloured notes. I'd like to be able to render these projects…
Oska Fentem
  • 135
  • 6
4
votes
1 answer

In Rmarkdown, is there a way to create a .bib file for only those keys cited in a document?

I have written a manuscript using bookdown in Rstudio for a specific project that cites references from a bibtex file. This is a single .bib file that I use for many documents, so it is outside my project folder and contains many references that…
tellis
  • 152
  • 6
4
votes
1 answer

Bookdown PDF Book Font Change

I'm using Bookdown to generate an ePub and a PDF of a book I'm writing. The book is generating fine, but I am trying to make a change to the font for the PDF from a serif font to a sans serif font. I tried what was listed in this StackOverflow post…
pjlamb12
  • 2,300
  • 2
  • 32
  • 64
4
votes
1 answer

How to keep some space between tables in a row in knitr::kable?

I use the following code from bookdown package tutorial in R markdown file: ```{r} d1 <- head(cars, 3) d2 <- head(mtcars[, 1:3], 5) knitr::kable( list(d1, d2), caption = 'Two tables placed side by side.', booktabs = TRUE, valign =…
garej
  • 508
  • 1
  • 8
  • 24
4
votes
1 answer

How to add quotation marks in caption (bookdown)

I am having an issue with quotation marks inside captions using bookdown. The following rmarkdown doc illustrates the issue. --- title: "testdoc" author: "Dayne Filer" date: "10/21/2020" output: pdf_document: default html_document:…
dayne
  • 7,504
  • 6
  • 38
  • 56
4
votes
1 answer

Unable to resize an image in Bookdown

We have an image in hdf5 file, which we want to extract and drop it into the BookDown pdf here is the code which is doing that insertImage <- function(hdfFilepath, datasetPath) { library(rhdf5) library(magick) hdfimagedata <-…
SID
  • 99
  • 9
4
votes
1 answer

Automatically collapsing sidebar of R Bookdown website

It is critical that people reading my Bookdown project do not skip chapters. While it is explicitly stated in the document, further discouraging this by automatically collapsing the sidebar would be really helpful :o) According to this Github issue…
snug.gy
  • 113
  • 3
4
votes
1 answer

Markdown HTML w/ bookdown: Changing Figure Numbering

I'm using bookdown to make a simple (one document) Rmarkdown document, knitting to HTML. I understand how to make figures with captions and reference those figures, but I would like to change the numbering on my figures. A simple example of what I'm…
Emma Talis
  • 43
  • 3
4
votes
1 answer

bookdown figure number formattiing: both sequential numbering and section numbering

When using bookdown (single document), if I set both section_numbering = 'yes' and fig_caption = 'yes', the figures are numbered X.2 (where X is the section number). If section_number = 'no', the figures are numbered sequentially (Fig 1, 2 ...), but…
4
votes
1 answer

How to use bookdown.org with github?

I am trying to create a book on Github and honestly I don't have the time to learn how to code and dig into all the new terminology/technology and learn the in and outs of Github as it's really not user-friendly. All the tutorials are too dense and…
4
votes
1 answer

How can I get webshot to work with bookdown?

I am using bookdown to create a "book", in both PDF and HTML. In places where I have a video for the HTML, I get this message when I render: Error: Functions that produce HTML output found in document targeting latex output. Please change the…
Pete
  • 199
  • 6
4
votes
1 answer

List of figures in bookdown to html_document2

Is there any possibility to include a list of figures in my Rmd-Document? Right now my yaml-header looks like this, but I have no clue of how to include a list of figures. The \figureslift doesn't seem to work. --- title: "" author: "" output: …
Lenn
  • 1,283
  • 7
  • 20
4
votes
1 answer

Why inclusion of external Rmd-file with latex equation environment leads to different DOCX output while using rmarkdown and bookdown?

Below is the simplest Rmd file which I'm knitting to MS Word document using latest RStudio: --- output: word_document: default bookdown::word_document2: default --- ```{sh, echo=FALSE, comment=''} cat ~/latex-test.Rmd ``` The contents of…
N0rbert
  • 559
  • 5
  • 22
4
votes
1 answer

Author affiliations in Rmarkdown YAML header, using rticles

I would like to add author affiliations to my YAML header, and as recommended here (Authors and affiliations in the YAML of RMarkdown), using the rticles::elsevier_article output format does it very nicely, and also omits the page number on the…