From 4bdca090abc970b742f0653a02aa77d9adc95602 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 1 Oct 2026 15:33:35 -0300 Subject: The guide's glossary is a definition list, and the site's tutor links its pointers into the guide On the site the glossary is a
of terms and meanings inside its
, with no stray count, so a text browser reads each term then its meaning. The tutor page links docs/typ/.typ to that page, each "-> Guide:
" to the guide's section of that title (read from guide.typ's headings), and URLs; the tutor itself keeps its text. Co-Authored-By: Claude Opus 5.5 --- docs/typ/style.typ | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'docs/typ/style.typ') 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
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] -- cgit v1.3