chore: remove preview/ directory

This commit is contained in:
swaits committed 2024-12-10 22:21:15 +00:00
1 parent 78c5b8a000
commit 274e9bad2f
169 files changed

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 KiB

+100
View File
@@ -0,0 +1,100 @@
// a minimal example, also listed in the README
#import "/lib.typ": *
#let myGlossary = (
html: (
short: "HTML",
long: "Hypertext Markup Language",
description: "A standard language for creating web pages",
group: "Web"),
css: (
short: "CSS",
long: "Cascading Style Sheets",
description: "A language used for describing the presentation of a document",
group: "Web"),
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)])
#set heading(numbering: "1.1")
#set page(numbering: "1")
= Hello, `glossy`!
In modern web development, languages like @html and @css are essential.
Now make sure I get your @tps:short reports by 2pm!
@tps:cap is defined as: @tps:def.
= Examples with modifiers
#table(
columns: 2,
table.header([*Input*], [*Output*]),
[`@tps:short` ], [@tps:short],
[`@tps:long` ], [@tps:long],
[`@tps:both` ], [@tps:both],
[`@tps:long:cap` ], [@tps:long:cap],
[`@tps:long:pl` ], [@tps:long:pl],
[`@tps:short:pl` ], [@tps:short:pl],
[`@tps:both:pl:cap`], [@tps:both:pl:cap],
[`@tps:def` ], [@tps:def],
[`@tps:desc` ], [@tps:desc],
)
== Using conflicting modifiers (short, long, both)
These modifiers are semantically mutually exclusive, by they can be combined
syntactically. When multiple are used, `glossy` tries to make a smart choice on
which one to display.
#table(
columns: 2,
table.header([*Input*], [*Output*]),
[`@tps:short:long` ], [@tps:short:long],
[`@tps:short:both` ], [@tps:short:both],
[`@tps:long:both` ], [@tps:long:both],
[`@tps:short:long:both`], [@tps:short:long:both],
)
#let my-theme = (
section: (title, body) => {
heading(level: 1, title)
body
},
group: (name, i, n, body) => {
if name != "" and n > 1 {
heading(level: 2, name)
}
body
},
entry: (entry, i, n) => {
// i is the entry's index, n is total number of entries
let output = [#entry.short]
if entry.long != none {
output = [#output -- #entry.long]
}
if entry.description != none {
output = [#output: #entry.description]
}
block(
grid(
columns: (auto, 1fr, auto),
output,
repeat([#h(0.25em) . #h(0.25em)]),
entry.pages,
)
)
}
)
#glossary(theme: my-theme)
#glossary(title: "Glossary with just empty group", groups: ("",), theme: theme-basic)
#glossary(title: "Glossary with just Web group", groups: ("Web",), theme: theme-compact)
Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.
+51
View File
@@ -0,0 +1,51 @@
#import "/lib.typ": *
#let myGlossary = (
html: (
short: "HTML",
long: "Hypertext Markup Language",
description: "A standard language for creating web pages",
),
iphone: (
short: "iPhone",
),
css: (
short: "CSS",
long: "Cascading Style Sheets",
description: "A language used for describing the presentation of a document",
),
atom: (
short: "atom",
),
tps: (
short: "TPS",
long: "test procedure specification",
description: "A document on how to run all the test procedures"
),
)
#show: init-glossary.with(myGlossary)
#set page(numbering: "i")
@html, @iphone, @css
#pagebreak()
#set page(numbering: "1")
@html, @iphone, @css, @atom
#pagebreak()
#counter(page).update(1)
#set page(numbering: "A")
@html, @iphone, @css, @tps
#pagebreak()
#set page(numbering: "I")
@css, @iphone, @tps
#glossary(theme: theme-chicago-index, ignore-case: true)
Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

+40
View File
@@ -0,0 +1,40 @@
#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)])
#set page(numbering: "1")
= 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)
Binary file not shown.

After

Width:  |  Height:  |  Size: 651 KiB

+55
View File
@@ -0,0 +1,55 @@
#import "/lib.typ": *
#let myGlossary = (
html: (
short: "HTML",
long: "Hypertext Markup Language",
description: "A standard language for creating web pages",
),
iphone: (
short: "iPhone",
description: "Revolutionized phones."
),
css: (
short: "CSS",
long: "Cascading Style Sheets",
description: "A language used for describing the presentation of a document",
),
atom: (
short: "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)])
#set page(
margin: 1cm,
height: auto,
numbering: "1",
)
#text(size: 24pt, weight: "bold")[`glossy`: theme gallery]
#text(size: 1pt, fill: rgb(0,0,0,0))[
First, we refer to each term at least once so they'll actually show up in the
glossaries. Our terms include: @atom, @iphone, @html:cap, @css, and @tps.
]
#v(-2em)
#import "/src/themes.typ"
#for theme in dictionary(themes) {
block(
breakable: false,
width: 100%,
spacing: 2em,
inset: 1em,
stroke: 1pt+gray,
height: if theme.first() == "theme-twocol" { 1.5in } else { auto },
glossary(title: raw(theme.first()), theme: theme.last(), ignore-case: true)
)
}