Quarto-Popover-Glossary

This extension provides shortcodes for popover-glossary in quarto. It uses the Popper library to create popovers with glossary definitions.

popover-glossary is based on quarto-glossary by Lisa DeBruine. Most code and documentation, including the majority of this web page, is from quarto-glossary.

Setup

Installing

quarto install extension maouw/quarto-popover-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).

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:

popover-glossary:
  path: glossary.yml

Set path to the path to your glossary YAML file.

Examples

The simplest use starts with the word term and then the term to be defined. Click on the underlined word to see a pop-up definition.

{{< term SESOI >}}

SESOI

No need to change if you’re just using different case:

{{< term sesoi >}}

sesoi

Use quotes if your term is more than one word.

{{< term "effect size" >}}

effect size

You can use Markdown or HTML in the definition, too:

{{< term html >}}

html

If you want the link to display something different from the term, append a pipe (|) character and the display text.

{{< term "alpha|alpha criterion" >}}

The alpha criterion is…

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.

{{< term quarto def="An open-source scientific and technical publishing system" >}}

quarto

Add to Definition List

If you don’t want to add a glossary item to the definition list, set add_to_deflist=false.

{{< term SESOI add_to_deflist=true >}}

SESOI

{{< term R def="The best language" add_to_deflist=false >}}

R

Definition List

If you set deflist=true, you will get a glossary definition list with all the terms you’ve defined on this page.

{{< term deflist=true >}}

effect size

‘quantitative reflection of the magnitude of some phenomenon that is used for the purpose of addressing a question of interest’ (Kelley & Preacher, 2012)

html

This is a paragraph with a link.

And another paragraph before a list:

  • Item 1
  • List 2
quarto
An open-source scientific and technical publishing system
sesoi

Smallest Effect Size of Interest: the smallest effect that is theoretically or practically meaningful

See Equivalence Testing for Psychological Research for a tutorial on methods for choosing an SESOI.