Giter VIP home page Giter VIP logo

xaringanextra's Introduction

xaringanExtra

CRAN status xaringanExtra status badge R-CMD-check

xaringanExtra is a playground of enhancements and extensions for xaringan slides.

Each item can be enabled separately, or load everything at once with a single call.

```{r xaringanExtra, echo=FALSE}
xaringanExtra::use_xaringan_extra(c("tile_view", "animate_css", "tachyons"))
```

Installation

You can install the released version of xaringanExtra from CRAN:

install.packages("xaringanExtra")

You can install the latest development version from GitHub:

# install.packages("remotes")
remotes::install_github("gadenbuie/xaringanExtra")

or from gadenbuie.r-universe.dev:

options(repos = c(
  gadenbuie = 'https://gadenbuie.r-universe.dev',
  CRAN = 'https://cloud.r-project.org'
))

install.packages('xaringanExtra')

🗺 Tile View

Tile view gives you a way to quickly jump between slides. Just press O (the letter O for Overview) at any point in your slideshow and the tile view appears. Click on a slide to jump to the slide, or press O to exit tile view.

To add tile view to your xaringan presentation, add the following code chunk to your slides’ R Markdown file.

```{r xaringan-tile-view, echo=FALSE}
xaringanExtra::use_tile_view()
```

Tile view is heavily inspired by (and is essentially a port to Vanilla JavaScript of) a jQuery remarkjs hook by the same name by Stephen Hesperus.

📝 Editable

Editable gives you a way to write directly inside your slides, updating your content live. Make any element of your slides editable by using the .can-edit[...] class.

Make your slides editable with the following code chunk.

```{r xaringan-editable, echo=FALSE}
xaringanExtra::use_editable(expires = 1)
```

Then, to make a component of your slides editable, use the .can-edit[] class.

## .can-edit[You can edit this slide title]

Editable fields that only have the .can-edit class are reset whenever the slides are re-loaded in your browser. If you want to store the edited values and have them persist across browser sessions, give each editable field a .key-<NAME> class. Be sure to make each key unique and note that the key name must be a valid CSS class, i.e. it cannot contain spaces.

## .can-edit.key-firstSlideTitle[Change this title and then reload the page]

For more complicated HTML elements, it’s best to make only spans of text editable, such as

Hello, .can-edit[world], and welcome to my talk!

or to use placeholder text.

## A few of my favorite things

.can-edit.key-likes[
- thing one
- thing two
]

📼 Share Again

Share your slides in style with share again! It adds a share bar to your slides that only shows up when they’re embedded in another page. The bar adds easy slide navigation, quick access to full screen views, and a share menu for one-click (or tap!) sharing on social media sites.

Add share again to your slides in three easy steps.

  1. Add use_share_again() to your slides

    ```{r share-again, echo=FALSE}
    xaringanExtra::use_share_again()
    ```
  2. Style your share bar and choose social media sites

    ```{r style-share-again, echo=FALSE}
    xaringanExtra::style_share_again(
      share_buttons = c("twitter", "linkedin", "pocket")
    )
    ```
  3. Embed your slides in blogdown or R Markdown websites

    ```{r embed-xaringan, echo=FALSE}
    xaringanExtra::embed_xaringan(url = "share-again.html", ratio = "4:3")
    ```

    embed_xaringan() works with any xaringan presentation, share again not required!

    Here’s what your slides will look like in an R Markdown HTML document.

📡 Broadcast

Broadcast lets others follow along, in real time! Built with PeerJS, broadcast give you a unique URL to share with your viewers. Then, when they load your slides, their slides will automatically follow you as you present!

To equip your slides with broadcast capabilities, add the following chunk to your slides’ .Rmd file.

```{r broadcast, echo=FALSE}
xaringanExtra::use_broadcast()
```

Then, host your slides online, either on a personal webpage, or through Netlify, GitHub Pages, GitLab Pages, or another service.

When you want to present, open the version of your slides hosted online in a modern browser. Then press P to enter the presenter view. Click on the Broadcast button to start broadcasting.

After a short moment, if everything works, the broadcast button will turn into a broadcast link. Share this link with your audience. When they open the link, their browser will connect with yours and from then on, whenever you advance or change slides, your viewer’s slides will move to the current slide.

Note that the broadcast link is unique and, as the presenter, is remembered for 4 hours. After 4 hours of inactivity, a new link will be generated. In general, create and share the broadcast link just before or as your event starts and certainly not more than an hour before the presentation.

How It Works

PeerJS creates a direct, peer-to-peer connection between your browser and your viewer’s browsers. A third party PeerJS server is used to initially facilitate the connection using the broadcast ID to connect with the presenter’s browser.

After the connection is made, data is sent directly between browsers and the PeerJS server is no longer involved. Furthermore, at no time is any information about your presentation transmitted over the network. When you move to a slide, say for example slide 11, broadcast announces “Slide 11” to any connected viewers and JavaScript in their browser moves their presentation to slide 11.

This has two consequences:

  1. Viewers can move around and look at slides other than the one currently active in the presenter’s browser. When the presenter changes slides, however, all viewers’ slides will move to the new slide.

  2. If your slides involve interactivity, such as htmlwidgets or [panelset], changes made in the presenter’s view aren’t replicated for viewers. Viewers will be taken to the same slide as the presenter, but they will need to click on their own to follow interactively.

Extra Details

It’s worth mentioning a few details. First of all, the broadcaster needs to be connected first before viewers connect. If a viewer connects before the broadcaster starts (or restarts), they should reload the link to reconnect.

Similarly, if the broadcaster reloads their slides, viewers will also need to reload to reconnect. But once everyone is connected, a message will appear for the viewer to prompt them to reconnect.

If you are the presenter and you load the broadcast link, the broadcast will automatically reconnect and start broadcasting. If you want to view your slides without broadcasting, just load the plain URL for the slides without the ?broadcast=... portion. From this view, you can restart the broadcast from the presenter view and if the broadcast ID is still valid that ID will be used. To reset the broadcast ID without waiting 4 hours, load your slides with ?broadcast=1 and new broadcast link will be created at the next broadcast.

👩‍🎨 Scribble

Scribble lets you draw on your xaringan slides. Click the pencil icon or press S to begin drawing. Pressing S or starting the drawing mode toggles the scribble toolbox. There, you’ll find the eraser button, which helps you remove lines from your drawing. Or click the trash button to clear the drawings on the current slide.

```{r xaringan-scribble, echo=FALSE}
xaringanExtra::use_scribble()
```

Your drawings stay with each slide when you change slides. Note that you won’t be able to change slides while you’re in drawing mode. In fact, you can use the and keys to undo or redo your drawings.

