My Glossary
The glossary is a simple YAML file with the following structure:
- reference: this is used to refer to a glossary entry
- term: this is the complete glossary term
- defn: this is the definition for the term
- math: this is a Mathjax formula
- pict: this is a url to an image file (200px wide)
Here is an example entry for mean
:
mean:
term: mean
defn: The mean is the average of all numbers and is sometimes called the arithmetic mean. To calculate mean, add together all of the numbers in a set and then divide the sum by the total count of numbers. In a normal distribution, the mean is found at the exact center of the curve and is coincident with the peak. The mean, median, and mode of a standard curve are all identical.
math: $$\mu = \frac{\bigg(\displaystyle\sum\limits_{i=1}^{N} X_i\bigg)}{N}$$
pict: /images/glossary/mean.png
In addition to acting as a glossary, the definitions for the terms can be used to populate bootstrap tooltips. I have created a TextExpander shortcut to create tooltips in my pages. The text for this shortcut is given here:
<a name="%filltext:name=defn%" href="#%filltext:name=defn%" data-toggle="tooltip" data-original-title="{{site.data.glossary.%filltext:name=defn%.defn}}">{{site.data.glossary.%filltext:name=defn%.term}}</a>
Here is the tooltip for mean. The images or math equations in the glossary can also be repurposed. These can be added to pages using liquid tags. The formula for the mean can be added with this liquid tag:
{{site.data.glossary.mean.math}}
When included into a page, it would look like this:
Perhaps I will find additional uses for this glossary in the future. For now, I need to get busy deciding what to include and authoring the content.