diff options
Diffstat (limited to 'docs/typ')
| -rw-r--r-- | docs/typ/style.typ | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/typ/style.typ b/docs/typ/style.typ index 9753eedf..f651878f 100644 --- a/docs/typ/style.typ +++ b/docs/typ/style.typ @@ -329,9 +329,13 @@ /// and the table; in HTML a <details> that starts closed, its summary the /// heading and the count, so a reader who knows the words skips them. #let glossary(title, lbl, ..cells) = context if html-out() { + // a real definition list, so a text browser reads term, then meaning html.elem("details", attrs: (class: "glossary"), { - html.elem("summary", [#heading(title) #lbl #html.elem("span", attrs: (class: "count"), "(" + str(calc.quo(cells.pos().len(), 2)) + ")")]) - pairs(..cells) + html.elem("summary", [#heading(title) #lbl]) + html.elem("dl", for (term, meaning) in cells.pos().chunks(2) { + html.elem("dt", term) + html.elem("dd", meaning) + }) }) } else { [#heading(title) #lbl] |