Remember that if you use slide continuations to partially reveal slide contents, each partial slide is technically a brand-new slide as far as xaringan is concerned. This means that each partial slide will have it’s own drawing layer and your drawings on one slide won’t carry over to the next. (But they’ll still be there when you switch back!)

To save a copy of the slide with your drawings, your best option is to print your presentation from the browser.

🔊 Slide Tone

Slide tone plays a subtle sound when you change slides. It was requested by a blind R user and enables users to hear an auditory signal of their progress through the slides.

The tones increase in pitch for each slide from a low C to a high C note. The tone pitch stays the same for incremental slides.

Visit the slide tone demo slides to experience it yourself. Or include slide tone in your next xaringan presentation by adding the following code chunk to your slides’ R Markdown.

```{r xaringan-slide-tone, echo=FALSE}
xaringanExtra::use_slide_tone()
```

📽 Animate.css

Animate.css is a popular collection of CSS animations. It contains

a bunch of cool, fun, and cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and general just-add-water-awesomeness.

Use use_animate_css() to include the animate.css stylesheets in your slides. This function automatically modifies the CSS selector that enables the animation so that only the slides that are visible are animated. This drastically improves performance on large slide decks with many animations. For use in other HTML documents, set xaringan = FALSE to load the default animate.css file without this performance tweak.

To use animate.css in your slides, add the following code chunk to your slides’ R Markdown.

```{r xaringan-animate-css, echo=FALSE}
xaringanExtra::use_animate_css()
```

Then add the animated class and the desired animation class to the slides you want to animate. Out animations are only applied to slides on exit.

---
class: animated slideInRight fadeOutLeft

## This slide...

- slides in from the right
- and fades out to the left on exit

If you want to use the same slide transitions for all slides, you can use use_animate_all(). This function sets a default in and out animation for all slides. Animations can be disabled for individual slides by adding the class no-animation to the slide.

```{r xaringan-animate-all, echo=FALSE}
xaringanExtra::use_animate_all("slide_left")
```

Note: because use_animate_all() only imports the CSS required for the slide in and slide out animations, you need to also include use_animate_css() (see above) if you want to use other animations from animate.css in your slides.

🗂 Panelset

Panelset adds accessible tabbed panels — just like R Markdown’s .tabset panels — to your xaringan slides. You can activate a panel by clicking on the tab, or you can use the keyboard. When you reach a slide with a panelset, the left and right arrows will step through the panels.

To use panelset, add the following chunk to your slides.

```{r xaringan-panelset, echo=FALSE}
xaringanExtra::use_panelset()
```

Then, create a .panelset[...] that contains .panel[]s. Each .panel[] should have a .panel-name[] and content (everything that isn’t the panel’s name).

.panel[.panel-name[NAME]
...content...
]

Here’s the example used in the demo slides.

.panelset[
.panel[.panel-name[R Code]

```{r panel-chunk, fig.show='hide'}
# ... r code ...
```
]

.panel[.panel-name[Plot]

![](README_files/figure-gfm/panel-chunk-1.png)
]
]

Sideways Panelsets

As an alternative to the “tabs above content” view, you can also use sideways panelsets where the tabs appear beside the tabbed content.

To choose this effect, add the .sideways class to .panelset in your slides or R Markdown text.

.panelset.sideways[
.panel[.panel-name[ui.R]
```r
# shiny ui code here...
```
]

.panel[.panel-name[server.R]
```r
function(input, output, session) {
  # shiny server code here...
}
```
]
]

By default in sideways-mode, the tabs will appear on the left side. You can choose to place the tabs on the right side by including both .sideways and .right with .panelset.

.panelset.sideways.right[
.panel[.panel-name[ui.R]
```r
# shiny ui code here...
```
]

.panel[.panel-name[server.R]
```r
function(input, output, session) {
  # shiny server code here...
}
```
]
]

Use in R Markdown

Example R Markdown output with panelset

Panelset works in all R Markdown HTML outputs like HTML reports and blogdown webpages!

Panelset works in the same way as rmarkdown’s tabset feature, albeit with fewer style options, but the trade-off is that it works in a wider range of document types. Generally, as long as the output is HTML, panelset should work.

Another advantage of panelset is that it enables deeplinking: the currently shown tab is encoded in the URL automatically, allowing users to link to open tabs. Users can also right click on a panel’s tab and select Copy Link to link directly to a specific panel’s tab, which will appear in view when visiting the copied link.

With standard R Markdown, i.e. rmarkdown::html_document(), you can use the following template.

# Panelset In R Markdown! {.panelset}

## Tab One

Amet enim aptent molestie vulputate pharetra
vulputate primis et vivamus semper.

## Tab Two

### Sub heading one

Sit etiam malesuada arcu fusce ullamcorper
interdum proin tincidunt curabitur felis?

## Tab Three

Adipiscing mauris egestas vitae pretium 
ad dignissim dictumst platea!

# Another section

This content won't appear in a panel.

In other, less-standard R Markdown HTML formats, you can use pandoc’s fenced divs.

::::: {.panelset}

::: {.panel}
[First Tab]{.panel-name}

Lorem sed non habitasse nulla donec egestas magna
enim posuere fames ante diam!
:::

::: {.panel}
[Second Tab]{.panel-name}

Consectetur ligula taciti neque scelerisque gravida
class pharetra netus lobortis quisque mollis iaculis.
:::

:::::

Alternatively, you can also use raw HTML.

<div class="panelset">
  <div class="panel">
    <div class="panel-name">First Tab</div>
    <!-- Panel content -->
    <p>Lorem ipsum, etc, etc</p>
  </div>
  <div class="panel">
    <div class="panel-name">Second Tab</div>
    <!-- Panel content -->
    <p>Lorem ipsum, etc, etc</p>
  </div>
</div>

Customize Panelset Appearance

To customize the appearance of your panels, you can use style_panelset_tabs() called directly in an R chunk in your slides.

```{r echo=FALSE}
style_panelset_tabs(foreground = "honeydew", background = "seagreen")
```

The panelset uses opacity to soften the in-active tabs to increase the chances that the tabs will work with your slide theme. If you decide to change your tab colors or to use solid colored tabs, you’ll likely want to set inactive_opacity = 1 in style_panelset() (or the corresponding --panel-tab-inactive-opacity CSS variable).

Behind the scenes, style_panelset_tabs() updates the values of custom CSS properties that define the panelset appearance. If you’d rather work with CSS, the default values of these properties are shown in the CSS code below. You can copy the whole CSS block to your slides and modify the values to customize the style to fit your presentation.

```{css echo=FALSE}
.panelset {
   --panel-tab-foreground: currentColor;
   --panel-tab-background: unset;
   --panel-tab-active-foreground: currentColor;
   --panel-tab-active-background: unset;
   --panel-tab-active-border-color: currentColor;
   --panel-tab-hover-foreground: currentColor;
   --panel-tab-hover-background: unset;
   --panel-tab-hover-border-color: currentColor;
   --panel-tab-inactive-opacity: 0.5;
   --panel-tabs-border-bottom: #ddd;
   --panel-tab-font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
}
```

