bookdown

How to change to another bibliography style in Bookdown

烈酒焚心 提交于 2019-12-07 08:32:53
问题 I want to another bibliography style instead of apalike in Bookdown, and when I changed to nature which is number style, and built the book, it prompted me, ����: Failed to build the bibliography via bibtex Please delete bookdown.Rmd after you finish debugging the error. ִֹͣ�� Exited with status 1. Is there a solution? There are some Chinese character in the title author and description, is this the reason? The YAML header --- title: "title" author: "aa" date: "`r Sys.Date()`" documentclass:

A workflow with bookdown to produce frequency, cross tables and model summary tables

半城伤御伤魂 提交于 2019-12-07 03:20:31
I am starting to write a book using bookdown and trying to find the best workflow. First of all I am trying to make frequency tables, crosstables and model summaries, using bookdown with pdf format mainly, but I am pretty sure my advisor will love I send word documents for revision, so also getting a word output would be awesome. Word output can be achieved producing first the .html file and then opening with Word. So .html and .pdf output at the same time are desiderables. Tables are the main problem because seems impossible to find a productive way to produce frequency, crosstable and

Citations in PDFs produced by Bookdown are incorrect

喜夏-厌秋 提交于 2019-12-06 11:48:39
问题 I am making a book with bookdown. The HTML version renders exactly as I would expect it to. For example, the 5. Read Chapter 7 of Myers [-@myers_2013_qualitativeresearchbusiness p. 73--91] — 60 minutes. Renders correctly as: Read Chapter 7 of Myers (2013, pp. 73–91) — 60 minutes. However, in the PDF version the citation is rendered as the bibtex key; i.e., 5. Read Chapter 7 of Myers (myers_2013_qualitativeresearchbusiness) — 60 minutes. My script does the follwing to make the pdf. Rscript -e

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

自作多情 提交于 2019-12-06 11:30:18
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, warning=FALSE} knitr::include_graphics("./Figures/My Figure.png") ``` In the .Rmd file, I can run my r block, and it renders the image below. So, the path should be correct. However, when I knit the chapter, or render the entire book, the figure is not rendered. Could it be that some of my other options are overriding the figure? Below are my YAML header of the index.Rmd file, and the code in

How can I insert an image from internet to the pdf file produced by R bookdown in a smart way?

左心房为你撑大大i 提交于 2019-12-06 07:34:05
问题 As far as I know, inserting an image from internet to LaTeX is not possible. You have to download the image first, and then include it locally. With R bookdown, I do it like this: download.file('https://bookdown.org/yihui/bookdown/images/cover.jpg','cover.jpg', mode = 'wb') knitr::include_graphics('cover.jpg') It works very well for both the gitbook and pdf outputs. But I do not think it is smart. It is necessary for pdf to download the file first, but unnecessary for gitbook output. The

R bookdown gitbook - how to override table style

佐手、 提交于 2019-12-06 07:33:50
问题 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 a custom css class and then modifying the function that creates the regression table to include that custom class, but I'd like to know if there's a more elegant or simpler way. If I use bookdown::gitbook to render my Rmd file, it looks like the

Cross-referencing in rticles

我只是一个虾纸丫 提交于 2019-12-06 05:14:07
The bookdown offers great cross-referencing options for equations, figures, tables and sections: https://bookdown.org/yihui/bookdown/cross-references.html However, they seems to not work when I set as an output 'rticles::elsevier_article'. What are the available options for cross-referencing in rticles? I haven't tried, but there is a possible solution here: https://bookdown.org/yihui/bookdown/a-single-document.html Particularly, specify in your YAML metadata: output: bookdown::pdf_book: base_format: rticles::elsevier_article Since I am new using R Markdown I have decided to post this answer

Change figure and table captions in blogdown

爱⌒轻易说出口 提交于 2019-12-06 01:29:29
I'm tinkering with blogdown and would like to create figures and table with non-English caption headers. The following chunk ```{r label1, echo=FALSE, fig.cap="Fancy caption", fig.fullwidth=TRUE} plot(1,1) ``` produces the plot and a caption that reads Figure 1: Fancy caption I'd like to be able to change the label such that, say, "Figure" becomes "Plot". I thought I could fix it in the same way as for bookdown : In the _bookdown.yml file I could have language: ui: chapter_name: "Chap " appendix_name: "App " label: fig: 'Plot ' tab: 'Fancy table ' but I'm not sure how to do something similar

Coverpage and copyright notice before title in R bookdown?

穿精又带淫゛_ 提交于 2019-12-05 18:11:45
Back in March, I asked a question and got an answer to including coverpage in a pdf document rendered by R bookdown: R bookdown - cover page and appendix I tried the solution and came up with the following results: using in index.rmd yaml: output: pdf_document: includes: before_body: frontpage.tex number_sections: yes toc: yes toc_depth: 3 site: bookdown::bookdown_site documentclass: book classoption: letterpaper The title still appeared before the coverpage AND the Chapter 'wording' in chapter titles (ie 'Chapter 1' before the actual words for chapter title) disappeared. And the section

How to change to another bibliography style in Bookdown

让人想犯罪 __ 提交于 2019-12-05 16:19:36
I want to another bibliography style instead of apalike in Bookdown, and when I changed to nature which is number style, and built the book, it prompted me, ����: Failed to build the bibliography via bibtex Please delete bookdown.Rmd after you finish debugging the error. ִֹͣ�� Exited with status 1. Is there a solution? There are some Chinese character in the title author and description, is this the reason? The YAML header --- title: "title" author: "aa" date: "`r Sys.Date()`" documentclass: ctexbook bibliography: [book.bib] biblio-style: nature link-citations: yes colorlinks: yes lot: no lof: