-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.qmd
55 lines (39 loc) · 1.49 KB
/
index.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
---
title: Quarto-qrcode example
format:
html: default
pdf: default
---
Examples for <https://github.com/jmbuhr/quarto-qrcode>
# Usage
## HTML
`{{{< qrcode https://jmbuhr.de >}}}`
{{< qrcode https://jmbuhr.de >}}
`{{{< qrcode https://quarto.org >}}}`
{{< qrcode https://quarto.org >}}
You can supply an ID as the second argument (`qr1` and `qr2` in the next two examples), but it's not required.
Use keyword arguments to change the style of the qrcode ([available options](https://davidshimjs.github.io/qrcodejs/)).
`{{{< qrcode https://jmbuhr.de qr1 width=100 height=100 colorDark='#0011bb' >}}}`
{{< qrcode https://jmbuhr.de qr1 width=100 height=100 colorDark='#0011bb' >}}
`{{{< qrcode https://jmbuhr.de qr2 width=100 height=100 colorDark='#0011bb' >}}}`
{{< qrcode https://jmbuhr.de qr2 width=100 height=100 colorDark='#0011bb' >}}
Style your qrcodes with the `qrcode` css class on the surrounding div.
```html
<style>
.qrcode {
margin-bottom: 1rem;
}
</style>
```
<style>
.qrcode {
margin-bottom: 1rem;
}
</style>
## PDF
For options specific to pdf output such as the height of the qrcode in a unit that tex can understand,
append `pdf` to the name of the option to be passed to the [qrcode CTAN package]().
`{{{< qrcode https://jmbuhr.de qr1 width=100 height=100 pdfheigth=4cm >}}}`
{{< qrcode https://jmbuhr.de qr1 width=100 height=100 pdfheight=4cm >}}
`{{{< qrcode https://jmbuhr.de qr1 width=100 height=100 pdfnolink >}}}`
{{< qrcode https://jmbuhr.de qr1 width=100 height=100 pdfnolink >}}