Panelset knitr Chunks

A common use-case for panelset is to show the code and its output in separate tabs. For example, you might want to first show the code to create a plot in the first tab, with the plot itself in a second tab. On slides where space is constrained, this approach can be useful.

To help facilitate this process, panelset provides a panelset chunk option. When set to TRUE, the code is included in a panel tab named Code and the output is included in a panel tab named Output. Note that you still need to wrap this chunk in a panelset-creating container.

.panelset[
```{r panelset = TRUE}
list(
  normal = rnorm(10),
  uniform = runif(10),
  cauchy = rcauchy(10)
)
```
]

You can also set the panelset chunk option to a named vector, where the source item is the tab name for the source code and the output item is the tab name for the code output.

```{r panelset = c(source = "ggplot2", output = "Plot")}
ggplot(Orange) +
  aes(x = age, y = circumference, colour = Tree) +
  geom_point() +
  geom_line() +
  guides(colour = FALSE) +
  theme_bw()
```

When your code contains multiple expressions and outputs, you may also want to set the results = "hold" chunk option. Currently, knitr uses results = "markup" as the default, in which case each code expression and output pair will generate a pair of tabs.

```{r panelset = TRUE, results="hold"}
print("Oak is strong and also gives shade.")
print("The lake sparkled in the red hot sun.")
```

Finally, panelset chunks also work in R Markdown documents, but they must be encapsulated in <div class="panelset"> and </div>

<div class="panelset">

```{r panelset = TRUE}
print("Oak is strong and also gives shade.")
```

</div>

or appear inside a section with the panelset class.

### A Random Sentence {.panelset}

```{r panelset = TRUE}
print("Oak is strong and also gives shade.")
```

💌 Logo

use_logo() adds a logo to all of your slides. You can make the logo a clickable link and choose where on the slide it is placed. You can also set which types of slides will not get the logo by default.

To add a logo to your xaringan presentation, add the following code chunk to your slides’ R Markdown file.

```{r xaringan-logo, echo=FALSE}
xaringanExtra::use_logo(
  image_url = "https://raw.githubusercontent.com/rstudio/hex-stickers/master/PNG/xaringan.png"
)
```

See the documentation for ?use_logo for more options regarding sizing and positioning. You can also make the logo a link using link_url and you can hide the logo for a particular slide by using the hide_logo slide class.

📰 Banner

use_banner() adds a banner to the top or the bottom of your slides. Use banner to add the title of your talk, a link to your materials online, or any other text to every slide. Each banner has three columns: left, center, and right. Choose to exclude the banner from particular slides by class.

```{r xaringan-banner, echo=FALSE}
xaringanExtra::use_banner(
  top_left = "My Awesome Talk Title",
  top_right = "Mr. Fancy Pants",
  bottom_left = "bit.ly/my-awesome-talk",
  exclude = "title-slide"
)
```

Banners are fully customizable and can be styled based on slide class, although the defaults will generally work in most places. See style_banner() for full details!

🔍 Search

Brings remark.search to xaringan slides! Call use_search() to add search to your slides and to choose your options.

```{r xaringanExtra-search, echo=FALSE}
xaringanExtra::use_search(show_icon = TRUE)
```
Parameter Description
position Where to place the search box.
case_sensitive If FALSE, ignores case of search and text.
show_icon Show the icon to open or close the search?
auto_search Search on each keystroke (TRUE) or on enter (FALSE)?

In your slides, press Control + F to start searching, or click on the search icon 🔍 if you set show_icon = TRUE. Press Enter to jump to the next match.

To change the appearance of the search box, use style_search():

```{r xaringanExtra-search-style, echo=FALSE}
xaringanExtra::style_search(match_background = "pink")
```
Argument Description
icon_fill Color of search icon
input_background Color of search input box background
input_foreground Color of text in search input box
input_border Border style of search input box
match_background Color of match background (not current)
match_foreground Color of match text (not current)
match_current_background Color of current match background
match_current_foreground Color of current match text
selector CSS selector specifying which search bar to update (for advanced or unusual uses only)

🏗 Tachyons

Tachyons is a collection of CSS utility classes that works beautifully with xaringan presentations and the remarkjs class syntax.

To use tachyons in your slides, add the following code chunk to your slides’ R Markdown.

```{r xaringan-tachyons, echo=FALSE}
xaringanExtra::use_tachyons()
```

Tachyons provides small, single-purpose CSS classes that are easily composed to achieve larger functionality and styles. In the remarkjs content classes syntax, you can compose classes by chaining them together. For example, the following markdown produces a box with a washed green background (.bg-washed-green) and a dark green border (.b--dark-green) on all sides (.ba) with line width 2 (.bw2) and border radius (.br3). The box has a shadow (.shadow-5) and medium-large horizontal padding (.ph4) with a large top margin (.mt5).

.bg-washed-green.b--dark-green.ba.bw2.br3.shadow-5.ph4.mt5[
The only way to write good code is to write tons of bad code first.
Feeling shame about bad code stops you from getting to good code

.tr[
— Hadley Wickham
]]

Tachyons provides hundreds of CSS classes that are abbreviated and terse, so it takes some time to learn. In addition to the tachyons documentation, the Tachyons Cheatsheet is an excellent and easy to use reference.

🤳 Webcam

Add a live video of your webcam into your slides (in your own browser only). Useful when you are presenting via video conference to include your video, or when you are recording a class or lecture.

To add webcam to your xaringan presentation, add the following code chunk to your slides’ R Markdown file.

```{r}
xaringanExtra::use_webcam()
```

Inside your slides, press w to turn the webcam on and off, or press Shift + W to move the video to the next corner. You can also drag and drop the video within the browser window.

The webcam extension is based on the original webcam implementation by Yihui Xie, author of xaringan.

⏸️ FreezeFrame

FreezeFrame starts any gifs on a slide when you turn to that slide. This helps alleviate the awkward pause that can happen when you turn to a slide with a gif that has already started and you have to wait until it loops back around. You can also directly click on the gif to stop or start it. Built using freezeframe.js.

To add FreezeFrame to your xaringan presentation, add the following code chunk to your slides' R Markdown file.

```{r xaringanExtra-freezeframe, echo=FALSE}
xaringanExtra::use_freezeframe()
```
Argument Description
selector The selector used to search for .gifs to freeze.
trigger The trigger event to start animation for non-touch devices. One of "click" (default), "hover" or "none".
overlay Whether or not to display a play icon on top of the paused image, default: FALSE.
responsive Whether or not to make the image responsive (100% width), default: TRUE.
warnings Whether or not to issue warnings in the browser console if an image doesn’t appear to be a gif.

