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

Text vanishes in Gitbook using Bookdown

Iw as working on a gitbook using bookdown in R several months ago. Today, I resumed my work again, but when I rendered the book the font of the output changed dramatically. It vanishes! I don't remember having changed anything on the TAML of the…
0
votes
0 answers

LaTeX book to bookdown

I am new to R Markdown and bookdown. What would be the easiest way to take a book written in LaTeX and make it in bookdown. Here is an example of book https://www.overleaf.com/read/hjpgqbncvrwz Thank you
Portland
  • 185
  • 7
0
votes
0 answers

Custom fonts in `rmarkdown`/`bookdown`: Retaining **bold**/*italic*, special font features (`--`) etc.?

After installing D-Din as *.otf from here (fc-list shows it and the exact naming is used below), I have added the following to my rmarkdown/bookdown header: output: bookdown::pdf_document2: ... latex_engine: lualatex ... mainfont:…
balin
  • 1,554
  • 1
  • 12
  • 26
0
votes
0 answers

still troubled by escaping HTML in bookdown and markdown

A more complete, and corrected version of a question from earlier. I am trying to do the following using rmarkdown and bookdown: process a saved image as a text-wrap-around in HTML. I have a CSS definition that works perfectly:
Chip Brock
  • 81
  • 2
0
votes
0 answers

rmarkdown kable - set up kable_styling to be used repetitively

I am wondering if there is a way to set up a kable_styling that I can use throughout my rmarkdown/bookdown kind like you would set up a ggplot theme. Here is a small example where you just set the table to striped: kable(mtcars[1:10, 1:5]) %>% …
alexb523
  • 718
  • 2
  • 9
  • 26
0
votes
1 answer

Bookdown/rmarkdown: "Could not find data file templates/--number-sections.latex Error: pandoc document conversion failed with error 97"

Following: render_book("index.Rmd") I was getting this other error associated with three part table: LaTeX Error: Environment ThreePartTable undefined I applied the solution suggested there(remotes::install_github('rstudio/rmarkdown')). Now I have…
Mariana
  • 21
  • 1
  • 7
0
votes
0 answers

enc2utf8 issue with render_book() from bookdown

I've been writing a book with bookdown for 9 months. Everything was doing just fine until yesterday, when I got the error message: output file: ML_factor.knit.md Error in enc2utf8(text) : argument is not a character vector I updated all versions…
shokru
  • 11
  • 1
0
votes
0 answers

How to output a pdf book from Rnotebook?

I'm not getting a pdf output from my rnotebook. My header in my "index.Rmd" is: --- title: "some title" author: "me" date: "`r Sys.Date()`" site: bookdown::bookdown_site documentclass: book bibliography: [book.bib, packages.bib] biblio-style:…
user2946746
  • 1,740
  • 3
  • 21
  • 36
0
votes
1 answer

Change Latex engine when using bookdown when knitting Markdown to PDF

I need to change the font of a PDF Markdown document. This question suggests that when changing the font in a PDF Markdown you need to change the Latex engine by updating the YAML to include: --- output: pdf_document: latex_engine:…
Bjørn Kallerud
  • 979
  • 8
  • 23
0
votes
1 answer

Bookdown does not render image in output pdf

I'm trying to include an image in the example index.rmd file that comes with the bookdown-package within RStudio. (New Project -> Book Project using bookdown) I then simply appended the following code within an R code-chunk. ```{r}…
Tyroshi
  • 1
  • 2
0
votes
0 answers

R bookdown latex failure on travis: \includegraphics with px size?

I have a problem with a bookdown job running on travis (runs fine on my machine). the html builds fine, the latex version fails. it complains about a "wrong measure". The offending code chunk is (apparently) this one, and the fact that I used option…
Florian Oswald
  • 5,054
  • 5
  • 30
  • 38
0
votes
1 answer

I want text between figures but it shows text above figures

I am creating a pdf with bookdown. My problem is that I have the text between figures but it shows the text above the figures and the figures below one by one. index.Rmd --- title: "A title" author: "George" date: "`r Sys.Date()`" output: …
George
  • 5,808
  • 15
  • 83
  • 160
0
votes
0 answers

Include before_body only to some chapters in bookdown

Is it possible to include a before_body only to some of the chapters in bookdown? I tried to write a yaml header for the chapters in which I want to insert the before_body block but nothing showed up --- bookdown::gitbook: includes: …
Ghassany
  • 45
  • 5
0
votes
1 answer

How can I redefine a standard bookdown "theorem environment" in LaTeX/PDF?

I am using bookdown, and would like the standard "example" and "definition" environments (for example) in the PDF version to be more clearly distinguished by, for example, adding some slight background shading. How do I do so? I cannot even find…
Pete
  • 199
  • 6
0
votes
1 answer

How to use gitbook plugin in gitbook style bookdown

There is a simple procedure to put buttons for copying code of gitbooks. What would be the way to do that in a bookdown? # install npm curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - sudo apt-get install -y nodejs # install gitbook…
Ferroao
  • 3,042
  • 28
  • 53