-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.qmd
119 lines (64 loc) · 3.63 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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Quarto-glossary
This extension provides shortcodes for [glossary](https://github.com/debruine/quarto-glossary) in quarto.
## Setup
### Installing
```sh
quarto install extension debruine/quarto-glossary
```
This will install the extension under the `_extensions` subdirectory. If you're using version control, you will want to check in this directory.
### Glossary file
You can store definitions in a YAML file. Use markdown to create paragraphs, links, and lists. Make sure each new line in a definition is indented two spaces (sorry YAML is a bit picky, but it's the best human-editable solution).
``` yaml
SESOI: |
Smallest Effect Size of Interest: the smallest effect that is theoretically or practically meaningful
See [Equivalence Testing for Psychological Research](https://doi.org/10.1177/2515245918770963) for a tutorial on methods for choosing an SESOI.
p-value: |
The probability of the observed data, or more extreme data, if the null hypothesis is true. The lower the p-value, the higher the test statistic, and less likely it is to observe the data if the null hypothesis is true.
```
### Defaults
In the YAML header of your document, or the _quarto.yml file for your book or website, add the following defaults:
``` yaml
glossary:
path: glossary.yml
popup: click
show: true
```
Set path to the path to your glossary YAML file, popup to "click", "hover", or "none", and show to true or false. You can change these defaults for any individual inline glossary item.
## Examples
The simplest use starts with the word `glossary` and then the term to be defined. Click on the underlined word to see a pop-up definition.
`{{{< glossary power >}}}`
{{< glossary power >}}
### Display
No need to change if you're just using different case:
`{{{< glossary Power >}}}`
{{< glossary Power >}}
Use quotes if your term is more than one word.
`{{{< glossary "effect size" >}}}`
{{< glossary "effect size" >}}
Add a `display` argument if you want to display something different than the term:
`{{{< glossary alpha display="alpha criterion" >}}}`
{{< glossary alpha display="alpha criterion" >}}
### Popups
The default is "click", which allows you to use styled html in the popup (see [Styles](#styles) below).
`{{{< glossary alpha popup="click" >}}}`
{{< glossary alpha popup="click" >}}
The "hover" option uses the web browser's built-in tooltip styles, so you can't use html in the definitions. However, you can now set the click event to open a link.
`[{{{< glossary alpha popup="hover" >}}}](https://psyteachr.github.io/glossary/a#alpha)`
[{{< glossary alpha popup="hover" >}}](https://psyteachr.github.io/glossary/a#alpha)
Set popup to "none" if you want to add the definition to the glossary table, but not use a popup.
`{{{< glossary alpha popup="none" >}}}`
{{< glossary alpha popup="none" >}}
### Definitions
If you need to include a definition for a term that is not in the glossary file or is different from the one in the glossary file, you can set the `def` argument.
`{{{< glossary quarto def="An open-source scientific and technical publishing system" >}}}`
{{< glossary quarto def="An open-source scientific and technical publishing system" >}}
### Add to Table
If you don't want to add a glossary item to the table, set `add_to_table=false`.
`{{{< glossary SESOI add_to_table=true >}}}`
{{< glossary SESOI add_to_table=true >}}
`{{{< glossary R def="The best language" add_to_table=false >}}}`
{{< glossary R def="The best language" add_to_table=false >}}
### Table
If you set `table=true`, you will get a glossary table with all the terms you've defined on this page.
`{{{< glossary table=true >}}}`
{{< glossary table=true >}}