📋 Clipboard

Add a “Copy Code” button for one-click code chunk copying.

To add clipboard to your xaringan presentation or R Markdown document, add the following code chunk to your slides’ R Markdown file.

```{r xaringanExtra-clipboard, echo=FALSE}
xaringanExtra::use_clipboard()
```

You can also customize the text that is shown by default when hovering over a code chunk with the button_text argument. Use success_text to specify the text shown when the copy action works, or error_text for the text shown when the copy action fails. If the copy action fails, the text will still be selected, so the user can still manually press Ctrl+C to copy the code chunk.

These options accept raw HTML strings, so you can achieve an icon-only appearance using FontAwesome icons:

```{r xaringanExtra-clipboard, echo=FALSE}
htmltools::tagList(
  xaringanExtra::use_clipboard(
    button_text = "<i class=\"fa fa-clipboard\"></i>",
    success_text = "<i class=\"fa fa-check\" style=\"color: #90BE6D\"></i>",
    error_text = "<i class=\"fa fa-times-circle\" style=\"color: #F94144\"></i>"
  ),
  rmarkdown::html_dependency_font_awesome()
)
```

clipboard works in xaringan slides, R Markdown documents, blogdown sites, and Shiny apps!

Related projects: For related R packages that provide copy support via clipboard.js see

📐 Fit to Screen

xaringan/remark slides scale at a consistent ratio when the browser window is resized. In other words, if the slide ratio is 4:3, then remark scales the slides and positions them in the browser window so that they maintain the aspect ratio.

In certain situations, like when showing slides in split screen next to another window like RStudio, this causes the slides to become rather small. Alternatively, it’s a great way to be able to adapt your slides to the aspect ratio of the projector or television screen when you don’t know the ratio ahead of time.

This extension adds a short cut key — Alt/Option+ F — that fits the slides to the screen and ignores the slide ratio. (Currently, it only turns on; reload your slides to return to normal.)

```{r xaringan-fit-screen, echo=FALSE}
xaringanExtra::use_fit_screen()
```

😎 Extra Styles

Extra Styles

I’ve collected a few CSS extras that I like to include in my slides, that I’ve bundled up into the use_extra_styles() function.

```{r xaringan-extra-styles}
xaringanExtra::use_extra_styles(
  hover_code_line = TRUE,         #<<
  mute_unhighlighted_code = TRUE  #<<
)
```
  • hover_code_line adds a little floating triangle next to the hovered line in a code chunk

  • mute_unhighlighted_code modifies the xaringan/remarkjs line highlighting to mute the lines that aren’t highlighted.

Progress Bar

You can also add an animated progress bar using xaringanExtra::use_progress_bar().

```{r xaringanExtra, echo = FALSE}
xaringanExtra::use_progress_bar(color = "#0051BA", location = "top")
```
  • color can be any CSS color

  • location can be "top" or "bottom"

  • height can be a valid CSS unit, e.g. 10px or 0.25em

xaringanextra's People

Contributors

dependabot[bot] avatar gadenbuie avatar mattwarkentin avatar skamper1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xaringanextra's Issues

cross-browser print problems with text_poster

The following example prints as expected in Firefox; however, in Safari, none of the poster text prints and, in Chrome, the size of the text is expanded and stretches beyond the window limit.

---
title: "MWE"
subtitle: "<br>"
author: "MWE"
output:
  xaringan::moon_reader:
    lib_dir: libs
    css: moffitt-xaringan.css
    seal: false
    nature:
      titleSlideClass: ["bottom", "left"]
      slideNumberFormat: "%current%"
      highlightStyle: github
      highlightLines: true
      ratio: "16:9"
      countIncrementalSlides: true
---

```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)

knitr::opts_chunk$set(
  fig.width = 10, fig.height = 6, fig.retina = 2,
  warning = FALSE, message = FALSE
)

library(tidyverse)

xaringanExtra::use_xaringan_extra(c("animate_css", "text_poster", "panelset"))
```

class: center inverse strive-to-recruit

`r xaringanExtra::text_poster(
  "I strive to recruit the 
  most talented 
  data scientists and
  compensate them accordingly.",
  width = "90%",
  height = "85%"
)`

.footnote.pull-right[— _Every good data science manager ever_]

