Mini-tutorial do Quarto no RStudio
Linha mágica para commit
-A && git commit -m "staging all files" git add
Formatação básica
Comentários no Quarto
<!-- Aqui vai o comentário -->
Esse estilo de comentário é herdado do HTML e é uma porcaria.
Novo parágrafo
Dois espaços no final da linha criam um novo parágrafo
<br>
vem do HTML e também cria um parágrafo.
Texto:
*Itálico*
**Negrito**
***Negrito e itálico***
^2^ / subscript~2~
superscript~~strikethrough~~
Cabeçalhos
# Header 1
## Header 2
## Header 3
...###### Header 6
Existem várias opções do revealjs para headers. Ver depois.
Links e imagens:
://quarto.org) #Link
[Quarto](https #Imagem
](https://quarto.org) #Link de Imagem
[{width=300}
{width=80%}
{fig-align="left"}
:
Posição absoluta{.absolute top=200 left=0 width="350" height="300"}
Literais
Literais em uma linha entre crases:
`aqui vai literal`
Literais em mais de uma linha:
4 crases (````) no início e no final do texto. Coloque
Às vezes dá um resultado meio bizarro. Coisa chata.
Listas
* unordered list
+ sub-item 1
+ sub-item 2
- sub-sub-item 1
1. ordered list
2. item 2
) sub-item 1
i-sub-item 1 A. sub
Tabelas
Tabelas simples
| Right | Left | Default | Center |
|------:|:-----|---------|:------:|
| 12 | 12 | 12 | 12 |
| 123 | 123 | 123 | 123 |
| 1 | 1 | 1 | 1 |
Tabelas com grid
+---------------+---------------+--------------------+
| Fruit | Price | Advantages |
+===============+===============+====================+
| Bananas | $1.34 | - built-in wrapper |
| | | - bright color |
+---------------+---------------+--------------------+
| Oranges | $2.10 | - cures scurvy |
| | | - tasty |
+---------------+---------------+--------------------+
: Sample grid table.
Existem outras opções de tabelas. Esta é a mais simples.
Fórmulas
$E = mc^{2}$ para inline
ou$$E = mc^{2}$$ para centro da linha
Estas são fórmulas do Markdown. Para fórmulas mais complexas, existe o LaTeX.
Notas de margem
::: {.column-margin}
*the first fundamental theorem of calculus*
We know from :::
Diagramas
{mermaid}
flowchart LR--> B(Round edge)
A[Hard edge] --> C{Decision}
B --> D[Result one]
C --> E[Result two]
C
Veja em mermaid.js.org
Mermaid é uma biblioteca JS para criar diagramas online baseado numa linguagem específica.
Destaque de textos
callout (avisos)
:::{.callout-note}
:
Note that there are five types of callouts, including`note`, `tip`, `warning`, `caution`, and `important`.
:::
Blockquote
> Bloco destacado
Blockquote mais de uma linha.
| Line Block
| Spaces and newlines
| are preserved
Os espaços e formatação são todos preservados.
Layouts
Duas colunas
::: {layout-ncol=2}
asdasd
asdasd:::
Múltiplas colunas
2 e a segunda com 1 gráfico, todos com o mesmo tamanho.
Duas linhas, a primeira com ::: {layout="[[1,1], [1]]"}



:::
:
Para layout com percentuais::: {layout="[[40,-20,40], [100]]"}
HTML - cabeçalhos
- Antes do html
: true
toc-depth: 4
toc-location: left
toc- Depois do html
: default (Outros em https://quarto.org/docs/output-formats/html-themes.html)
theme-math-method: katex
html-tools: true
code-line-numbers: false
code-contained: false self
Revealjs - Apresentações
Nova página
--- #Três ou mais tracinhos
## Header 2 também cria nova página
####hox ::: Box ou info-box
asdasd
:::
Incremental
- Para tudo ser incremental, no cabeçalho colocar incremental: true
- Para tornar uma lista particular incremental:
::: {.incremental}
- Eat spaghetti
- Drink wine
:::
Colunas múltiplas
:::: {.columns}
::: {.column width="40%"}
contents...:::
::: {.column width="60%"}
contents...:::
::::
Smaller fonts
## Slide Title {.smaller}
scrollable
## Slide Title {.scrollable}
Notas do apresentador
::: {.notes}
Speaker notes go here.:::
Temas
: default
theme: https://quarto.org/docs/presentations/revealjs/ Outros
Slide com diferente background
## Título {background-color="aquamarine"}
Texto incremental num box
::: columns
::: {.column .box width="40%"}
MATERIALS AND METHODS
*Experimental design* **(condensed version)**
- **Experimental plots were planted with different plant communities spanning [plant diversity gradient of one, four, and 16 species]{.fragment .highlight-blue}, which were randomly chosen from the species listed (5 plant functional groups -- 19 species in total)**
- [Plots were divided into three subplots]{.fragment .highlight-red}
:::
::: {.column width="56%"}
::: fragment
in fact a **split-plot design**!
This is :::
::: fragment
:::
:::
:::