Skip to content

Commit d06a1c5

Browse files
committed
aula 34
1 parent 54044e2 commit d06a1c5

File tree

12 files changed

+3735
-8
lines changed

12 files changed

+3735
-8
lines changed

R_tras_pra_Frente/Aula34_RmdAvancado/Aula34_Rmarkdown_avancado.qmd

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ knitr:
2020
warnings: false
2121
filters:
2222
- roughnotation
23-
editor: visual
23+
editor: source
2424
---
2525

2626
## Esta semana
@@ -66,7 +66,7 @@ pacman::p_load(tidyverse, gt, kableExtra, htmltools,
6666

6767
. . .
6868

69-
<center><img src="img/ciclo.png" width="760px"/></center>
69+
<center><img src="../img/ciclo.png" width="760px"/></center>
7070

7171
- Muito tempo + softwares + profissionais
7272

@@ -80,7 +80,7 @@ pacman::p_load(tidyverse, gt, kableExtra, htmltools,
8080

8181
. . .
8282

83-
![](img/repro.jpeg){fig-align="center" width="528"}
83+
![](../img/repro.jpeg){fig-align="center" width="528"}
8484

8585
## Bons costumes: projetos
8686

@@ -94,7 +94,7 @@ pacman::p_load(tidyverse, gt, kableExtra, htmltools,
9494

9595
. . .
9696

97-
![](images/proj-01.png){fig-align="center"}
97+
![](../img/proj-01.png){fig-align="center"}
9898

9999
## Revisando: Estrutura do RMarkdown
100100

@@ -110,13 +110,13 @@ pacman::p_load(tidyverse, gt, kableExtra, htmltools,
110110
:::
111111

112112
::: {.column width="80%"}
113-
![](img/tela_markdown.png){fig-align="center" width="700"}
113+
![](../img/tela_markdown.png){fig-align="center" width="700"}
114114
:::
115115
:::
116116

117117
. . .
118118

119-
![](images/proj.png){fig-align="center" width="477"}
119+
![](../img/proj.png){fig-align="center" width="477"}
120120

121121
## Opções no
122122

@@ -146,7 +146,7 @@ knitr::opts_chunk$set(echo = FALSE,
146146
warning= FALSE)
147147
```
148148

149-
Mais coisas no site do [YiHui](https://yihui.org/knitr/options/)
149+
Mais coisas no site do [YiHui](https://yihui.org/knitr/options/)
150150

151151
## Outros formatos...
152152

@@ -527,7 +527,7 @@ $endif$
527527
\begin{center}
528528
\begin{figure}[h!]
529529
\centering
530-
\includegraphics[scale = 0.8]{img/unb.png}
530+
\includegraphics[scale = 0.8]{../img/unb.png}
531531
\label{fig:unb}
532532
\end{figure}
533533
{\bf Universidade de Brasília \\
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
title: RoughNotations
2+
author: Emil Hvitfeldt
3+
version: 1.0.0
4+
contributes:
5+
filters:
6+
- rough.lua

R_tras_pra_Frente/Aula34_RmdAvancado/_extensions/EmilHvitfeldt/roughnotation/assets/rough-notation.iife.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
document.addEventListener("DOMContentLoaded", function () {
2+
var rn_counter = 0;
3+
4+
Reveal.on("slidechanged", (event) => {
5+
rn_counter = 0;
6+
});
7+
8+
function strictly_false(x) {
9+
var out = true;
10+
if (x === "false") {
11+
out = false;
12+
}
13+
return out;
14+
}
15+
16+
Reveal.addKeyBinding(
17+
{ keyCode: 82, key: "R", description: "Trigger RoughNotation" },
18+
function () {
19+
rn_counter = rn_counter + 1;
20+
21+
const slide = Reveal.getCurrentSlide();
22+
const divs = Array.from(slide.querySelectorAll(".rn"));
23+
const new_divs = divs
24+
.filter(function (rn) {
25+
if (rn_counter == 1) {
26+
if (rn.dataset.rnIndex > 1) {
27+
return false;
28+
}
29+
} else {
30+
if (typeof rn.dataset.rnIndex == "undefined") {
31+
return false;
32+
}
33+
if (rn.dataset.rnIndex != rn_counter) {
34+
return false;
35+
}
36+
}
37+
return true;
38+
})
39+
.map(function (rn) {
40+
return RoughNotation.annotate(rn, {
41+
type: rn.dataset.rnType || "highlight",
42+
animate: strictly_false(rn.dataset.rnAnimate),
43+
animationDuration: parseInt(rn.dataset.rnAnimationduration) || 800,
44+
color: rn.dataset.rnColor || "#fff17680",
45+
strokeWidth: parseInt(rn.dataset.rnStrokewidth) || 1,
46+
multiline: strictly_false(rn.dataset.rnMultiline),
47+
iterations: parseInt(rn.dataset.rnIterations) || 2,
48+
rtl: !strictly_false(rn.dataset.rnRtl),
49+
});
50+
});
51+
52+
new_divs.map(function (rn) {
53+
rn.show();
54+
});
55+
}
56+
);
57+
})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function Meta(m)
2+
quarto.doc.addHtmlDependency({
3+
name = "roughnotation",
4+
version = "0.5.1",
5+
scripts = {"assets/rough-notation.iife.js"}
6+
})
7+
quarto.doc.addHtmlDependency({
8+
name = "roughnotation-init",
9+
version = "1.0.0",
10+
scripts = {"rough.js"}
11+
})
12+
end

0 commit comments

Comments
 (0)