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

How to change chapter/section/page numbering schema for just Appendix in r-markdown without breaking cross references?

I'm writing a thesis paper using r-markdown (specifically, bookdown). The main-matter of the paper is all numbered using arabic numerals, including pages, chapters, sections, and subsections. However, I need to have the appendix numbered using alpha…
Vash
  • 103
  • 1
  • 9
4
votes
1 answer

How to add list of figures and list of tables to the table of content with R markdown and bookdown

I have a report (pdf output) where I want to add bibliography, list of figures and list of tables to the appendix. And I want those three elements to appear in the table of content. I add the bibliography by adding bibliography: bibliography.bib to…
symbolrush
  • 7,123
  • 1
  • 39
  • 67
4
votes
1 answer

Bookdown: Exporting to a word document (Error in files2[[format]] : attempt to select less than one element in get1index)

I am writing my thesis using the bookdown package and the memoir latex class. Everything works relatively fine when I am exporting to pdf or to html but I am unable to export the thesis to a word document... I get the following mysterious…
Ladislas Nalborczyk
  • 725
  • 2
  • 5
  • 20
4
votes
0 answers

How do I cross-reference objects by page number in R Markdown to Microsoft Word?

I am wondering how to cross-reference by page number, similar to the way that you can cross-reference section numbers (https://bookdown.org/yihui/bookdown/cross-references.html) when generating Word documents from .Rmd files. I am looking for…
4
votes
1 answer

Changing Word document style in RMarkdown

I am attempting to manually change the style within an R-markdown document. In the example below I have created a reference_docx with the style named Highlight --- title: "My Title" output: bookdown::word_document2: fig_caption: yes …
Patrick
  • 915
  • 2
  • 9
  • 26
4
votes
0 answers

What is the citation ID for using EndNote (.enl) libraries to cite in R Markdown?

This question has been asked several times in several different ways... See: R markdown citation identifiers How to cite references in R Markdown from Endnote library (.enl)? ...but has yet to be answered satisfactorily. So my question is: how do…
Matt
  • 81
  • 2
  • 4
4
votes
2 answers

How to get a newline in a figure caption in Rmarkdown bookdown pdf:document2

I'm using knitr in RStudio to write an rmarkdown bookdown:pdf:document2 document. I have two plots, plotted side-by-side with gridExtra, and labelled A and B. I want to put a newline in the output of the figure caption, as defined with fig.cap,…
S J Cowtan
  • 322
  • 3
  • 11
4
votes
1 answer

Disable title / author in the HTML output of bookdown

In Bookdown, if you provide the title and the author of your book in index.Rmd like so: --- title: "My New Book" author: "John Doe" (...) --- It uses this information to generate a nice (and common) first page in the PDF output, with the title…
Attila Tanyi
  • 4,904
  • 5
  • 27
  • 34
4
votes
1 answer

Adding table of content with bookdown::html_document2 in Rstudio

I'm building a bookdown::html_document2 with Rstudio and I can't seem to manage to add a table of content using Rstudio. I've found this question (Bookdown: TOC with html_document2) that is related however I knit my document using the Knit button…
Bastien
  • 3,007
  • 20
  • 38
4
votes
1 answer

Bookdown caption in knitr include_graphics

I am writing a report with Bookdown and I am interested in reproducing a series of pictures horizontally with one single caption which describes them all. If I dont define the fig.cap I get the pictures correct as follows: ```{r, out.width =…
BAlpine
  • 111
  • 3
  • 14
4
votes
1 answer

knitr/rmarkdown/Latex: How to cross-reference figures and tables in 2 different pdf files?

I'm trying to write a scientific article and the associated supplementary materials entirely in RStudio with rmarkdown. It seems clear that book down is the way to go to cross-reference between files (https://stackoverflow.com/a/38884378/576684),…
julou
  • 602
  • 4
  • 12
4
votes
1 answer

creating accompanying slides for bookdown project

In Rstudio, I create a new project and select book project using bookdown. The built in example runs perfectly as expected and i can compile 4 books - gitbook, html, epub, and pdf. Great. The next obvious step is to want to have slides at the same…
tchevrier
  • 1,041
  • 7
  • 16
4
votes
1 answer

Chapter(s) before table of contents in Bookdown PDF output

I'd like for a chapter to appear before the table of contents (but after the title page) in the pdf_book output of Bookdown. One way to do this is to add the chapter to a .tex file and and link it using before_body:. However, this means the chapter…
pyg
  • 716
  • 6
  • 18
4
votes
1 answer

How to control the start page of a bookdown book

My ebook has sections and chapters within them. Section 1 has an overview page and then chapter 1 follows. When I download my book from Amazon, it starts at the beginning of chapter 1 so the user misses the preface and the section text. In Section…
sliptonic
  • 460
  • 3
  • 11
4
votes
1 answer

Can't get bookdown rmd_subdir ["dir"] to work

I tried to use the new rmd_subdir option in the _bookdown.yml by setting a list of subdirectories. I copied all files except the index.Rmd of a freshly created bookdown project in a folder called content. The following setting in the _bookdown.yml…
Floris Padt
  • 796
  • 5
  • 10