diff --git a/preview/glossy/0.2.1/.gitignore b/preview/glossy/0.2.1/.gitignore new file mode 100644 index 0000000..f1ca904 --- /dev/null +++ b/preview/glossy/0.2.1/.gitignore @@ -0,0 +1,2 @@ +tests/**/out/ +tests/**/diff/ diff --git a/preview/glossy/0.2.1/README.md b/preview/glossy/0.2.1/README.md index d451000..4110aec 100644 --- a/preview/glossy/0.2.1/README.md +++ b/preview/glossy/0.2.1/README.md @@ -178,52 +178,10 @@ Control how terms appear in the document by providing a custom `show-term` funct #### Included Themes -Glossy comes with several built-in themes that can be used directly or serve as examples for custom themes: +Glossy comes with several built-in themes that can be used directly or serve as +examples for custom themes: -##### theme-twocol - -A professional two-column layout ideal for technical documentation. Features: - -- Two-column layout for efficient space usage -- Dotted leaders to page numbers -- Clear hierarchy with optional group headings -- Compact but readable formatting -- Terms in regular weight with long forms and descriptions inline - -```typst -#glossary(theme: theme-twocol) -``` - -##### theme-basic - -A traditional single-column layout similar to book glossaries. Features: - -- Bold terms with indented content -- Clear separation between entries -- Hanging indentation for wrapped lines -- Parenthetical long forms -- Page numbers with "pp." prefix -- Simple, clean design - -```typst -#glossary(theme: theme-basic) -``` - -##### theme-compact - -A space-efficient layout perfect for technical documents or appendices. Features: - -- Reduced vertical spacing -- Smaller font sizes for secondary information -- Color-coded term components -- Grid-based alignment -- Minimal decorative elements -- Gray text for supplementary information -- Bullet separators between components - -```typst -#glossary(theme: theme-compact) -``` +![theme gallery image](themeshots.png) #### Custom Themes diff --git a/preview/glossy/0.2.1/examples/readme.pdf b/preview/glossy/0.2.1/examples/readme.pdf deleted file mode 100644 index a5209d3..0000000 Binary files a/preview/glossy/0.2.1/examples/readme.pdf and /dev/null differ diff --git a/preview/glossy/0.2.1/tests/demo/ref/1.png b/preview/glossy/0.2.1/tests/demo/ref/1.png new file mode 100644 index 0000000..87cf531 Binary files /dev/null and b/preview/glossy/0.2.1/tests/demo/ref/1.png differ diff --git a/preview/glossy/0.2.1/examples/readme.typ b/preview/glossy/0.2.1/tests/demo/test.typ similarity index 98% rename from preview/glossy/0.2.1/examples/readme.typ rename to preview/glossy/0.2.1/tests/demo/test.typ index 92bd9bc..3b2b7d9 100644 --- a/preview/glossy/0.2.1/examples/readme.typ +++ b/preview/glossy/0.2.1/tests/demo/test.typ @@ -1,6 +1,6 @@ // a minimal example, also listed in the README -#import "@preview/glossy:0.2.1": * +#import "/lib.typ": * #let myGlossary = ( html: ( diff --git a/preview/glossy/0.2.1/tests/sorting/ref/1.png b/preview/glossy/0.2.1/tests/sorting/ref/1.png new file mode 100644 index 0000000..b6e1b0a Binary files /dev/null and b/preview/glossy/0.2.1/tests/sorting/ref/1.png differ diff --git a/preview/glossy/0.2.1/tests/sorting/test.typ b/preview/glossy/0.2.1/tests/sorting/test.typ new file mode 100644 index 0000000..fc7b1bc --- /dev/null +++ b/preview/glossy/0.2.1/tests/sorting/test.typ @@ -0,0 +1,38 @@ +#import "/lib.typ": * + +#let myGlossary = ( + html: ( + short: "HTML", + long: "Hypertext Markup Language", + description: "A standard language for creating web pages", + ), + iphone: ( + short: "iPhone", + long: "iPhone", + ), + css: ( + short: "CSS", + long: "Cascading Style Sheets", + description: "A language used for describing the presentation of a document", + ), + atom: ( + short: "atom", + long: "atom", + ), + tps: ( + short: "TPS", + long: "test procedure specification", + description: "A document on how to run all the test procedures" + ), +) + +#show: init-glossary.with(myGlossary, show-term: (body) => [#emph(body)]) + += Refer to our terms so they show up in the glossary +@html, @iphone:long, @css, @css:cap:pl, @atom:pl, @tps:long + += Default sorting +#glossary(theme: theme-compact) + += Case-insensitive sorting (`ignore-case: true`) +#glossary(ignore-case: true, theme: theme-compact) diff --git a/preview/glossy/0.2.1/tests/theme-gallery/ref/1.png b/preview/glossy/0.2.1/tests/theme-gallery/ref/1.png new file mode 100644 index 0000000..ad363cb Binary files /dev/null and b/preview/glossy/0.2.1/tests/theme-gallery/ref/1.png differ diff --git a/preview/glossy/0.2.1/tests/theme-gallery/test.typ b/preview/glossy/0.2.1/tests/theme-gallery/test.typ new file mode 100644 index 0000000..72484ab --- /dev/null +++ b/preview/glossy/0.2.1/tests/theme-gallery/test.typ @@ -0,0 +1,54 @@ +#import "/lib.typ": * + +#let myGlossary = ( + html: ( + short: "HTML", + long: "Hypertext Markup Language", + description: "A standard language for creating web pages", + ), + css: ( + short: "CSS", + long: "Cascading Style Sheets", + description: "A language used for describing the presentation of a document", + ), + tps: ( + short: "TPS", + long: "test procedure specification", + description: "A document on how to run all the test procedures" + ), +) + +#show: init-glossary.with(myGlossary, show-term: (body) => [#emph(body)]) + +#text(size: 18pt, weight: "bold")[Theme Gallery] + +First, we refer to each term at least once so they'll actually show up in the +glossaries. Our terms include: @html:cap, @css, and @tps. + +// TODO: ask Discord if there's a way to get a symbol (ie function) name as a +// TODO: figure out if there's a way to get a symbol (ie function) name as a +// string or content +#let themes = ( + ("theme-basic", theme-basic), + ("theme-compact", theme-compact), +) + +#for theme in themes { + block( + breakable: false, + spacing: 2em, + inset: 1em, + stroke: 1pt+gray, + glossary(title: raw(theme.first()), theme: theme.last()) + ) +} + +// HACK: special case theme-twocol so we can restrict the height +#block( + breakable: false, + spacing: 2em, + inset: 1em, + stroke: 1pt+gray, + height: 1.5in, + glossary(title: raw("theme-twocol"), theme: theme-twocol) +) diff --git a/preview/glossy/0.2.1/themeshots.png b/preview/glossy/0.2.1/themeshots.png new file mode 100644 index 0000000..0efee07 Binary files /dev/null and b/preview/glossy/0.2.1/themeshots.png differ diff --git a/preview/glossy/0.2.1/typst.toml b/preview/glossy/0.2.1/typst.toml index 289f335..ae96f73 100644 --- a/preview/glossy/0.2.1/typst.toml +++ b/preview/glossy/0.2.1/typst.toml @@ -8,4 +8,4 @@ description = "A very simple glossary system with easily customizable output." categories = ["model"] keywords = ["glossary", "index", "dictionary", "gloss"] repository = "https://github.com/swaits/typst-collection" -exclude = ["thumbnail.png", "examples/readme.pdf"] +exclude = ["thumbnail.png", "themeshots.pjng", "tests"]