bookdown

ggiraph htmlwidgets with bookdown and new_session = yes

耗尽温柔 提交于 2021-01-28 09:17:25
问题 This seems related to to rstudio/bookdown#15 but I haven't been able to figure pin it down. The example is here but the offending code is p2 <- ggplot(mtcars, aes(x = disp, y = mpg)) + geom_point_interactive(aes(tooltip = car)) ggiraph(code = print(p2)) and my bookdown.yml has new_session: yes . Other htmlwidgets do work. ```r p2 <- ggplot(mtcars, aes(x = disp, y = mpg)) + geom_point_interactive(aes(tooltip = car)) ggiraph(code = print(p2)) ``` Session info: $ R R version 3.3.3 (2017-03-06) -

Add image before bookdown title

三世轮回 提交于 2021-01-28 05:26:09
问题 I'm trying to add an image before the title in gitbook style bookdown project. This is similar to this question from the RStudio Community page, but I would like the image to appear only before the title, not every top-level heading. I've created a reprex here: https://bd-reprex.netlify.app/ I've edited the _output.yml to include: bookdown::gitbook: ... includes: before_body: assets/logo.html However, as can be seen in the example above, the image now appears before every chapter, not just

How to add list of figures and list of tables to the table of content with R markdown and bookdown

别来无恙 提交于 2021-01-27 17:36:29
问题 I have a report (pdf output) where I want to add bibliography, list of figures and list of tables to the appendix. And I want those three elements to appear in the table of content. I add the bibliography by adding bibliography: bibliography.bib to my yaml header. The list of figures and the list of tables I add with LaTex directly. My appendix therefore looks like: # Literature {-} \listoffigures \listoftables This nearly works: bibliography, list of figures and list of tables are rendered

More flexible citation formats

巧了我就是萌 提交于 2021-01-27 05:44:17
问题 I love to use citations in my r bookdown projects. The format is not very flexible, I can use @citeID to get "Author(Year)" or [@citeID] to get "(Author Year)". Sometimes I only need "(Year)" or "Year" or I may only need "Author Year" with no parentheses at all. Finally I need to add a page reference to the citation like "Author (Year:Pages)" Can anybody give me a hint, where the relevant code sits in the source so that I can start adding some cite-formats as described above? 回答1: There are

How to change font and point size in bookdown pdf?

无人久伴 提交于 2021-01-22 03:34:10
问题 I am writing a document with a strict requirement to use arial 12 point. I have modified my output yml in bookdown like this: site: bookdown::bookdown_site fontsize: 12pt fontfamily: arial documentclass: book output: bookdown::pdf_book: includes: in_header: preamble.tex keep_tex: yes toc_depth: 3 toc_appendix: yes clean: [packages.bib, bookdown.bbl] but it has no effect on the output other than I was forced to install some extra font packages in MikTex package manager, but even after this was

How to change font and point size in bookdown pdf?

↘锁芯ラ 提交于 2021-01-22 03:21:27
问题 I am writing a document with a strict requirement to use arial 12 point. I have modified my output yml in bookdown like this: site: bookdown::bookdown_site fontsize: 12pt fontfamily: arial documentclass: book output: bookdown::pdf_book: includes: in_header: preamble.tex keep_tex: yes toc_depth: 3 toc_appendix: yes clean: [packages.bib, bookdown.bbl] but it has no effect on the output other than I was forced to install some extra font packages in MikTex package manager, but even after this was

How to change font and point size in bookdown pdf?

浪子不回头ぞ 提交于 2021-01-22 03:15:12
问题 I am writing a document with a strict requirement to use arial 12 point. I have modified my output yml in bookdown like this: site: bookdown::bookdown_site fontsize: 12pt fontfamily: arial documentclass: book output: bookdown::pdf_book: includes: in_header: preamble.tex keep_tex: yes toc_depth: 3 toc_appendix: yes clean: [packages.bib, bookdown.bbl] but it has no effect on the output other than I was forced to install some extra font packages in MikTex package manager, but even after this was

New Pandoc distrib = loose cross-references (RMarkdown - knitr - Bookdown - thesisdown - R)

不羁的心 提交于 2020-12-12 21:36:15
问题 I've loose some cross-references when exporting a bunch of .Rmd files to a single .doc file, using knitr and bookdown (+ yaml). The method is thesisdown::thesis_word:. The problem of loosing-references occurred immediately after I've installed a new version of Pandoc. Maybe I miss a step after Pandoc installation ? The lost references are currently the \@ref(title) ones, which previously return the number of the title indicated by : # My title {#title} and now return (??) . Only these anchors

New Pandoc distrib = loose cross-references (RMarkdown - knitr - Bookdown - thesisdown - R)

放肆的年华 提交于 2020-12-12 21:35:58
问题 I've loose some cross-references when exporting a bunch of .Rmd files to a single .doc file, using knitr and bookdown (+ yaml). The method is thesisdown::thesis_word:. The problem of loosing-references occurred immediately after I've installed a new version of Pandoc. Maybe I miss a step after Pandoc installation ? The lost references are currently the \@ref(title) ones, which previously return the number of the title indicated by : # My title {#title} and now return (??) . Only these anchors

New Pandoc distrib = loose cross-references (RMarkdown - knitr - Bookdown - thesisdown - R)

核能气质少年 提交于 2020-12-12 21:31:45
问题 I've loose some cross-references when exporting a bunch of .Rmd files to a single .doc file, using knitr and bookdown (+ yaml). The method is thesisdown::thesis_word:. The problem of loosing-references occurred immediately after I've installed a new version of Pandoc. Maybe I miss a step after Pandoc installation ? The lost references are currently the \@ref(title) ones, which previously return the number of the title indicated by : # My title {#title} and now return (??) . Only these anchors