🚨 LOCKDOWN: Repository migration in progress

DO NOT CREATE NEW ISSUES OR PULL REQUESTS HERE

All packages are moving to: https://github.com/swaits-typst-packages
Existing issues and PRs are being migrated.

This is a temporary lockdown while migration is completed.
This commit is contained in:
swaits committed 2025-10-26 21:22:33 -06:00
1 parent b84900ffc1
commit 38d33d3c8a
52 files changed
+1279 -664

No files matched your search

+34 -25
View File
@@ -5,20 +5,24 @@
short: "HTML",
long: "Hypertext Markup Language",
description: "A standard language for creating web pages",
group: "Web"),
group: "Web",
),
css: (
short: "CSS",
long: "Cascading Style Sheets",
description: "A language used for describing the presentation of a document",
group: "Web"),
group: "Web",
),
tps: (
short: "TPS",
long: "test procedure specification",
description: "A document on how to run all the test procedures"),
description: "A document on how to run all the test procedures",
),
concise: "Concise syntax!",
shortonly: (
short: "shortonly!!!"),
unused: "Unused term, which shouldn't print in the glossary."
short: "shortonly!!!",
),
unused: "Unused term, which shouldn't print in the glossary.",
)
#set page(width: 6.5in, height: auto, margin: 1em)
@@ -26,23 +30,21 @@
#let test-content = {
table(
columns: 3,
table.header(
[`short`], [`long`], [`both`],
),
table.header([`short`], [`long`], [`both`]),
[@html:short], [@html:long], [@html:both],
[@css:short], [@css:long], [@css:both],
[@tps:short], [@tps:long], [@tps:both],
[@concise:short], [@concise:long], [@concise:both],
[@html:short], [@html:long], [@html:both],
[@css:short], [@css:long], [@css:both],
[@tps:short], [@tps:long], [@tps:both:nouse],
[@concise:short], [@concise:long], [@concise:both],
[@shortonly:short], [@shortonly:long], [@shortonly:both],
table.hline(stroke: 2pt),
[@html:short:cap], [@html:long:cap], [@html:both:cap],
[@a:css:short], [@a:css:long], [@a:css:both],
[@tps:short:pl], [@tps:long:pl], [@tps:both:pl],
[@concise:a:cap:short], [@concise:a:cap:long], [@concise:a:cap:both],
[@an:shortonly:short], [@an:shortonly:long], [@an:shortonly:both],
[@html:short:cap], [@html:long:cap], [@html:both:cap],
[@a:css:short], [@a:css:long], [@a:css:both],
[@tps:short:pl], [@tps:long:pl], [@tps:both:nouse:pl],
[@concise:a:cap:short], [@concise:a:cap:long], [@concise:a:cap:both],
[@an:shortonly:short], [@an:shortonly:long], [@an:shortonly:both],
)
[@a:tps:cap is @tps:def.]
@@ -54,7 +56,7 @@
if mode == "short" {
short-form
} else if mode == "long" {
long-form
long-form
} else {
long-form + " (" + short-form + ")"
}
@@ -79,7 +81,7 @@
// ---------------------------------------------------------------------------------
#let format-uppercase-short(mode, short-form, long-form) = {
let short-up = upper(short-form);
let short-up = upper(short-form)
if mode == "short" {
short-up
} else if mode == "long" {
@@ -108,8 +110,8 @@
// ---------------------------------------------------------------------------------
#let format-conditional-separator(mode, short-form, long-form) = {
let separator = if short-form.len() > 4 { " / " } else { ", " };
let has_long = long-form != none and long-form != "";
let separator = if short-form.len() > 4 { " / " } else { ", " }
let has_long = long-form != none and long-form != ""
if mode == "short" {
short-form
@@ -124,7 +126,10 @@
}
}
#init-glossary(myGlossary, format-term: format-conditional-separator)[#test-content]
#init-glossary(
myGlossary,
format-term: format-conditional-separator,
)[#test-content]
// ---------------------------------------------------------------------------------
// 1. Braces and Labels
@@ -145,7 +150,9 @@
// 2. Mode-Based Prefix
// Idea: Add a prefix indicating the mode, and then show the term(s).
#let format-mode-prefix(mode, short-form, long-form) = {
let prefix = if mode == "short" { "S:" } else if mode == "long" { "L:" } else { "B:" };
let prefix = if mode == "short" { "S:" } else if mode == "long" {
"L:"
} else { "B:" }
if mode == "short" {
prefix + short-form
} else if mode == "long" {
@@ -161,7 +168,7 @@
// 3. Conditional Fallback for Missing Long
// Idea: If no long-form is provided, use the short-form in all cases.
#let format-fallback-long(mode, short-form, long-form) = {
let has_long = long-form != none and long-form != "";
let has_long = long-form != none and long-form != ""
if mode == "short" {
short-form
} else if mode == "long" {
@@ -193,7 +200,9 @@
// Idea: In both mode, append the length of each string.
#let format-length-info(mode, short-form, long-form) = {
let s_len = str(short-form.len())
let l_len = if long-form != none and long-form != "" { str(long-form.len()) } else { "0" }
let l_len = if long-form != none and long-form != "" {
str(long-form.len())
} else { "0" }
if mode == "short" {
short-form + " [len:" + s_len + "]"