-
Notifications
You must be signed in to change notification settings - Fork 2
/
beamer.qmd
52 lines (47 loc) · 1.35 KB
/
beamer.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
---
title: "Quarto Pseudocode Extension Example"
filters:
- pseudocode
pseudocode:
caption-prefix: "Algorithm"
reference-prefix: "Algorithm"
caption-number: true
format:
beamer:
include-in-header:
text: |
\usepackage{xeCJK}
pdf-engine: xelatex
keep-tex: true
---
## Test atoms
Test atoms is shown as @alg-test-atoms.
\renewcommand{\Return}{\State \textbf{return}~}
\newcommand{\Print}{\State \textbf{print}~}
\newcommand{\Break}{\State \textbf{break}}
\newcommand{\Continue}{\State \textbf{continue}}
\newcommand{\True}{\textbf{true}}
\newcommand{\False}{\textbf{false}}
\renewcommand{\And}{\textbf{and}~}
\newcommand{\Or}{\textbf{or}~}
\renewcommand{\Not}{\textbf{not}~}
\newcommand{\To}{\textbf{to}~}
\newcommand{\DownTo}{\textbf{downto}~}
```pseudocode
#| label: alg-test-atoms
#| html-line-number: false
#| html-no-end: true
#| pdf-line-number: false
#| pdf-placement: "H"
\begin{algorithm}
\caption{Test atoms}
\begin{algorithmic}
\State \textbf{Specials:} \{ \} \$ \& \# \% \_
\State \textbf{Bools:} \And \Or \Not \True \False
\State \textbf{Carriage return:} first line \\ second line
\State \textbf{Text-symbols:} \textbackslash
\State \textbf{Quote-symbols:} `single quotes', ``double quotes''
\State \textbf{Math:} $(\mathcal{C}_m)$, $i \gets i + 1$, $E=mc^2$, \( x^n + y^n = z^n \), $\$$, \(\$\)
\end{algorithmic}
\end{algorithm}
```