bookdown

Error: Input files not all in same directory, please supply explicit wd

泪湿孤枕 提交于 2020-07-03 13:27:15
问题 After trying to build a PDF that worked ~2 weeks ago, no fuss, on a new machine with a fresh install of R, R studio, bookdown , etc, I have this error: Error: Input files not all in same directory, please supply explicit wd I have chapters of .Rmd files sorted into directories, and so if I change rmd_subdir from true to false , the error goes away, but... I just can't work with 100+ chapters containing 4-7 each scenes in the root of the project; I'll go insane. I have new_session: no in my

Error: Input files not all in same directory, please supply explicit wd

狂风中的少年 提交于 2020-07-03 13:27:07
问题 After trying to build a PDF that worked ~2 weeks ago, no fuss, on a new machine with a fresh install of R, R studio, bookdown , etc, I have this error: Error: Input files not all in same directory, please supply explicit wd I have chapters of .Rmd files sorted into directories, and so if I change rmd_subdir from true to false , the error goes away, but... I just can't work with 100+ chapters containing 4-7 each scenes in the root of the project; I'll go insane. I have new_session: no in my

R Markdown pdf_document2 PDF figure and table numbers by section

|▌冷眼眸甩不掉的悲伤 提交于 2020-06-17 14:09:55
问题 I want to generate a pdf_document2 PDF document in R Markdown where the tables and figures are labeled according to their section number. For instance, the first figure in Section 2 would be Figure 2.1. I can do that with html_document2 but not with pdf_document2 . See below for the code that I have written. Right now the code generates continuous Figure numbers (Figures 1, 2, 3, 4) instead of Figures 1.1, 1.2, 2.1, 2.2. title: "Testing Section Numbers" author: "Authors" date: "January 2019"

Increase line/row spacing with kableExtra

≡放荡痞女 提交于 2020-06-12 04:35:22
问题 Is there a way to increase the line spacing with kableExtra for a pdf output in r-markdown or bookdown? library(knitr) library(kableExtra) kable( head(iris, 5), caption = 'Iris Table', booktabs = TRUE) %>% kable_styling(latex_options = "striped") 回答1: You can just do it using the LaTeX command \arraystretch : --- output: pdf_document --- ```{r setup, include=FALSE} library(kableExtra) library(tidyverse) ``` \renewcommand{\arraystretch}{2} ```{r, echo=FALSE} library(knitr) library(kableExtra)

bookdown with specific latex template

淺唱寂寞╮ 提交于 2020-05-10 04:39:44
问题 I very much believe that Rmarkdown and bookdown are the future of content publishing, however some publishers use specific LaTeX templates, and in order to submit the manuscript they need it in that precise template. For example, see this Springer manuscript template: http://resource-cms.springer.com/springer-cms/rest/v1/content/20566/data/v3/monographs Is it possible to make bookdown use this template in order to produce a PDF file? EDIT : in this book (https://bookdown.org/yihui/bookdown/)