```{css echo=FALSE}
@import url('https://fonts.googleapis.com/css?family=Merriweather:300');

.text-poster {
	font-family: 'Merriweather', serif;
  margin: 0 auto;
}
.strive-to-recruit .text-poster .line-container .line:nth-child(2) {
  color: #82c878;
}
.strive-to-recruit {
  background: #00589a;
}

Multiple logos, on different slides?

Hi all,
Just a quick (hopefully!) question, mostly out of my ignorance of css... Is it possible to use use_logo repeatedly to change the logo? So, to be clearer, I have a set of slides I'm preparing when many speakers will talk - each from different institutions. So what I'd like to do is to be able to add the specific logo only in the slides that are relevant for a given speaker.

I think if I use multiple chunks pointing to different images, then the last one will take over and be included even when it shouldn't (on top of the "correct" one)? I suppose I could define a class for each speaker and the add all the "other" classes to the call to use_logo, but I was wondering whether there's a neater option?

Thanks!
Gianluca

[use_logo] Float logo rather than absolute positioning

Consider adding position = "[top|bottom] [right|left]" argument that would float the logo rather than position absolutely.

If top, the logo would need to be inserted as the first child of .remark-slide-content, otherwise if bottom the logo is appended as the last child.

This way the logo can have an outer margin that prevents overlapping.

using decktape or pagedown::chrome_page with panelset

Any ideas how to get decktape.js or chrome_page to convert a slide deck with panelsets to a pdf that can toggle through the panel sets as new pages in the pdf?

The main problem is that the slides get toggled through with a --key=ArrowRight instead of ArrowDown when using the generic command.

When I use react command it doesnt toggle through the slides with a key press but it counts the slides up front, as does chrome_page.

text-poster has limitations

I need to describe the limitations of text-poster in more detail in the docs.

  • Might be Firefox only? #11
  • Requires much fiddling with width and height
  • Does not allow HTML
    • Can somewhat circumvent with CSS :nth-child() selectors

Installation failure

Before everything else, thank you very much for developing this awesome package!

Would you mind examining the installation issue below at your best convenience?:

remotes::install_github("gadenbuie/xaringanExtra")
#> Downloading GitHub repo gadenbuie/xaringanExtra@master
#> Skipping 1 packages not available: uuid
#>          checking for file 'C:\Users\JooYoung\AppData\Local\Temp\RtmpGeFRFX\remotes54cc49d39d3\gadenbuie-xaringanExtra-a487216/DESCRIPTION' ...     checking for file 'C:\Users\JooYoung\AppData\Local\Temp\RtmpGeFRFX\remotes54cc49d39d3\gadenbuie-xaringanExtra-a487216/DESCRIPTION' ...   v  checking for file 'C:\Users\JooYoung\AppData\Local\Temp\RtmpGeFRFX\remotes54cc49d39d3\gadenbuie-xaringanExtra-a487216/DESCRIPTION' (411ms)
#>       -  preparing 'xaringanExtra': (1.2s)
#>    checking DESCRIPTION meta-information ...     checking DESCRIPTION meta-information ...   v  checking DESCRIPTION meta-information
#>       -  checking for LF line-endings in source and make files and shell scripts
#>       -  checking for empty or unneeded directories
#>       -  building 'xaringanExtra_0.0.12.tar.gz'
#>      
#> 
#> Installing package into 'C:/Users/JooYoung/R/win-library/3.6'
#> (as 'lib' is unspecified)
#> Error: Failed to install 'xaringanExtra' from GitHub:
#>   (converted from warning) installation of package 'C:/Users/JooYoung/AppData/Local/Temp/RtmpGeFRFX/file54cc26d8629c/xaringanExtra_0.0.12.tar.gz' had non-zero exit status

Created on 2020-01-31 by the reprex package (v0.3.0.9001)

Session info
sessioninfo::session_info()
#> - Session info ---------------------------------------------------------------
#>  setting  value                       
#>  version  R version 3.6.2 (2019-12-12)
#>  os       Windows 10 x64              
#>  system   x86_64, mingw32             
#>  ui       RTerm                       
#>  language (EN)                        
#>  collate  English_United States.1252  
#>  ctype    English_United States.1252  
#>  tz       America/New_York            
#>  date     2020-01-31                  
#> 
#> - Packages -------------------------------------------------------------------
#>  package     * version    date       lib source                            
#>  assertthat    0.2.1      2019-03-21 [2] CRAN (R 3.6.2)                    
#>  backports     1.1.5      2019-10-02 [2] CRAN (R 3.6.1)                    
#>  bit           1.1-15.1   2020-01-14 [2] CRAN (R 3.6.2)                    
#>  bit64         0.9-7      2017-05-08 [2] CRAN (R 3.6.0)                    
#>  blob          1.2.1      2020-01-20 [2] CRAN (R 3.6.2)                    
#>  callr         3.4.1      2020-01-24 [2] CRAN (R 3.6.2)                    
#>  cli           2.0.1      2020-01-08 [1] CRAN (R 3.6.2)                    
#>  crancache     0.0.0.9001 2020-01-03 [2] Github (r-lib/crancache@936fa23)  
#>  cranlike      1.0.2      2018-11-26 [2] CRAN (R 3.6.2)                    
#>  crayon        1.3.4      2017-09-16 [2] CRAN (R 3.6.2)                    
#>  curl          4.3        2019-12-02 [2] CRAN (R 3.6.2)                    
#>  DBI           1.1.0      2019-12-15 [2] CRAN (R 3.6.2)                    
#>  debugme       1.1.0      2017-10-22 [2] CRAN (R 3.6.2)                    
#>  desc          1.2.0      2018-05-01 [2] CRAN (R 3.6.2)                    
#>  digest        0.6.23     2019-11-23 [2] CRAN (R 3.6.2)                    
#>  evaluate      0.14       2019-05-28 [2] CRAN (R 3.6.2)                    
#>  fansi         0.4.1      2020-01-08 [1] CRAN (R 3.6.2)                    
#>  fs            1.3.1      2019-05-06 [2] CRAN (R 3.6.2)                    
#>  glue          1.3.1      2019-03-12 [2] CRAN (R 3.6.2)                    
#>  highr         0.8        2019-03-20 [2] CRAN (R 3.6.2)                    
#>  htmltools     0.4.0.9002 2020-01-17 [1] Github (rstudio/htmltools@e07546c)
#>  knitr         1.27.2     2020-01-21 [1] Github (yihui/knitr@ab191b0)      
#>  magrittr      1.5        2014-11-22 [2] CRAN (R 3.6.2)                    
#>  memoise       1.1.0      2017-04-21 [2] CRAN (R 3.6.2)                    
#>  parsedate     1.2.0      2019-05-08 [2] CRAN (R 3.6.2)                    
#>  pillar        1.4.3      2019-12-20 [2] CRAN (R 3.6.2)                    
#>  pkgbuild      1.0.6      2019-10-09 [2] CRAN (R 3.6.2)                    
#>  pkgconfig     2.0.3      2019-09-22 [2] CRAN (R 3.6.2)                    
#>  prettyunits   1.1.1      2020-01-24 [1] CRAN (R 3.6.2)                    
#>  processx      3.4.1      2019-07-18 [2] CRAN (R 3.6.2)                    
#>  ps            1.3.0      2018-12-21 [2] CRAN (R 3.6.2)                    
#>  purrr         0.3.3      2019-10-18 [2] CRAN (R 3.6.2)                    
#>  R6            2.4.1      2019-11-12 [2] CRAN (R 3.6.2)                    
#>  rappdirs      0.3.1      2016-03-28 [2] CRAN (R 3.6.2)                    
#>  Rcpp          1.0.3      2019-11-08 [2] CRAN (R 3.6.2)                    
#>  rematch2      2.1.0      2019-07-11 [2] CRAN (R 3.6.2)                    
#>  remotes       2.1.0      2019-06-24 [2] CRAN (R 3.6.2)                    
#>  reprex        0.3.0.9001 2020-01-30 [1] Github (tidyverse/reprex@e3fcadb) 
#>  rlang         0.4.3      2020-01-24 [1] CRAN (R 3.6.2)                    
#>  rmarkdown     2.1.1      2020-01-24 [1] Github (rstudio/rmarkdown@18ba267)
#>  rprojroot     1.3-2      2018-01-03 [2] CRAN (R 3.6.2)                    
#>  RSQLite       2.2.0      2020-01-07 [2] CRAN (R 3.6.2)                    
#>  sessioninfo   1.1.1      2018-11-05 [2] CRAN (R 3.6.2)                    
#>  stringi       1.4.5      2020-01-11 [1] CRAN (R 3.6.2)                    
#>  stringr       1.4.0.9000 2020-01-21 [1] Github (hadley/stringr@cc6e322)   
#>  styler        1.2.0      2019-10-17 [2] CRAN (R 3.6.2)                    
#>  tibble        2.1.3      2019-06-06 [2] CRAN (R 3.6.2)                    
#>  vctrs         0.2.2      2020-01-24 [2] CRAN (R 3.6.2)                    
#>  withr         2.1.2      2018-03-15 [2] CRAN (R 3.6.2)                    
#>  xfun          0.12.2     2020-01-17 [1] Github (yihui/xfun@9ecdc33)       
#>  yaml          2.2.0      2018-07-25 [2] CRAN (R 3.6.0)                    
#> 
#> [1] C:/Users/JooYoung/R/win-library/3.6
#> [2] C:/Program Files/R/R-3.6.2/library

tile view rescaling

Cmd + +/- works in tile view but then breaks the slide scaling in remark, so when you switch back you don't see the slides until you go back to default scaling.

Resizing inside the remark slides works (doesn't change scale of slides because remark prevents this) in the sense that the tile view gets bigger when you switch back to it.

At the very least the missing slides problem needs to be fixed, but it'd be nice to keep the tile view scaling.

Remove text poster feature

It's too fiddly, doesn't work in enough scenarios across enough browsers and can be done with custom css instead

[panelset] Handle tab overflow and multiline tabs

Is there an option somewhere to resize the labels of panels? I may be asking too much of the package, but I would like to have 11 panels and they're running off the side of the slide.

image

Any help or guidance you can provide would be appreciated. Thank you.

Copy-to-clipboard support for code chunks in xaringan

Hey Garrick,

I originally posted this issue in klippy, but it seems like it may be equally or more so a xaringan/remark issue, so I decided to cross-post it here. Feel free to close this issue if you think this isn't strictly relevant.

I use xaringan slides for teaching and workshops and it would be great to allow students/attendees to be able copy code to clipboard for easy use of any code used in the slides. It can also be useful even just for the presenter, if they want to turn a presentation of code into a live-coding demo.

RLesur/klippy#16

panelest: code and output panels not auto-generating

I'm trying to use panelset to have panels auto-created for R code chunks as discussed and demoed here: https://pkg.garrickadenbuie.com/xaringanExtra/panelset/?panelset1=chunk-1#3

However, the auto-generating feature is not working. Instead, the code and output appear as in any ordinary R code chunk, i.e. just code first then output right below it. For example, the following code:

## test

```{r panelset = TRUE}
list(
  normal = rnorm(10),
  uniform = runif(10),
  cauchy = rcauchy(10)
)
```

produces this slide:

panelset2

I tracked down the source code for the panelset demo slides and tried knitting them on my machine, which produces the same error:

panelsettestscreengrab

Apologies if I'm missing something obvious here. I tried rolling back to R 3.6 but that didn't fix it. The package is super helpful and I'm hoping to use this feature too. Thanks!

animate.css Attention seekers

Hello @gadenbuie and thank you for the amazing package!

Is it possible use the "Attention seekers" animations in xaringan presentations? If yes, could you please explain me how?

Thank you,
M

use_logo() doesn't handle relative URLS

use_logo() doesn't work as expected with relative URLs because the CSS dependency is inside libs/xaringanExtra-logo-xxx.

Currently, you can work around this by adding ../../<path relative to slides> before the path name of the logo image. But this should be handled or the CSS should be included differently.

In the following example, use_logo("kitten.jpg") won't work, but use_logo("../../kitten.jpg") will.

---
title: "xaringanExtra use_logo issue"
output:
  xaringan::moon_reader:
    lib_dir: libs
    seal: false
---

class: center, middle

```{r include=FALSE, eval=FALSE}
# Not run inside the slide
download.file("http://placekitten.com/200/200", "kitten.jpg")
```

```{r xaringan-extra, echo=FALSE}
xaringanExtra::use_logo("kitten.jpg", width="100px")
```

# xaringan

### /ʃaː.'riŋ.ɡan/

---
class: inverse, center, middle

# Get Started

---

# Hello World

Install the **xaringan** package from [Github](https://github.com/yihui/xaringan):

```{r eval=FALSE, tidy=FALSE}
devtools::install_github("yihui/xaringan")
```

use_logo: issue with the quotes around the url of the background-image

I found that the added logo may not display sometimes. For some unknown reasons, the quotes around the added css may corrupt sometimes. Actually, the quotes are not required. I have patched the logo_css function like so:

logo_css <- function(url, width, height, position) {
  if (!is_css_position(position)) {
    stop("Please use `css_position()` to specify the position of your logo", call. = FALSE)
  }
  dirs <- c("top", "right", "left", "bottom")
  names(dirs) <- dirs
  p <- lapply(dirs, function(pos) {
    if (!is.null(position[[pos]])) sprintf("%s:%s;", pos, position[[pos]]) else ""
  })
  width <- htmltools::validateCssUnit(width)
  height <- htmltools::validateCssUnit(height)
  sprintf("
.xaringan-extra-logo {
  width: %s;
  height: %s;
  z-index: 0;
  background-image: url(%s);
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  %s%s%s%s
}
", width, height, url, p$top, p$right, p$bottom, p$left)
} 

If you agree with that, I can make a PR.

Modifying the the share bar with style_share_again doesn't seem to work

Hi @gadenbuie,

I am unable to get any of the style options in xaringanExtra::style_share_again() to work. When I change the colour for background or foreground they remain the default colours, and any changes to share_buttons doesn't seem to have any affect.

---
title: "Test Share Again"
author: "Matt"
output:
  xaringan::moon_reader:
    lib_dir: libs
---

```{r setup, include=FALSE}
xaringanExtra::use_share_again()
xaringanExtra::style_share_again(
  share_buttons = "none", 
  foreground = "rgba(255, 0, 0, 0.5)",
  background = "rgb(255, 0, 0)"
  )
