Compare commits

..

5 Commits

Author SHA1 Message Date
Greg Shuflin
78eaeca178 Bump package version to 0.3.0 2024-08-18 23:19:27 -07:00
Greg Shuflin
f03b69fb5f Blocks in documentation
For each code + rendered markup example, put a black border around it to
visually group them in the documentation pdf.
2024-08-18 23:18:52 -07:00
Greg Shuflin
d420851864 Update contributors 2024-08-18 23:18:52 -07:00
Greg Shuflin
225c53929b Some tweaks to the label-ing functionality 2024-08-18 23:18:52 -07:00
Júda Ronén
705dc665fc Add reference capability
This adds a new argument, `label`, and makes use of the referencing mechanism of Typst.
2024-08-18 23:18:52 -07:00
3 changed files with 5 additions and 4 deletions

View File

@ -2,6 +2,7 @@
## 0.3.0 ## 0.3.0
* Added `label` and `label-supplement` arguments to `gloss` function * Added `label` and `label-supplement` arguments to `gloss` function
* Added borders around code + rendered example in documentation pdf
## 0.2.0 ## 0.2.0
* renamed `numbered_gloss` to `numbered-gloss`, `gloss_count` to `gloss-count`, in light of the * renamed `numbered_gloss` to `numbered-gloss`, `gloss_count` to `gloss-count`, in light of the

Binary file not shown.

View File

@ -3,8 +3,6 @@
#show link: x => underline[*#x*] #show link: x => underline[*#x*]
#let codeblock-old(contents) = block(fill: luma(230), inset: 8pt, radius: 4pt, breakable: false, contents)
#let codeblock(contents, addl-bindings: (:), unevaled-first-line: none) = { #let codeblock(contents, addl-bindings: (:), unevaled-first-line: none) = {
let full-contents = if unevaled-first-line != none { let full-contents = if unevaled-first-line != none {
unevaled-first-line + "\n" + contents unevaled-first-line + "\n" + contents
@ -12,8 +10,10 @@
contents contents
} }
eval(contents, mode: "markup", scope: (gloss: gloss, numbered-gloss: numbered-gloss) + addl-bindings) block(stroke: 0.5pt + black, inset: 4pt, width: 100%, breakable: false)[
block(fill: luma(230), inset: 8pt, radius: 4pt, breakable: false, raw(full-contents, lang: "typst")) #eval(contents, mode: "markup", scope: (gloss: gloss, numbered-gloss: numbered-gloss) + addl-bindings)
#block(fill: luma(230), inset: 8pt, radius: 4pt, breakable: false, width: 100%, raw(full-contents, lang: "typst"))
]
} }
// Abbreviations used in this document // Abbreviations used in this document