-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path02-examples.qmd
67 lines (50 loc) · 1.58 KB
/
02-examples.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
# Examples
## Test cross reference in different files
Quicksort algorithm is shown as @alg-quicksort (using `@alg-quicksort`). Build-in cross reference in different files works only with `pdf` format.
Quicksort algorithm is shown as @algo-quicksort (using `@algo-quicksort`). Quarto custom cross reference in different files works both with `html` and `pdf` format.
## Test Quarto custom cross reference
Test 1 is shown as @alg-test-1 (using `@alg-test-1`) and @algo-test-1 (using `@algo-test-1`).
::: {#algo-test-1}
```pseudocode
#| label: alg-test-1
\begin{algorithm}
\begin{algorithmic}
\Procedure{Test-Quarto-Custom-Cross-Reference}{}
\State QUARTO CUSTOM CROSS REFERENCE
\EndProcedure
\end{algorithmic}
\end{algorithm}
```
Test Quarto custom cross reference 1
:::
Test 2 is shown as @alg-test-2 (using `@alg-test-2`) and @algo-test-2 (using `@algo-test-2`).
::: {#algo-test-2}
```pseudocode
#| label: alg-test-2
\begin{algorithm}
\caption{Test Quarto custom cross reference 2}
\begin{algorithmic}
\Procedure{Test-Quarto-Custom-Cross-Reference}{}
\State QUARTO CUSTOM CROSS REFERENCE
\EndProcedure
\end{algorithmic}
\end{algorithm}
```
:::
Test 3 is shown as @alg-test-3 (using `@alg-test-3`) and @algo-test-3 (using `@algo-test-3`).
::: {#algo-test-3}
```pseudocode
#| label: alg-test-3
\begin{algorithm}
\caption{Test Quarto custom cross reference 3}
\begin{algorithmic}
\Procedure{Test-Quarto-Custom-Cross-Reference}{}
\State QUARTO CUSTOM CROSS REFERENCE
\EndProcedure
\end{algorithmic}
\end{algorithm}
```
Test Quarto custom cross reference 3
:::
\listofalgorithms{}
\listofalgos{}