```

This is a test slide

Screen Shot 2020-09-02 at 3 46 44 PM

Also, I think there may be a spelling error in the default argument here.

Side note: I think use_share_again() breaks when no author is specified in the YAML front-matter.

---
title: "Test Share Again"
output:
  xaringan::moon_reader:
    lib_dir: libs
---

```{r setup, include=FALSE}
xaringanExtra::use_share_again()
xaringanExtra::style_share_again(
  share_buttons = "none", 
  foreground = "orange",
  background = "blue"
  )
```

This is a test slide

[panelset] Clean up style_panelset() arguments

There were only a few variables when I first built the feature, but now there are many and they're not completely consistent.

  • Make _active and _inactive explicit
  • Use _foreground or _background instead of _color or implied 🤷‍♂️
  • Maybe remove panel_tabs? prefix because it's too verbose?

Cant click on .panel_set[] tabs

Hi,

  1. First of all, thanks for the quick fix yesterday in #54 !

  2. I am trying to build .panelset[] workflow and having problems with it. I started from examples structure and it shows in slides as it is fine. But can't get to render tab content but 1st one. This is how it looks, and an HTML inspect elements. It seems to me that I have something wrong with the onclick.

In this case, I cant get de Explorar tab content. Only displaying the default(?) Visualizar one:

image

This is my session info:

 setting  value                       
 version  R version 4.0.2 (2020-06-22)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  Spanish_Argentina.1252      
 ctype    Spanish_Argentina.1252      
 tz       America/Buenos_Aires        
 date     2020-09-05         
...
xaringan         0.16    2020-03-31 [1] CRAN (R 4.0.2)                          
xaringanExtra    0.2.3   2020-09-04 [1] Github (gadenbuie/xaringanExtra@6271d3f)
xaringanthemer * 0.3.0   2020-05-04 [1] CRAN (R 4.0.2) 

Thanks for this great pkg!!!

Highlight last list item

class: highlight-list-last-item

1. Thing One
--
2. Thing Two
    1. Two A
    2. Two B
---
3. Thing Three

Oversized embedded slides with embed_xaringan()

Hi @gadenbuie !

I updated a blog post today with some simple text edits and now my embedded xaringan slides look comically oversized 😆

Any idea why this might be happening? I don't know if it's xaringanExtra-related or if I should look elsewhere for clues. I'm using xaringanExtra v0.2.4.

Here's a screenshot with the page at 50% magnification 🤣

image

Plotly sizing with panelset in distill article

Hi and thanks for all your amazing work! Just discovering panelset and it is exactly what I was looking for.

I'm working with the distill::distill_article R Markdown format and I'm getting some slightly puzzling output when I add Plotly charts to panels. The chart in the panel is the correct size (i.e. it fills the container), but the charts in the second and third panels don't fill the container. Interestingly, if you resize the browser window while the second or third panel is active, the Plotly chart resizes to fill the entire container. I have no clue if this is an issue with xaringanExtra, distill, or plotly (or some interaction of the three), so any tips or thoughts you have would be appreciated!

Here is a reprex and screenshot of the output I'm seeing:

---
title: "Distill, panelset, and plotly"
date: "`r Sys.Date()`"
output: distill::distill_article
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, fig.height = 3)

library(plotly)
xaringanExtra::use_panelset()
```

