-
Notifications
You must be signed in to change notification settings - Fork 12
/
example.qmd
38 lines (31 loc) · 1.69 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
---
title: Font Awesome Quarto Extension
format:
html: default
pdf: default
---
This extension allows you to use font-awesome icons in your Quarto HTML and PDF documents.
It provides an `{{{< fa >}}}` shortcode:
- Mandatory `<icon-name>`:
``` markdown
{{{< fa <icon-name> >}}}
```
- Optional `<group>`, `<size=...>`, and `<title=...>`:
``` markdown
{{{< fa <group> <icon-name> <size=...> <title=...> >}}}
```
For example:
| Shortcode | Icon |
| -------------------------------------------------- | ----------------------------------------- |
| `{{{< fa thumbs-up >}}}` | {{< fa thumbs-up >}} |
| `{{{< fa folder >}}}` | {{< fa folder >}} |
| `{{{< fa chess-pawn >}}}` | {{< fa chess-pawn >}} |
| `{{{< fa brands bluetooth >}}}` | {{< fa brands bluetooth >}} |
| `{{{< fa brands twitter size=2xl >}}}` (HTML only) | {{< fa brands twitter size=2xl >}} |
| `{{{< fa brands github size=5x >}}}` (HTML only) | {{< fa brands github size=5x >}} |
| `{{{< fa battery-half size=Huge >}}}` | {{< fa battery-half size=Huge >}} |
| `{{{< fa envelope title="An envelope" >}}}` | {{< fa envelope title="An envelope" >}} |
Note that the icon sets are currently not perfectly interchangeable across formats:
- `html` uses FontAwesome 6.4.2
- `pdf` uses the `fontawesome5` package, based on [FontAwesome 5](https://ctan.org/pkg/fontawesome5).
- Other formats are currently not supported, but PRs are always welcome!