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

Input .tex in Rmarkdown

I'm using Rmarkdown/Bookdown to write a paper/PDF document, which is an amazing tool @Yihui, thanks! Now I'm trying to include a table I have already put in LaTeX into the document by reading in this external .tex file. However, when knitting in…
cdermont
  • 138
  • 1
  • 8
6
votes
2 answers

Create index of definitions / theorems at end of bookdown book

For reader convenience, I'd like to include, at the end of my bookdown book, written in markdown, a simple list or index of definitions from the body of the book. i.e. ones created using custom blocks, like this: ```{definition, bar, echo=T} A bar…
Steve Powell
  • 1,646
  • 16
  • 26
6
votes
1 answer

Rendering Appendix Figure Numbers in Bookdown

Bookdown is a great package and I look forward to seeing how it developes, but right now I am having troubling rendering figure numbers in the pdf_document2 format when figures are in appendices. Specifically when a figure with a caption is in an…
6
votes
0 answers

R bookdown gitbook - how to override table style

I like the gitbook style in general, but some tables (particularly regression tables) look awful on it. How do I make specific tables in my document (not all of them) render as per the default bootstrap style? I suspect this can be done by defining…
jiewpeng
  • 333
  • 2
  • 8
5
votes
0 answers

Bookdown: how to make citations in footnotes appear in the chapter references?

I was asked to clarify the question, hopefully this is clearer. When building a book using bookdown, citations in footnotes do not appear in the references section for a specific chapter, but do appear in the global references at the end of the…
Jim Shen
  • 51
  • 2
5
votes
1 answer

How to add subfigure in R markdown (bookdown)

I'm trying to add a figure with sub captions in a R bookdown project as follows --- output: pdf_document: extra_dependencies: "subfig" --- ```{r echo=F, out.width =…
User 2014
  • 183
  • 6
5
votes
4 answers

Add an image to Rmarkdown Bookdown output before top level heading

The example below (i.e. saved as a file index.rmd ) has the same code chunk to display an image above and below the top level heading, but the image doesn't appear above the top level heading. This occurs if there is a file _output.yml with only…
Mark Neal
  • 996
  • 16
  • 52
5
votes
1 answer

r - use kable to group columns with sub columns having the same name

I am trying to use kable and kableextra to create a table that has different grouped headers but the same column names in the sub-headers For example, if you look at the section "Grouped Columns/Headers" (page 14) of Create Awesome LaTeX Table with…
alexb523
  • 718
  • 2
  • 9
  • 26
5
votes
1 answer

Remove table of contents from a R bookdown to pdf_book or pdf_document2

I compiling a short document using bookdown in Rstudio. I would simply like to drop the table of contents at the beginning of the document. I could "knit to pdf" instead of "knit to pdf_book" or "knit to pdf_document2", but then would loose a lot…
MsGISRocker
  • 588
  • 4
  • 21
5
votes
0 answers

Table caption for data frame paged printing in bookdown::html_document2

I am using the bookdown::html_document2 output format to render a single document for automatic numbering of figures/tables/equations, and cross-referencing figures/tables/equations/sections. Is there a way to get table caption for data frames that…
TinyHeero
  • 580
  • 1
  • 4
  • 18
5
votes
1 answer

RMarkdown numbering multiple figures/tables in one chunk

My RMarkdown document has code chunks that generate multiple figures or tables from within one chunk. For instance, it loops through a bunch of variables to generate summary statistics tables for each variable. The problem is that the numbering of…
yaleeconjournal
  • 319
  • 1
  • 10
5
votes
1 answer

create single, standalone html bookdown file w/gitbook format & style

How do I create a single, standalone bookdown html file that retains the gitbook format/style? Using the bookdown demo, my goal is to create a single .html file that I can share or publish to my website. I want to retain the gitbook style (table of…
rhaefer
  • 473
  • 2
  • 4
  • 8
5
votes
2 answers

Issue inserting image in header

I'm writing a report using multiple R Markdown files, and to facilitate combining them I decided to use the bookdown package. I face a problem with inserting a logo as header using fancyhdr LaTeX package, that worked fine in a regular .Rmd…
tobin_lab
  • 185
  • 1
  • 14
5
votes
1 answer

HTML-formatted hyperlinks not preserved in bookdown PDF

I have several html-formatted URLs in my bookdown .Rmd files that disappear in the generated PDF. It appears that the link is being ignored and the PDF only displays the text that should connect the link. For example,
5
votes
1 answer

Caption numbering not in sequential order when citing the captions with captioner in Rmarkdown

I am using captioner (https://cran.r-project.org/web/packages/captioner/vignettes/using_captioner.html) to create table captions in Rmarkdown - the main reason is because I am using huxtable for conditional formatting and exporting to word. This is…
Ricecakes
  • 681
  • 1
  • 5
  • 13