xaringanExtra::use_remark_macros(x)
May I suggest a xaringanExtra::use_remark_macros(x), which places a macros.js file into the slide directory with the functionality specified by character vector "x". Below are some suggested values and corresponding macros:
- "scale":
Macro for scaling images, e.g.
, The discussion and code. Also discussed in the RMD bible - "tweet" Macro for embedding tweets. Provided by Twitter, but may very well be wrapped for friendlier UI. Code and discussion
- "alert" Macro for standard alerts and messages.
- "columns" Excellent ideas by @emilyriederer for creating layout structure in macros
- "class" and "gen" Some ideas by Yongfu Liao in the Chocolate theme. He is able to make round corners and image shadow with it.
- "abs" For absolute placement of images. Again Yongfu Liao in his blogpost
There are some more ideas: sourcing JS scripts, calculating how long the current presentation should take, macro for adding macros (how meta!), random number generation
One thing to keep in mind: there should be clear separation between what can be done in tachyons and what spills here.
@dmi3kno : where can I find more information on how to use JS macros on a presentation? I am keen to try out a "typewriter carousel" but can't find a straightforward way to do so. Cheers