-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d10b2a4
commit e2a9146
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## The MIT Licence | ||
Copyright (c) 2024 quarto-drop authors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Quarto Drop plugin for reveal.js | ||
|
||
Have you ever given a talk or presentation and wanted an R or Python console *right there* in your slides for some quick throwaway examples or demos? Do you find switching to another window or desktop so that you can show some work in an IDE fiddly and distracting? | ||
|
||
Then this plugin is for you. With Quarto Drop, you can press a shortcut key to immediately drop down from the top of the slide an interactive R or Python console, editor and plotting window. The same shortcut key then dismisses the console. | ||
|
||
Show your demo then dismiss the console. Later, on another slide, you can drop it down again and state is maintained over multiple slides. | ||
|
||
Code execution is powered by WebAssembly, using [webR](https://docs.r-wasm.org) and [Pyodide](https://pyodide.org). No R or Python execution servers are required. | ||
|
||
## Usage | ||
|
||
1. Install the Quarto Drop extension: | ||
|
||
```bash | ||
quarto add r-wasm/quarto-drop | ||
``` | ||
|
||
2. Add the plugin to your reveal.js slides, as part of your `yaml` header: | ||
|
||
```yaml | ||
--- | ||
format: revealjs | ||
revealjs-plugins: | ||
- drop | ||
--- | ||
``` | ||
|
||
3. During the presentation, press the drop shortcut. By default, it is the backtick key: "`". Alternatively, press the console button at the bottom left of the slide. | ||
|
||
## Configuration | ||
|
||
#### Change the shortcut key and console button visibility: | ||
|
||
```yaml | ||
format: | ||
revealjs: | ||
drop: | ||
shortcut: "]" | ||
button: false | ||
``` | ||
#### Execute Python code | ||
```yaml | ||
format: | ||
revealjs: | ||
drop: | ||
engine: pyodide | ||
``` | ||
#### Load packages automatically on page load | ||
```yaml | ||
format: | ||
revealjs: | ||
drop: | ||
engine: webr | ||
webr: | ||
packages: | ||
- ggplot2 | ||
- dplyr | ||
``` | ||