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

Bookdown figure caption fails if too long in landscape?

I have a plot which is large enough to require plotting landscape in what is otherwise a portrait document using (PDF) bookdown in RStudio. The figure has a lot going on, so the figure caption is quite long, and I cannot really reduce the text any…
tellis
  • 152
  • 6
5
votes
1 answer

Changing styles of TOC of Bookdown, Gitbook style

I like to tweak the styles (e.g. background-color, font) of the TOC of the Bookdown, Gitbook style HTML document. Is this possible? If so, can someone be kind enough to point me to where I can start to do this? Thank you.
5
votes
1 answer

Setting paper size for PDF output in bookdown with tufte-book

In _output.yml, the following actually sets the paper size correctly: bookdown::pdf_book: pandoc_args: [ "-V", "papersize=a4" ] But when I want to use tufte_book, the papersize argument has no effect, and the output in in letter…
5
votes
1 answer

How to align the second-level header as left in Bookdown when output PDF?

The default one is center, I want it is aligned as left. my template.tex in latex folder of my bookdown example is pasted, need I change somewhere to adjust the style of second level header? Any suggestion is appreciated. I searched header nothing…
Minyi Han
  • 807
  • 1
  • 8
  • 15
5
votes
0 answers

Error in rmarkdown::render_site(encoding = "UTF-8") : No site generator found.""

I try to get started with bookdown in RStudio. I downloaded bookdown-minimal-master. After loading index.Rmd I click the button Build Book. Then I get the error message Error in rmarkdown::render_site(encoding = "UTF-8") : No site generator…
Dick Brus
  • 51
  • 2
5
votes
1 answer

Bookdown - where to load packages

I've got a large bookdown project and I want to check that a single chapter works. I've written it so that all of the packages I need are loaded in Index.Rmd However, when i try to either render the book or preview a chapter, it fails as funtion…
r.bot
  • 5,309
  • 1
  • 34
  • 45
5
votes
1 answer

R bookdown, PDF, unnumbered preface and headers not working as expected following table of contents

Bookdown allows for a table of contents, list of figures, list of tables, and preface. When using the first three and generating a PDF, the heading correctly reflects "Contents", "List of Figures", or "List of Tables". However, with an unnumbered…
5
votes
1 answer

bookdown converting chapters to sections

I have a book that compiles fine to html but the pdf version has no chapters. For example, the command # Introduction {#intro-intro} is translated to \hypertarget{intro-intro}{% \section{Introduction}\label{intro-intro}} (No such issues with the…
topepo
  • 13,534
  • 3
  • 39
  • 52
5
votes
2 answers

How to track changes in word .docx files generated from within R

I am trying to write reproducible manuscripts in R using the marvelous 'bookdown2' package (as a part of the incredible rrtools package) that are sent to publishers for peer review in .docx format. After the peer review process, there are usually…
WojciechF
  • 370
  • 2
  • 14
5
votes
1 answer

Bookdown: TOC with html_document2

How can I create a single output document with bookdown, e.g. using its bookdown::html_document2 format, and still have a Table of Contents somewhere in the output document? For example, I check out the content from…
Ken Williams
  • 22,756
  • 10
  • 85
  • 147
5
votes
1 answer

Printing UTF-8 characters in R, Rmd, knitr, bookdown

UPDATE (April 2018): The problem still persists, under different settings and computers. I believe it is related to all UNICODE, UTF-8 characters.…
IVIM
  • 2,167
  • 1
  • 15
  • 41
5
votes
1 answer

Insert non-breaking space in [R]Markdown math expression for HTML output

I am writing scientific reports in bookdown and I would like to use non-breaking spaces as thousands separators follwoing the SI/ISO 31-0 standard. Actually, I would prefer the non-breaking thin space (U+202F/ ) but for simplicty let's…
mschilli
  • 1,884
  • 1
  • 26
  • 56
5
votes
1 answer

How to: A scenebreak in bookdown

I'm trying to write a novel using bookdown: HTML, EPUB, as well as PDF (pdfLaTeX). I'm using the indent mode, so paragraphs begin with an indent. I have the following custom LaTeX command, called \scenebreak, which: Leaves an empty line between…
Ram Iyer
  • 319
  • 1
  • 4
  • 14
5
votes
1 answer

knitr::include_graphics in bookdown, is not rendering the image

I am trying to include a .png file in a file that I am rendering using bookdown. knitr::include_graphics() should be the way to go. The code: ```{r fig1, fig.cap='My Caption', echo=FALSE, message=FALSE,…
kneijenhuijs
  • 1,189
  • 1
  • 12
  • 21
5
votes
1 answer

How can I remove blank pages from rbookdown pdfs?

I am using the default Bookdown example "A Minimal Book Example" which is available on GitHub: https://github.com/rstudio/bookdown-demo How do I edit the template so that the PDF output does not have blank pages before all the chapters? I don't…
itsMeInMiami
  • 2,324
  • 1
  • 13
  • 34