xaringan

Mermaid diagrams not rendering correctly in Rmarkdown xaringan presentations

落花浮王杯 提交于 2020-02-25 05:00:07
问题 I am attempting to make some simple flowcharts in an Rmarkdown html presentation I am rendering with xaringan. I'm drawing mermaid diagrams using the DiagrammeR package. However, although the charts display correctly in the Rstudio viewer the styling does not appear in the presentation output. For instance DiagrammeR::mermaid(" graph LR; A((Orange)) --> B((Grey)); classDef orange fill:#f96; classDef grey fill:#d3d3d3; class A orange; class B grey; ") generates one orange node and one grey

xaringan slide separator not separating slides

冷暖自知 提交于 2019-12-23 07:46:22
问题 In this example xaringan presentation, why are both the ## blank page and the leaflet map on the same slide, given I've separated them by the new-slide separator --- ? --- title: "map test" output: xaringan::moon_reader: css: ["default"] nature: highlightLines: true --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## blank page content --- leaflet page ```{r} library(leaflet) leaflet() %>% addTiles() ``` --- 回答1: Looks like you've got an unintended space after the new

Can I set the CSS/JS paths parametrically in Xaringan YAML?

淺唱寂寞╮ 提交于 2019-12-22 10:09:17
问题 This is similar to Xaringan issue #29. I'm setting up a Xaringan template to be used at work, and I want to keep all the CSS and Javascript files in the same location. I don't want anyone to have to copy the same files into each presentation directory. However , I also don't want to refer to a common root directory. I could (I think) point to our in-house Bitbucket server, but I would much rather analysts and data scientists be able to get the files from their local repo (for speed, and also

Xaringan: How do you change code chunk background color?

喜夏-厌秋 提交于 2019-12-13 02:33:29
问题 Is it possible to change the background color--and other attributes--of code chunks? Is there a class associated with code chunks? Modifying the background color for inline code is simple: .remark-inline-code{ background-color: #000000 } But I am unable to find an equivalent specifically for code chunks. 回答1: Inspecting the div using Chrome developer tools, you see that the color is set by class .hljs-github .hljs . Setting .hljs-github .hljs { background: red; } should do what you want :) 来源

Bullet color in Xaringan presentation

自古美人都是妖i 提交于 2019-12-11 23:41:54
问题 Is it possible to change the bullet colors in Xaringan presentation? The text should have a different color. I have not find any option in xaringanthemer package neither going through the css file. I could not find any information remark.js documentation. 回答1: You can change the bullet point colour by adding a custom CSS to the YAML header of your Xaringan presentation. Following is a fully reproducible minimal example. Markdown file title: "Example" author: "Author" date: "`r Sys.Date()`"

Table of contents on xaringan slides?

老子叫甜甜 提交于 2019-12-07 11:58:30
问题 I'm wondering whether it is possible to add a slide showing the table of contents into the document created with xaringan package? Thanks. 回答1: Update Following lines will give you an automated Outline. Unfortunately I do not know how to automatically reload an R script file in RStudio. If someone knows anything, please feel free to comment or answer in following Question. The code searches for all the level 1 headers and the Outline header. Then it simply adds the headers as a list and

Incremental slides do not work with a two-column layout

佐手、 提交于 2019-12-07 03:35:54
问题 I am using the xaringan package for r for a presentation: https://cran.r-project.org/web/packages/xaringan/index.html which builds upon the remark.js library. I would like to use a two column layout, i.e. something like this from the original remark.js teaser presentation: https://remarkjs.com/ where the original css rules (which are embedded in the source of the presentation) specifies the layout via: /* Two-column layout */ .left-column { color: #777; width: 20%; height: 92%; float: left; }

Automatically reloading shiny app when add changes

拟墨画扇 提交于 2019-12-05 22:55:50
问题 I would like to have an option (when working locally) which allows me to see changes in my shiny app automatically after I put some changes in server.R or ui.R file. It is really annoying to manually rerun runApp function every time I add a new thing. The optimal solution which I really like is xaringan::inifinite_moon_reader function which is extremely helpful. Is there any solution which do this stuff? You can find analogical solution here. On the right, the code was modified and saved, on

Can I set the CSS/JS paths parametrically in Xaringan YAML?

南笙酒味 提交于 2019-12-05 21:41:17
This is similar to Xaringan issue #29 . I'm setting up a Xaringan template to be used at work, and I want to keep all the CSS and Javascript files in the same location. I don't want anyone to have to copy the same files into each presentation directory. However , I also don't want to refer to a common root directory. I could (I think) point to our in-house Bitbucket server, but I would much rather analysts and data scientists be able to get the files from their local repo (for speed, and also in case they're not on the network or are making their own changes). I'm also not particularly hung up