<div class = "l-page">

::::: {.panelset}

::: {.panel}

## Panel 1 {.panel-name}

```{r layout="l-page"}
plot_ly(economics, x = ~date, y = ~pop, color = I("blue"))
```

:::

::: {.panel}

## Panel 2 {.panel-name}

```{r layout="l-page"}
plot_ly(economics, x = ~date, y = ~pop, color = I("red"))
```

:::

::: {.panel}

## Panel 3 {.panel-name}

```{r layout="l-page"}
plot_ly(economics, x = ~date, y = ~pop, color = I("green"))
```

:::

:::::

image

image

Feature: Live stream mode?

Hello! 👋
It'd be really nice to be able to "live stream" slides like you can with Slides. As in, have the option to share a link to your slides and have the slides on the viewer's end advance in sync with yours as you present.
I don't have any sense for what it would take to implement something like this 🙃. I'm guessing it might be more of a where and how the slides are hosted, but thought I'd put it out there anyway

panel with pull left right doesnt split slides correctly

The slides overlap when this structure is used

---
title: "Temp"
author: "Yoni"
date: "2016/12/12 (updated: `r Sys.Date()`)"
output:
  xaringan::moon_reader:
    lib_dir: libs
    nature:
      highlightStyle: github
      highlightLines: true
      countIncrementalSlides: false
---

```{r xaringan-panelset, echo=FALSE}
xaringanExtra::use_panelset()
```

```{r setup, include=FALSE}

options(htmltools.dir.version = FALSE)

knitr::opts_chunk$set(
  echo = FALSE,
  message = FALSE,
  warning = FALSE
  )
```

## Slide 1

.panelset[
.panel[.panel-name[Panel A]
.pull-left[
- Image 1
]

.pull-right[
```{r}
knitr::include_graphics("https://static.wikia.nocookie.net/schitts-creek/images/6/6e/S5david.png/revision/latest?cb=20191121205906")
```
]

]

.panel[.panel-name[Panel B]
.pull-left[
- Image 2
]

.pull-right[
```{r}
knitr::include_graphics('https://imgix.bustle.com/uploads/image/2019/3/4/85985143-8a85-4063-8b75-b1f96720f256-1980-822677.jpg')
```
]

]

.panel[.panel-name[Panel C]
.pull-left[
- Image 3
]

.pull-right[
```{r}
knitr::include_graphics('https://process.fs.grailed.com/AJdAgnqCST4iPtnUxiGtTz/auto_image/cache=expiry:max/rotate=deg:exif/resize=height:335,fit:scale/output=quality:90/compress/https://cdn.fs.grailed.com/api/file/ICDx6K3hTG6zNpsHb68y')
```

]

]

]

--- 

## Slide 2

.pull-left[
```{r}
knitr::include_graphics('https://media1.popsugar-assets.com/files/thumbor/fyytMgLKkOtAS4LxLysuLTd_ph4/0x0:1742x1742/fit-in/1024x1024/filters:format_auto-!!-:strip_icc-!!-/2019/10/31/650/n/24155406/a25cb7365dbaf165b626a4.00326153_/i/baby-dressed-as-david-rose-from-schitts-creek.jpg')
```
]

.pull-right[
- bullet 1

- bullet 2

- bullet 3

]

sessioninfo
- Session info ---------------------------------------------------------------------------
 setting  value                       
 version  R version 4.0.2 (2020-06-22)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  English_United States.1252  
 ctype    English_United States.1252  
 tz       America/New_York            
 date     2020-10-20                  

