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
0
votes
1 answer

How to force bookdown to render document with xelatex engine instead of pdflatex?

I use bookdown to render html books. How can render the same book using LaTeX enging xelatex instead of pdflatex? This is the main code I use: bookdown::render_book('index.Rmd', output_file='mybook.pdf','bookdown::pdf_book') It keeps on saying !…
rdatasculptor
  • 8,112
  • 14
  • 56
  • 81
0
votes
1 answer

Switching between output formats while generating downloadable RMarkdown reports from Shiny

I am trying to generate downloadable RMarkdown reports using Shiny. I have included radioButtons in the UI to allow the user to select the output format of the report (Word or PDF). The problem I am facing is that the format selection in the UI is…
swafa
  • 9
  • 2
0
votes
1 answer

bookdown encoding set to LATIN1 instead of UTF-8

Why when i build a book using build book button it sets my encoding to LATIN1 instead of UTF-8? Also, whenever i open a chapter (.Rmd file) i've got reopen it with UTF-8 encoding 'cause it changes back do LATIN1 even if i have just saved it in…
Alberson Miranda
  • 1,248
  • 7
  • 25
0
votes
1 answer

Bookdown : Automatic figure numbering and cross-referencing doesn't work

I am trying to write my master's thesis in RMarkdown. I first tried to fix an issue with the position of my figures in the pdf document, and used this method : https://stackoverflow.com/a/33801326. So my YAML header looked like this : title:…
0
votes
1 answer

Rmarkdown Links - How to get the name of the current file without extension?

I am creating a bookdown document in which I provide a link for people to download the PDF, DOCX and TEX outputs of the current section they are looking at. All output documents are in a folder named "Compilation" and have the same name of the…
abelb
  • 13
  • 2
0
votes
1 answer

Cross-referencing within documents with R Markdown

I have a very simple document in R Markdown. Here is the code: --- title: "Untitled" output: html_document --- # R Markdown {#r-mkdw} This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word…
0
votes
0 answers

APPENDIX numbering in pdf and html is different in bookdown

I am writing a book in bookdown. In my appendix rmarkdown file, I wrote the following - \backmatter # (APPENDIX) Appendix {-} # Appendix A ## Basic Data Structure in `R` # Appendix B ## Text Mining in `R` ## Social Media Analytics in `R` ##…
Sharif
  • 163
  • 1
  • 9
0
votes
1 answer

How to combine endfloat, markdown formatting and wordwrap in bookdown::pdf_document2 table

I am writing a Rmarkdown document using bookdown::pdf_document2 for which I have a table that needs to do several very specific things, but I simply cannot find the solution to get all of them to work at the same time: The table needs to float to…
user3004015
  • 617
  • 1
  • 7
  • 14
0
votes
0 answers

How do I get Bookdown to properly knit a PDF with multiple code chunks?

I am transitioning to Bookdown from Markdown. Although it seems as though this should be straightforward I am getting an unexpected knit failure once I have added the 3rd (usually) code chunk in a chapter (not index.rmd) file. I have tried using…
Ron Sokoloff
  • 130
  • 1
  • 11
0
votes
1 answer

How to build a latex kable through bookdown::render_book?

Here is a file kable.Rmd that knits properly in RStudio: --- title: "latex kable" output: pdf_document --- ```{r table1, echo=FALSE} library(magrittr) library(kableExtra) kable(data.frame(a=c(1,2,3), b=c(4,5,6))) %>% kable_styling(latex_options =…
dfrankow
  • 20,191
  • 41
  • 152
  • 214
0
votes
1 answer

How to build a bookdown book that is not in the top-level directory in RStudio?

The bookdown docs say after setting up _bookdown.yml appropriately, Then you can click the Build Book button in the Build pane in RStudio to compile the Rmd files into a book I see no "Build Book" button in my RStudio, even after restart. >…
dfrankow
  • 20,191
  • 41
  • 152
  • 214
0
votes
1 answer

Is there a package or other convenient means of keeping a research diary for a RStudio project?

I'm embarking on an ambitious RStudio project, one that's similar to Jack Dougherty's On the Line collaborative book-in-progress about Hartford. I'm finding I need to keep several different kinds of notes: on the research itself, on my R coding, on…
Gnosos
  • 47
  • 6
0
votes
0 answers

Bookdown in-chapter formatting: different pages per paragraph

We - bookdown noobs - are making a bookdown with a lot of text per paragraph (using the minimal bookdown as a template, we only added new Rmd files from here). At the moment, one has to scroll a long time before reaching the end of a chapter,…
0
votes
0 answers

How to center align a table in Bookdown using the R kableExtra package?

I am using RStudio with a Bookdown template and am trying to place my table in the middle of the page. I am using the position command as per the example code developer's page to center-align the table. Upon knitting to HTML, the table remains…
Martin
  • 401
  • 6
  • 15
0
votes
0 answers

I have tags such as this interspersed in one of my bookdown chapters: When I run a regular RMarkdown html report the auto players are inserted at the right spots. When I run bookdown all of…
Frank Harrell
  • 1,954
  • 2
  • 18
  • 36