-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.qmd
79 lines (52 loc) · 1.61 KB
/
example.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
title: "Cross Referencing the Name (section name, fig-name, table-name)"
author: Shafayet Khan Shafee
date: last-modified
date-format: "DD MMM, YYYY"
format:
html:
code-tools: true
pdf: default
number-sections: true
df-print: kable
filters:
- nameref
---
> View the source code of this document by clicking `</> Code` on top right corner.
# Why Quarto is so great {#sec-stack}
`r stringi::stri_rand_lipsum(1)`. See \nameref{sec-stack}. Also you can use quarto way to refer to @sec-stack.
## How it is so {#how}
`r stringi::stri_rand_lipsum(1)`. See \nameref{how}.
## Images
```{r}
#| link-id: fig1
#| link-title: My Awesome plot
#| label: fig-random-plot
#| fig-cap: "An useless plot for demo"
plot(1:10)
```
`r stringi::stri_rand_lipsum(1)`. See \nameref{fig1}. And you can use quarto way to refer to @fig-random-plot.
## Tables
```{r}
#| link-id: tab1
#| link-title: Mtcars Data
#| label: tbl-mtcars
#| tbl-cap: First five row of mtcars data
head(mtcars)
```
`r stringi::stri_rand_lipsum(1)`. See \nameref{tab1}. And you can use quarto way to refer to @tbl-mtcars.
# Markdown Images
::: {.link link-id="fig2" link-title="Scatter plot"}
![mpg ~ hp](images/mpg.png){#fig-fig2}
:::
`r stringi::stri_rand_lipsum(4)`. See \nameref{fig2}. And you can use quarto way to refer to @fig-fig2.
# Markdown Table
::: {.link link-id="tab2" link-title="Markdown table"}
| Col1 | Col2 | Col3 |
|------|------|------|
| A | B | C |
| E | F | G |
| A | G | G |
: My Caption {#tbl-tab2}
:::
`r stringi::stri_rand_lipsum(4)`. See \nameref{tab2}. And you can use quarto way to refer to @tbl-tab2.