- Packages -------------------------------------------------------------------------------
 ! package       * version    date       lib source                                  
 P assertthat      0.2.1      2019-03-21 [?] CRAN (R 4.0.2)                          
   backports       1.1.10     2020-09-15 [1] CRAN (R 4.0.2)                          
 P base64enc       0.1-3      2015-07-28 [?] CRAN (R 4.0.0)                          
 P cli             2.0.2      2020-02-28 [?] CRAN (R 4.0.2)                          
 P clipr           0.7.0      2019-07-23 [?] CRAN (R 4.0.2)                          
 P crayon          1.3.4      2017-09-16 [?] CRAN (R 4.0.2)                          
 P data.table      1.13.0     2020-07-24 [?] CRAN (R 4.0.2)                          
 P desc            1.2.0      2018-05-01 [?] CRAN (R 4.0.2)                          
 P details         0.2.1      2020-09-08 [?] local                                   
 P digest          0.6.25     2020-02-23 [?] CRAN (R 4.0.2)                          
 P dplyr           1.0.2      2020-08-18 [?] CRAN (R 4.0.2)                          
 P ellipsis        0.3.1      2020-05-15 [?] CRAN (R 4.0.2)                          
 P evaluate        0.14       2019-05-28 [?] CRAN (R 4.0.2)                          
 P fansi           0.4.1      2020-01-08 [?] CRAN (R 4.0.2)                          
 P flextable       0.5.11     2020-09-09 [?] CRAN (R 4.0.2)                          
 P forcats         0.5.0      2020-03-01 [?] CRAN (R 4.0.2)                          
 P gdtools         0.2.2      2020-04-03 [?] CRAN (R 4.0.2)                          
 P generics        0.0.2      2018-11-29 [?] CRAN (R 4.0.2)                          
 P glue            1.4.2      2020-08-27 [?] CRAN (R 4.0.2)                          
 P gtsummary       1.3.5      2020-09-29 [?] CRAN (R 4.0.2)                          
 P haven           2.3.1      2020-06-01 [?] CRAN (R 4.0.2)                          
 P here            0.1        2017-05-28 [?] CRAN (R 4.0.2)                          
 P hms             0.5.3      2020-01-08 [?] CRAN (R 4.0.2)                          
 P htmltools       0.5.0      2020-06-16 [?] CRAN (R 4.0.2)                          
 P httr            1.4.2      2020-07-20 [?] CRAN (R 4.0.2)                          
 P knitr           1.30       2020-09-22 [?] CRAN (R 4.0.3)                          
 P labelled        2.5.0      2020-06-17 [?] CRAN (R 4.0.2)                          
 P lifecycle       0.2.0      2020-03-06 [?] CRAN (R 4.0.2)                          
 P magrittr      * 1.5        2014-11-22 [?] CRAN (R 4.0.2)                          
 P officer         0.3.14     2020-09-07 [?] CRAN (R 4.0.2)                          
 P pillar          1.4.6      2020-07-10 [?] CRAN (R 4.0.2)                          
 P pkgconfig       2.0.3      2019-09-22 [?] CRAN (R 4.0.2)                          
 P png             0.1-7      2013-12-03 [?] CRAN (R 4.0.0)                          
 P purrr           0.3.4      2020-04-17 [?] CRAN (R 4.0.2)                          
 P R6              2.4.1      2019-11-12 [?] CRAN (R 4.0.2)                          
 P Rcpp            1.0.5      2020-07-06 [?] CRAN (R 4.0.2)                          
   renv            0.12.0     2020-08-28 [1] CRAN (R 4.0.2)                          
 P rlang           0.4.7      2020-07-09 [?] CRAN (R 4.0.2)                          
   rmarkdown       2.4.4      2020-10-15 [1] Github (rstudio/rmarkdown@64e8307)      
 P rprojroot       1.3-2      2018-01-03 [?] CRAN (R 4.0.2)                          
 P rsconnect       0.8.16     2019-12-13 [?] CRAN (R 4.0.2)                          
 P rstudioapi      0.11       2020-02-07 [?] CRAN (R 4.0.2)                          
 P sessioninfo     1.1.1      2018-11-05 [?] CRAN (R 4.0.2)                          
 P stringi         1.4.6      2020-02-17 [?] CRAN (R 4.0.0)                          
 P stringr         1.4.0      2019-02-10 [?] CRAN (R 4.0.2)                          
 P systemfonts     0.3.2      2020-09-29 [?] CRAN (R 4.0.2)                          
 P tibble          3.0.3      2020-07-10 [?] CRAN (R 4.0.2)                          
 P tidyr           1.1.2      2020-08-27 [?] CRAN (R 4.0.2)                          
 P tidyselect      1.1.0      2020-05-11 [?] CRAN (R 4.0.2)                          
 P uuid            0.1-4      2020-02-26 [?] CRAN (R 4.0.0)                          
 P vctrs           0.3.4      2020-08-29 [?] CRAN (R 4.0.2)                          
   withr           2.3.0      2020-09-22 [1] CRAN (R 4.0.2)                          
 P xaringan        0.17.4     2020-10-20 [?] Github (yihui/xaringan@8c921da)         
 P xaringanExtra   0.2.3.9000 2020-10-20 [?] Github (gadenbuie/xaringanExtra@0b8e76e)
 P xfun            0.18       2020-09-29 [?] CRAN (R 4.0.3)                          
 P xml2            1.3.2      2020-04-23 [?] CRAN (R 4.0.2)                          
 P yaml            2.2.1      2020-02-01 [?] CRAN (R 4.0.2)                          
 P zip             2.1.0      2020-08-10 [?] CRAN (R 4.0.2)                          

[2] C:/Users/jonathan.sidi/AppData/Local/Temp/RtmpKyc2S8/renv-system-library

 P -- Loaded and on-disk path mismatch.

Panelset and not repeating code

I was hoping to use panelset to show code in one panel and the resulting plot/output and the other. I expected the following to work putting together the examples on the xaringanExtra page and here. However, the plot on the second panel doesn't show up. Am I missing something or is this a bug? Thank you!

Code:

    ---
    output:
      xaringan::moon_reader:
        lib_dir: libs
    ---
    
    ```{r xaringan-panelset, echo=FALSE}
    xaringanExtra::use_panelset()
    ```
    
    .panelset[
    .panel[.panel-name[R Code]
    
    ```{r panel-chunk, fig.show='hide'}
    plot(cars)
    ```
    ]
    
    .panel[.panel-name[Plot]
    ```{r ref.label="panel-chunk", echo=FALSE}
    ```
    ]
    ]

Output:

Screenshot 2020-09-03 at 19 50 42

Screenshot 2020-09-03 at 19 51 09

Panelset freezes on Safari

When using multiple panelsets in my xaringan slides (i.e., in different slides but several times over the course of a presentation) I notice that by browser freezes from time to time. Specifically, I am no longer able to move forward or backward in the presentation using arrows or by typing the number of the slide I'd like to move to. My current workaround is to simple reload the presentation (cntr + r) and then continue, at which point the arrow keys work as normal. I initially thought it may have something to do with using the same names for panelsets (i.e., "code", "plot") over the course of the presentations, but I have tested with different names and get the same issue. This behavior doesn't seem to occur when I use firefox.

Blurry slide content when using use_extra_styles(hover_code_line = TRUE)

Hi @gadenbuie,

I was testing out the new use_extra_styles() features that were recently added to {xaringanExtra} and I noticed that for xaringanExtra::use_extra_styles(hover_code_line = TRUE) the entire slide becomes slightly blurry when hovering a code line.

Is this expected behaviour? Not sure if this is just a me issue or if you have experienced this also.

Feature: Fake Panelset

Now that I've seen Panelset used in the wild, I think one thing people often want are horizontal headings for slides. It might be worth creating an alternate Panelset that works just for xaringan and that actually creates additional slides (or formats additional slides correctly) instead of tabs inside of slides.

This would resolve printing issues and would also ensure that slide transitions work completely as expected. Currently you can't move through tabs if incrementing the slide from the presenter view, for example.

Share again- minor typo

"Viwe in Full Screen" upon hover (see screenshot)

Also, bravo- this is such a fantastic feature!
Screen Shot 2020-08-22 at 1 38 23 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.