Skip to content

Latest commit

 

History

History
235 lines (143 loc) · 4.09 KB

extensions.md

File metadata and controls

235 lines (143 loc) · 4.09 KB

Custom extensions

Macros

<iframe src="https://giphy.com/embed/Y4UvJMJSdA5qWir7Bh" width="100%" height="100%" style="position:absolute" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>

via GIPHY

Single Line:

@author

Parameters @0 ... @9

@highlight(green, this is shall be red)

@highlight(#F00, BUT THIS TIME it is red)

Multi Line ... @end

@LICENSE

JavaScript

!?Media for Thinking the Unthinkable

Starting simple

<script>2**4</script>

Combining scripts

<script input="range" default="2" output="x"> @input </script>

to the power of 2 is

<script> @input(`x`) ** 2 </script>

Combining JS & Macros

<script input="range" default="0" output="n"> @input </script>
x x^n
1 @pow(1)
2 @pow(2)
3 @pow(3)
4 @pow(4)
5 @pow(5)
6 @pow(6)
7 @pow(7)
8 @pow(8)

Reducing Complexity

@CSV(https://raw.githubusercontent.com/arcus/LIEAF2022_workshop/main/data/health_expenditure.csv)

@CSV

Where to find extensions

here

VTK - example

@VTK.loadIframe(https://kitware.github.io/vtk-js-datasets/data/vti/head-binary-zlib.vti)

R - example

library(ggplot2)

# Use stdout as per normal...
print("Hello, world!")

# Use plots...
png(file="out1.png")
plot(cars)

# Even ggplot!
png(file="out2.png")
qplot(wt, mpg, data = mtcars, colour = factor(cyl))

@LIA.r

ABC - example

% audio: true
% autoplay: false
% notes: true
% responsive: true
X: 1
T: Cooley's
M: 4/4
L: 1/8
K: Emin
|:D2|"Em"EBBA B2 EB|~B2 AB dBAG|"D"FDAD BDAD|FDAD dAFD|
"Em"EBBA B2 EB|B2 AB defg|"D"afe^c dBAF|"Em"DEFD E2:|
|:gf|"Em"eB B2 efge|eB B2 gedB|"D"A2 FA DAFA|A2 FA defg|
"Em"eB B2 eBgB|eB B2 defg|"D"afe^c dBAF|"Em"DEFD E2:|

@ABCJS.eval

lightweight - ClassRoom

What is $2^4$?

[( )] 2 [( )] 4 [( )] 8 [(X)] 16


Rate this presentation?

[(5)] Far exceeded my expectations. [(4)] Exceeded my expectations. [(3)] Met my expectations. [(2)] I’d expected more. [(1)] Way below my expectations.


Do you have any questions?

[[___ ___]]